Hi all.
I have a data table with a column called “Tax Code”. I want to loop through this data table and write the contents of the column into a SAP table column of the same name.
I have tried using Table Cell Scope with a type into activity but it writes everything into the first cell of the column.
How do I make sure that it moves to the next cell after writing into the previous cell?
Below is a picture of the activity: I know the problem is with the “row” in the table cell scope activity because it’ll always write in the first cell but how can I change it to move to the next cell?
As you said you are looping through the column data, you can use the loop’s index property to update the row number in every iteration.
Please go to the property of the loop & in the index option, declare a variable, say loopIndex. It will automatically take the zero-based value & keeps on incrementing as the loop iterates.
Then you can set the Row Number as loopIndex.ToString, it will take values 0,1,2…
You need to see the selector of the SAP table
Usually every table has the RowNumber in selector, So check that
and as you are using loop if you are using For Each row activity then you can create a variable in Index property
Usually Row number starts with 1 and Index property starts with 0
So, use assign activity and write as IndexVariable = IndexVariable + 1
The variable you have to pass inside the selector of the SAP
So everytime loop runs, it will look into the next row