Input data in SAP Parameter

Hi community,

I have the sap parameter as below and would like to input the data into the SAP from the excel file as per second screenshot.
image

image

As the company code is the same throughout the excel file, i just need to key in one time as per screenshot below
image

However, when come to reference, i have multiple line which i need to key in all in other pop out screen as per sreenshot below
image

Hence, i would like to ask how do we design the workflow so that when read the company code from excel file, it will read one time and input the data into SAP. But when come to reference detail, it will read all the line and input it into the SAP.

Mnay thanks for the assistnace

use my custom activity, download link is in description

Hii @SH_94 ,
You could try with For Each Loop
1)Try To Read Excel File as Data table
2)Then using for each Row in Data table
Perform the sap activities in it

Thanks and Regards
@anmita

Hi @anmita ,

Can u show me via screenshot of workflow on how u going to build this concept for each loop together with each row?

Many thanks

  1. write excel data into text file,
    image

click this button and type in path of text file
image

results will be here
image
@SH_94

Hi @jack.chan ,

Is there anyway to read it from the excel file ? Reason being is that all the data will be resided in the excel file .

For the video tutorial, would like to ask if there will be audio included as well as i cant hear the audio.

Many thanks

yes it can be done.

can i see screenshot of excel?? and which column do you want to write to SAP? @SH_94

Hi @jack.chan ,

Many thanks for the prompt response. Kindly find the attached excel file below for your reference.

For company code, since it is the same throughout the excel file, i plan to automate by keying one time ( not need to use multiple input option). While for reference, i have multiple line and would need to key in data using multiple input option .

Invoices.xlsx (9.4 KB)

  1. read range to datatable (e.g. dt variable)
  2. use write to text file activity
    under text write the following
    String.join(Environment.NewLine, dt.asEnumerable.Select(function(x) x.field(of string)("Reference")).ToList)
    this will write the following to text file
    image

then use the method i mentioned above to upload the text file to sap

Hi @jack.chan ,

Many thanks for the prompt response. May i know how to link this concept with another process - key in data in SAP for company code - one time key in only.

THanks

something likethis
image