Write SAP output to Excel

Extract only first 5 rows and keep a write line to check for Doc# for every iteration.Check if you are missing anything.

Selected A1:F6 as the range. The results: after each doc was created - it entered the doc# in column F - lines 1-6 - overwriting the Doc# before. End result - the last doc created. New Rebate.xlsx (12.5 KB)

That’s because you have foreach at the end, not sure why you are using it.Pass your row as arguement and use the code inside foreach at the end.

Not sure what you mean, but I will see what I can do!

You have a foreach loop at the end of your 2nd workflow(above screenshot), inside the loop you have write cell with document number input.Same doc number is being written into all the cells.

If you check your expected results, always the last document number is written into all F cells.

You need to pass your row variable in 1st workflow to 2nd as an arguement and just use the activities inside foreach loop to write to the cells(remove foreach)

“pass your row variable as argument”? Are you saying that the write activity should be in the 1st workflow and not at end of the 2nd? I originally had the document number as an argument and passed to 1st workflow but I was unable to get it to write. Is there any training documents that I can view as far as how to pass arguments?

Hello,
I read your blog and i really liked it and it is very useful for me and, I hope you will post these types of posts.
Thank you.