cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Build Process Automation How to send Table as input to BAPI?

prasad_dix
Participant
0 Kudos

Hello experts,

I am getting an array of strings from custom script. I would like to pass it to BAPI as Table Input. I have created BAPI and used Action group to set BAPI variables. The Input variable is also created.

Manually I can add multiple items. But How can I add a list (Array) each items and then call BAPI runtime?

chaitanyapriya.puvvada souraya_idrissi can you share some details?

TIA,

Regards,

Prasad

rjcastillo
Explorer
0 Kudos

Can you tell me how to solve the problem? I have days in the same situation

souraya_idrissi naumipra

Accepted Solutions (0)

Answers (2)

Answers (2)

rjcastillo
Explorer
0 Kudos
Can you tell me how to solve the problem? I have days in the same situation
former_member692506
Participant
0 Kudos

Hello,

Could you please try these following steps:

  • Create “custom script” activity. It should contain the parameter items list.
  • Add the data type which has been generated when you have created the Action and saved the BAPI Action
  • Create a condition “for each” and as input parameter add the variable list created by the custom script
  • Inside the ‘for each” add the Add Item (List) activity. Use the datatype as input parameters for list and use the custom data for itemToAdd. Then, add for each items of the object the value retrieved from the Loop Parameter of the For Each control.

Let me know if you need more details.

Thank you and best regards,

Souraya

prasad_dix
Participant
0 Kudos

souraya_idrissi Thanks for your answer. I did exactly the same. However, it's not recognizing datatype which is declared by BAPI in the script. Can you share if you have any example?

e.g.

for(let i=0; i<MATNRARR.length; i++)
{
Tables.DATA[i].matnr = MATNRARR[i]; //OR varArr.DATA[i].matnr (where varArr = BAPI data created for input
}