SAP Label Click Simulate not working

Hi,

as we know simulate click is not possibile im some cases in SAP WinGui. Esp. when we want to click a label/GuiTextfield. In this cases we used Hardware events, which works most of the time very well, but sometimes it fails without any reason.
When we take a look in the SAP Gui Scripting API we can see that there is a function “Set Focus” which is actuality not a real click but it helps to make the script more robust.
@LevKushnir: Why UiPath do not have this function or simulated click derived from the SAP gui Scripting API?

Thx
Mti

I can’t speak for UiPath’s motivation, nor do I have much knowledge of the Scripting API in SAP, but you can activate components (using ''activate", or in some activities it is a checkable feature to “activate before…”.) This sets the focus on a component if it is focusable.

Hi @mti ,

Try this

Do not click SAP labels.

Navigate using Send Hotkey (Tab / Enter) or directly Type Into the target input field with Activate enabled.

Avoid Hardware events unless there is no alternative.

@mti

That’s nice suggestion. Let’s put this as a feature request :victory_hand:

Hi @mti,

Could you please give me more details about your use case? Where are you using this?

Then I may have a better answer for you.

Thanks, Lev

Hi @LevKushnir ,

sure: just one of the cases.. MM42 SAP Retail
In this screen

we need to select PB00. A simple click (simulate) on the Text will lead to the error in essence “Simulate is not supported on this control”. Hardware events works but sometimes fails without any recognizable reason.
The Scripting api SAP Help Portal | SAP Online Help for this control has the “Set Focus” Methode to set the red rectangle on this element.

Thank, mti

Hi @mti!

Thank you for the information! I am actually working right now on extending the Simulate support in SAP.
I tried to reproduce your scenario, but unfortunately I cannot access MM42.
Do you have a similar scenario that leads to a popup like in your image so that I can test that I covered it? Maybe in VA02 or MM02?

hi @mti

Can you please check and confirm, that Dialog (modal) option is set in you system?

https://docs.uipath.com/activities/other/latest/ui-automation/sap-wingui-configuration-steps#enabling-modal-dialog-boxes​

Once it is Dialog (modal), please check this window “Übersicht Konditionsarten” again. Does it look the same or different now? Please share the new screenshot

Thanks, Lev

Dear Lev,

my popup is a dialog, but not one which is displayed via F1 or F4. Hence the Popup looks the same.

Cheers, Mti

Hi Raduc,

I’m sorry i was not able to find a popup like this with lables. but i think you can uses every screen with labels like we19 (edit idocs) where you can test the "Set Focus” Methode

Cheers, mti

1 Like

Hi @mti !
Just tested the changes and they should work in your scenario (at least they work on WE19) as you suggested.
I could offer a developer build in private for testing purposes only if you are willing to give it a try.

1 Like