I have been using for each loop on a Excel and extracting the values to fill into SAP, and its working fine as each time it extracts one row and fills the values into SAP.
But, I am looking to use the group by on a specific column “ID_No” and get all the similar “ID_No” value in a single for each loop to fill up the values in SAP. Book1.xlsx (9.7 KB)
I am trying to get Debit_Val and Credit_Val in a single for each, so that while uploading the values in SAP i can fill the Debit and credit value in SAP using a single for each.
(From G In ReadDT.AsEnumerable
Group By O = New With {Key.K = G.Item("ID_No"), Key.U = G.Item("ID_No")}
Into Group Select Group(0)).ToArray().copytodatatable()
To get all the similar ID_No in one for Each,
For Eg: If ID_No - “122604” is selected in for Each, Is it possible to get all the 3 similar rows with the same ID_No in one For Each.
So that when using the Values in SAP i can use like row(“Debit_Val”).To_String