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

CPI-PI Loop for each XML Entry call API

rene_kramp1
Participant
0 Kudos
4,028

Hi Experts,

lets assume I've a XML Structure like:

<root>
<Entry id="1">98461823</Entry>
<Entry id="2">43243422</Entry>
...
<Entry id="n"></Entry>
</root> 

Now I want to call an API for each Number within the Entries and merge the results. What is best case to do so? I'm actually trying to do the Looping Process Call and try to fetch the results on a variable. Actually it doesn't work any suggestions? The Variable is declared with "write variables" outside the Loop with type Property.

View Entire Topic
0 Kudos

Hi rene_kramp1,

You could use a splitter step with group size as 1 and for each entry you could make API call replacing the Entry value.

You can add gather to collect all the responses.

You could get more details in the blog : https://blogs.sap.com/2019/11/08/sap-cloud-platform-integration-splitter/

hope this helps !

thanks and regards,

Praveen T

rene_kramp1
Participant
0 Kudos

If the message is splitted should I use the Looping Process Call and how do I fetch each response?