cancel
Showing results for 
Search instead for 
Did you mean: 

How to call BAPI in a loop

Former Member
0 Kudos

Probably a simple answer that I'm not seeing.....

I receive a file with multiple records.

For each record I want to call a BAPI (and then maybe fire an IDOC, but that's not my question)

A loop in a BPM seems the obvious way, but I can't seem to pick up records in succession. I get the first record each time (thankfully I thought to put a counter in the loop condition!)

Any help gratefully received.

Guy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You have to split the 1 message into n messages using transformation ( 1 to n ..multimapping ) and then use block step (mode : foreach).Put the send step (call to the BAPI or IDOC) in the block.

Former Member
0 Kudos

Thanks for that Sekhar,

I ended up reading about a 1000 blogs, but you gave me the clue. SplitbyValue is the key to the thing, and setting the target message cardinality. Points awarded.

This blog really helped

[url]https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3765[ [original link is broken] [original link is broken] [original link is broken];url]

Answers (0)