UiPath - Datatable data entry into SAP - handling data entry with variable number of lines (how to detect)

This is going to be an open ended question and sorry if my subject line was a bit confusing! it is hard to explain.

So we have a data file that we get out of our expense program. This data file needs to have its data input into SAP. However, some of the lines have the same invoice number, in these scenarios we need to input them all into the same SAP transaction - so instead of ending at the first line, we may need to work down the SAP screen filling in multiple lines. I am having trouble with creating a robot that will be capable of working down the SAP window X amount of times.

For instance, when doing 1 line at a time, the “for each” activity worked perfectly. However, now that I need to find a way to input 2 lines, 3 lines, 4 lines, etc at a time, this obviously doesn’t quite work.

I was wondering if anyone had any clever idea on how to handle this data input. I just need some general inspiration on some ideas where to start. I can figure out the details, I just don’t really know where to begin with this one…

Hi Gabriel!

What I have done with SAP in this type of scenario is look at the selectors of the Type Into activities that you set for the first row of the table. If you check, there’s going to be a property that indicates the row number of the SAP table row in which it needs to type.

What you’ll do in this case is, instead of having that as a hard coded value, replace it for a variable and in each iteration of the ForEach you will be updating the variable with the row number.

Hopes this works for you!

:open_mouth: that sounds like a great idea! I will try this; thanks a ton!

Hi @gabrielespinosa

String.Join(Environment.Newline,(From r In Datatablename Select r.item(“Columname”)))

Assign the above text to a string variable and that variable contains all the row values of the given column seperated by a newline, set the value in the string to a clipboard and click on the 1st cell of the required column and and click ‘ctrl+y’ using send hotkey all values will be pasted in one go.

Thanks.

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