cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Build Process Automation How to send Table as imput to BAPI

rjcastillo
Explorer
0 Kudos
1,271

Hello experts,

I am getting an array of strings from a JSON, a list of data. As shown in the picture

I would like to pass it to BAPI as Table Input.

Create my table data type (Step 2 - Tabla ZFI_0181)

When I go to assign the values from the list to the table it only allows me to do it individually

The problem is that my initial list of data that I obtained from reading the JSON, I don't know how many lines it will have.

Manually I can add multiple items.

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

How can I assign the values from the list to the table dynamically?

Regards,

Accepted Solutions (0)

Answers (2)

Answers (2)

peterengel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Ricardo,

you can use a for each loop to parse the data from the file and put them into your table. In the Store you can find some how to use BAPIs with sales orders or purchase requisitions, perhaps you can reuse something from this content.

Br,

Peter

rjcastillo
Explorer
0 Kudos

Thank you for your response, I am trying that but it still does not work for me, here in the following link you can see in greater detail


https://blogs.sap.com/2023/12/28/handling-rfc-in-sap-build-process-automation/comment-page-1/#commen...

rjcastillo
Explorer
0 Kudos

Good morning Peter

I am trying something to make the call of the table through a custome script

As you can see in the following image, this is the declaration of my data table that I use for the bapi, where my input is IT_CARGA

then I am using a "for" to assign the values to my table

but as you can see it gives me an error, it doesn't recognize my datatype

Is there another way to call it,

I would appreciate any comments on the subject.

Thanks

rjcastillo
Explorer
0 Kudos

peter.engel can you please help me with this situation