cancel
Showing results for 
Search instead for 
Did you mean: 

Collecting Message from 'ForEachBlock'

Former Member
0 Kudos

Hi experts, i have a scenario of File-PI-RFC. My FILE is in XML format and consist of, for example, 10 POs (this is only example) with each of them has more than 1 items/details.

However my RFC will only receive 1 PO with its items each time. Therefore in my bpm, i use a "ForEach" block to separate my file and call the RFC 10 times (i successfully did this).

However my problem is to collect the response from RFC (each RFC). My BPM call RFC synchronously and I need to combine all the response from the RFC (which will be 10 response in this case). I have read some blogs about collecting messages into 1 message, however, all i can find is that using "Fork". But in my case, i dont think i can use FORK (CMIIW). So guys, anyone can enlighten me? Thank you very much...

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member200962
Active Contributor
0 Kudos

Did you checked this help section: http://help.sap.com/saphelp_nwpi71/helpdata/EN/11/13283fd0ca8443e10000000a114084/frameset.htm

The send is not a Sync one but splitted into Async-Send and Async-Receive.

Regards,

Abhishek.

Former Member
0 Kudos

Thank you for all the advice...So the only way is to make the sync send become 2 separate async (send and receive)?

Ok i've done and follow from the link that you guys gave me.

However, i got a problem on why i dont have anything to select on my receive node at the 'Use Correlation' field?? I already create a correlation but i can't select it for the 'Use Correlation' field. I can only select it for 'Activate Correlation' field...Any clue?

Thx...

former_member187339
Active Contributor
0 Kudos

Hello..

Check these:

1. Both send and receiver is in one block.

2. Send step activates correlation

3. Receive step uses the correlation..

Are you following this? If yes then I would suggest to delete the correlation and re-create it and try again.

Regards

Suraj

Former Member
0 Kudos

I have checked everything...but my correlation still doesn't show up in the 'Use Correlation' field Any other settings i must check, maybe the request message and response message, my 'ForEach' block, etc ?

former_member200962
Active Contributor
0 Kudos

The correlation should be defined as Local Correlation whose scope will be limited only within the Block

For more info refer Validity of correlation section here:

http://help.sap.com/saphelp_nwpi71/helpdata/EN/a5/64373f7853494fe10000000a114084/frameset.htm

Regards,

Abhishek.

Former Member
0 Kudos

I have finally managed to overcome the 'UseCorrelation' problem. Thanks guys for the help. Now, i want to ask, because we define the RFC call as 2 separate async steps (send and receives) , does it mean that we have to define 2 interface as well at the configuration?

former_member187339
Active Contributor
0 Kudos

Hello..

Yes one for send (which will have rfc message type) and one for response (having rfc.response message type)

Regards

Suraj

Former Member
0 Kudos

Hi Suraj, thx for the help and guidance....I still have a problem on creating interface determination for both sender and receiver in BPM.

Firstly, when i want to create the interface determination for sender (From BPM to SAP RFC) , i cannot find my message interface that suits my RFC.

Secondly, when i want to create interface determination for receiver (From SAP RFC to BPM), i cannot find my message interface that suits my receiver at BPM.

Please help me .....

former_member200962
Active Contributor
0 Kudos
Secondly, when i want to create interface determination for receiver (From SAP RFC to BPM), i cannot find my message 
interface that suits my receiver at BPM.

This should not be the case.....there is some design problem......the interface should be abstract and should be the same which you have included in the receiver step of the BPM (actually in the container)

former_member187339
Active Contributor
0 Kudos

Hello..

Try reading this thread

That might help you with your requirement

Regards

Suraj