I’m working on a project that involves SAP background automation. More specific, we want to open the transaction FBL1N and select a variant via the “Get Variant…”-window that I open by sending the hotkey Shift+F5. In order to make the background automation work, I had to configure my activities with SendWindowMessages := True. Otherwise, UiPath would not find the element and I would get error messages as “Send Hotkey ‘UserArea usr’: Timeout reached.” or “Click ‘GridViewCell someVariant’: Timeout reached.”. But when selecting SendWindowMessages, I cannot choose a variant.
E.g.: Looking at my screenshot (see below), when I build a workflow where the bot is supposed to click on the 5th element among the column “Variant name” (again, click is configured with SendWindowMessages := True), the workflow is going to run without any errors, though in the end the first element is still going to be selected. So I have an issue when I want to focus on the 5th element.
Hello Remo,
can you please explain what you mean with SAP background automation.
Do you mean the bot runs in the background and in the foreground e.g. a user work?
Best regards
Stefan
I used the word background automation, because SendWindowMessages is also the technology that I have to use if I want to automate an application which is minimized. So I guessed that it is kind of the same issue as I have. To be more specific, in my case I’m working on an automation on a virtual machine. When I run the process in an RDP session it all works perfectly, but as soon as I start running the process on my virtual machine and then close the RDP session, I get those issues. As I recognized these issues, I switched my activities such as clicks, hotkeys, … to the technology SendWindowMessages and mostly those modified activities work again. But right here with the selection of a variant SendWindowMessages just replaced one problem by another one.
thanks for your explanation, interesting requirement, to automize an iconifyed window which opens additional windows. I tried a tiny SAP GUI Scripting example:
In this example I minimize an existing SAP window, send an SE16 to the Ok-Code field, press enter, input the table name TADIR press enter and Ctrl+F7 to open an additional window. The additional window is not minimized. It is an own window with an own handle. Now I add the following line session.findById("wnd[1]").Iconify
to minimize the additional window, but it is a dialog and not minimizable. It is the same situation as in your example.
Now I tried it with Type Into activity and different Input Modes, with Modern Design Experience, but unfortunately without any success.
My suggestion would therefore to execute SAP GUI Scripting in an Invoke Code routine. This should work in any case. But if a second window is open, like in your case, this is visible on the screen and you have no chance - maybe you can move it outside the visible area of the screen.
thank you very much for your effort. First of all, we now want to configure a custom transaction where the necessary variant is already selected. Maybe this is a little easier than creating a whole Invoke Code routine. We will see, how this turns out and hopefully this will already solve our problem. I would come back to your suggestion, if we don’t get things managed using this custom transaction.