Click on Tab Inside SAP

Hello Guys,

I have a question about SAP, I have been looking for the solution for click tabs inside SAP.


I use “click” activity, but sometimes it success/fail, unreliable (mostly fail).

Do you have any similar experience? Any suggestions to solve this?

Cheers,
Deny

Hi Deny,

You can try click text activity.

Cheers
Arif Elahi

Hi Deny

Question: My first question would be “do you have SAP scripting activated?” This ensure in all cases the most reliable and stable automation.

Suggestion: Second suggestion is to use Select Item activity. In this case we are going to load the information about the whole tab bar and not only about one single tab

Ask: if you have any reproducible use case and transaction. Please let me know, I want to see it.

Best regards, Lev

2 Likes

Hi Lev,

SAP scripting already enabled both in server and client side. I can recognize all elements inside SAP, input to table, choose the dropdown menu always succeed.

I tried several activity.

  1. “Click” activity, after recording, when it does not work, the error is below. The selector is static, never change.
    This is the selector inside the bracket
    {


    }
    image

  2. “Select Item” activity. UiPath does able to get all menu when use this small button on the right side. But still fail when I run it, with same error message “Cannot find the UI element”.
    image

  3. “Element exist” activity, the logic does work (use Message Box to show) but the action to “Click” does not work (same activity in No. 1).

  4. “Click Text” activity, fail.

Yes, please find the step below.

  1. Login to SAP (I use SAPGUI 750). FYI, I use this theme.
    image
  2. Enter the Transaction Code “ME21N”, choose “YNC1 Order for Service”.
  3. There are three parts, “Item Header”, “Item Overview”, “Item Detail”.
  4. Problem always with “Item Detail”. Also cannot use “HotKey” activity since the cursor is not in the “Item Detail” yet.

Cheers,
Deny

1 Like

Please find the XAML file below.
Main.xaml (37.8 KB)

Thank you.
Deny

@DenyChristi

Thanks for an overview, I will review it and come back to you, here

Lev

HI @DenyChristi

Please excuse late response. The solution here is pretty simple and very well-known. I have covered this issue of “Purchase order transactions” such as ME21n, ME22n, ME23n in my SAP training. See the link below.

The challenge is: when you are opening&closing Header, Item Overview and Items section. The IDs of elements are changing. When you open the transaction next time, the ID is different. It causes all troubles for automation.

The solution is straight forward. Use Select Item Activity, and in selector replace the part, which is dynamic with the wildcard, see green box. All other numbers are stable and not changing.

Here a comparison, between different runs:

Learn more here:
Completely new SAP Academy course , to help you to learn the automation techniques and the best practices for SAP WinGUI automation

Mark as solution if it works for you

Best regards, Lev

1 Like

@LevKushnir

Hello Lev,
thanks for your answer.

In this context an additional question to which I have so far not found an answer:
With TAC GUIBIBS and screen TabStrip Control you can find the following screen:

image

As far as you can see are the tabs of the tabstrip not all visible. But with the tiny folder on the right side you can open an additional menu:

image

And here you can open any other not visible tab. But how can I handle this menu with UiPath?

SAP GUI Scripting is here very smart, e.g. to open Designinfos
session.findById("wnd[0]/usr/tabsTABSTRIP1/tabpTAB6").select

If I want to choose the folder all I get is this:
image

It seems that the tab prolonged.

Thanks for tips and hints.
Best regards
Stefan

Hi @StefanSchnell

For any kind of SAP TABs just use Select Item Activity.

It means as a User you do not care about any technical details, you are going to show UiPath Studio the whole container for the TABs and UiPath Studio will ensure, that all TABs are accessible and can be automated.

See a short GIF, special for you :slight_smile:

You have to select the whole container, not a single tab

Best regards, Lev

1 Like

@LevKushnir

Hello Lev,
thank you very much. :smile:
Sometimes are solutions so easy. :star_struck:
UiPath offers so simple ways to realize automation :+1: and I think too much complex :woozy_face:.
Thanks again and best regards
Stefan

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.