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

SAP Build Apps: build up nested API payload with 1 to many relation (Purchase requisition)

Sanne
Explorer
0 Kudos
337

Hi,

first of all happy new year!

In my SAP Build project i have the requirement to create purchase requisitions in S/4HANA Public Cloud. These PR's consists of 1 header, an x number of items and every item has 1 account assignment and 2 texts.

What is the best way to build up the payload for the API? I am able to create a PR with 1 item, but i am struggling to build up a payload for multiple items.

Is this possible with SET_KEY? Or do i need to write Javascript for this? Or is there any other option?

Creating the items 1 by 1 is not an option as there is an impact on the workflow in S4. 

many thanks,

Sanne

 

Accepted Solutions (0)

Answers (1)

Answers (1)

gregorw
SAP Mentor
SAP Mentor
0 Kudos
Sanne
Explorer
0 Kudos
Hi, thanks for your example. Do you also have an example where you build up the payload dynamically? I think in your example the two line items are fixed in the payload. Thanks!