Recording in SAP - How to select option when scrolling necessary in pop up window

Hi all :slight_smile:
I have been using the recorder function from UiPath for SAP and it wernt quite well.
Now I have been trying to select an option in this little pop up window that I attached to this post. I need to scroll down to get to the option.UiPath_SAP|422x500
And then I need to select the option by clic!king on the little grey square area to select the option right next to it.
I haven’t found a solution or work around yet. I would be thankful for any advice. Thank you!

for dynamizing the selector have a look here:

in case of you need more help we would need some details on the element selector / attributes. You can easy grab this with the help of:

too complicated answers :))))

Hi @Pia123

Just use a click activity to choose the right lines you want to select.

We are using SAP Scripting Interface to automate SAP and you as a user do not need to take care about scrolling. We will find the right row/line for you. If the row is on the next screen, UiPath will scroll for you

See example:

Best regards, Lev

Hi Lev
I am struggling with a long SAP list (2400+) rows where I need to append data.
I have tried the following with no success an are a bit stocked now and need some suggestions or ideas to get further if you have time ?
Test 1) I have by keystroke moved to “last page” and the “next page” (then there will allways only be one fillin row. Then I want to read the property “TableRow” and +1 and then insert data
Test 2) Used “Table Cell Scope” and “Row Number” = “First Empty Row” - this moves me to the first empty row.

BUT for both I do not seem to be able to read OUT the current TableRow number.
Tried with:
a) Get attribute - but it requires a click on the screen and then it choses the tablerow and that will increase when I add a new SAP row.

Can you give me a hint on how to read out the current TableRow of one or the other ? or alternative way to do it ?

Thanks in advance
rgds John

hi @KaldahlConsulting

Please give me some screenshots, some more SAP content? which transaction? which table?what is the use case?

It will help me to understand your challenge :slight_smile:

In same cases the automation should be done a bit different, in comparison how humans are going to do the stuff.

Best regards, Lev

Thanks Lev
First picture is the SAP screen (Materiale assignment)
to add records on this - you have to go to last line (or first empty line)

And if I use all the SAP activities, it requires a “TableRow” - which sets a number.
I have found out how to make the TableRow as a variable and count that up.
But I do not know how to find the “current” TableRow number - or the first empty TableRow number so I can get my starting point for adding records/rows into SAP

So how do I find my starting point (first empty tablerow) ?

thanks in advance

Rgds John K


When you are using Table Cell Scope activity - we are finding for you the first empty row. So it means, you know where you are exactly.

Using Get Attribute Activity you can grab any properties, which are available for the particular field or table, in your case it will be TableRow and store it as variable for later use…

Get Attribute Activity will provide you the current TableRow

the whole super simple flow could be

  1. find first empty row
  2. set focus exactly in this place
  3. grab the tableRow number

Does this helps?

Regards, Lev

Thanks a lot Lev
I did try this earlier (without success - so will try again)
But the issue with this was the time it took UIpath to scroll through 24xx rows.
Can of course be done, but faster would be if we send “Ctrl+F12” (Last page) and then “Ctrl+F11” (Next page) because the you always end up with the last record in the first line on the SAP screen.
But then I cannot select it because of the “changing” TableRow (depends on numbers of records)
So is there another way to get the TableTow on the screen (not indicating it, as that will then be a fixed TableRow number and may be different after more rows are added. ?

ps. meanwhile I will try the “find last row” in “Table Cell Scope” to see if I can get that to work (do not know what I did wrong first time)

rgds. John K

this is a good hint, let me think, how to solve it… Agree with you, it will be much faster

Hi Lev
I guess you have not come up with a good idea yet :slight_smile:I have meenwhile tried to get your other suggestion to work, but need still a bit of your help to get this to work.
When you say:
“2. set focus exactly in this place”
How can I set a fucus whitout indicating the screen ? (how does UIpath then know where we are ?) And if I indicate the screen, then it takes the current selected TableRow and not the one for “first empty row”…
So since I cannot get that I still not have a working solution
Thanks in advance and have a nice weekend
rgds. John K

HI @KaldahlConsulting

Sorry for late response. I had a chance to speak to my team and we did some brainstorming on your challenge.

Here is an idea, what we have found out and which should help you.

Use UiExplorer, indicate the whole table, not a single element, but the whole table and than you will see following attributes

Scrollmax, Scrollmin, Scrollpagesize

This will give you an information about the whole table and amount of data in it.
Scrollmax - 25, means the table has 25 lines, it means, 25 + 1 will be your first empty line.
Scrollpagesize - 8, tell you how many lines are in one visible SAP page.

You can get all these attributes with help of GetAttribute Activity on the level of the table and with a little math calculate the right RowNumber you want to work with.

Hopefully this will help you. Please let me know

Best regards, Lev

Thanks a lot Lev
That worked - and also fast :slight_smile: !!! Great
p.s. Only thing is that it seems to take the last visible empty row, but that is not a problem, as it gets the empty row and can add data.

My only other issue is now that SAP freezes from time to another - do you have a good way of handling that ?
(I am right now killing and restarting SAP, but would prefere that not to be needed)

Once again thanks a lot - smooth solution :+1:

HI @KaldahlConsulting

Check this one, should help

Best regards, Lev