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

SAP Build Process: How to check if action returned results

0 Likes
946

Hello guys,

I'm calling the S/4 Sandbox Business Partner OData Service. Now I want to check if there's any results or a specific number of results etc.

The only value in the conditions is count:

But count will not even be returned, so I don't see how I need to design my condition!?

Thank you,

Christopher

Accepted Solutions (1)

Accepted Solutions (1)

Archana
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello Christopher,

List are not yet supported in SAP Build Process Automation. It is in the roadmap. You cannot directly map a List output to condition fields. You can however map to Form fields but by-default it will pick only the first list-set.

For example, if you mapping the output of business partners to a form field, it will assume that its like BusinessPartner[0].Name etc.

If you want to map the output, then you have to use the API that gives single output like you can get specific business partner via A_BusinessPartner('businesspartnerID') and then map the output to condition and form fields.

Regards,
Archana

n60
Explorer
0 Likes
Hi Archana,
n60
Explorer
0 Likes
Hi Archana, Does List Output update yet?

Answers (2)

Answers (2)

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Likes

Yes, there are lists, and if you want you can find out how many items are in the list with a script task. 

Let's say I create a trigger form and it has a table of names. I can write a script to retrieve the list and then calculate how many items there are. I could then return the value in a custom variable.

var mylist = $.context.startEvent.namesTable;
$.context.custom.count = mylist.length;

 

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Likes

You can certainly do this now with script task, one of its main use cases is working with lists.

unless someone does this before, when I return later today I will give example