cancel
Showing results for 
Search instead for 
Did you mean: 

Loop with 0..unb.-item and message mapping in BP

Former Member
0 Kudos

Hi all,

Following specification:

I get a message into my business process that contains u201Citemsu201D with occurrence 0..unbounded.

For every u201Citemu201D I need to call an RFC and insert data into several DB tables.

Thought about handling all that in a loop. As long as there are items there would be a loop and inside the loop there is a message mapping that maps the next item. Then there are the send steps in a certain order and so on.

Unfortunately that doesnu2019t work.

I get an infinite loop even though the condition is an element inside u201Citemu201D and itu2019s marked as multiline.

The mapping doesnu2019t work as well because it always maps the first item. (Of course it does and I don't know how to force it to map the next item.)

Maybe my approach is generally wrong?

How would you guys solve this problem?

Thanks in advance!

Karsten

Accepted Solutions (1)

Accepted Solutions (1)

santhosh_kumarv
Active Contributor
0 Kudos

>>For every u201Citemu201D I need to call an RFC and insert data into several DB tables.

Why do you need to call the RFC for every single item...I suggst u to pass all the "item" details to the RFC at a single call and update the same in the DB table with the ABAP code looping in these items.

Thanks

SaNv...

Former Member
0 Kudos

Hi Sãnthosh Kûmãr V,

The RFC can handle just one item at a time.

After I get data back from the RFC I have to send item data and RFC data to several oracle tables (JDBC adapter) and then trigger another process. And I have to make shure that all or nothing is done for every item. Therefore I thought a loop could be a good idea...

Karsten

santhosh_kumarv
Active Contributor
0 Kudos

Is you requirement is to

post the item data to RFC> get the RFC Response-> Send the item data and RFC response to JDBC.

Also the same should be done to all the items.

>>The RFC can handle just one item at a time.

You can modify the RFC to import multiple items using Tables and export multiple items.

Thanks

SaNv...

Former Member
0 Kudos

Sãnthosh Kûmãr V,

Nice idea

It's impossible to modify the RFC because it's a customer module and it's used for other processes as well.

Thanks anyway...

Karsten

Former Member
0 Kudos

Hi Karsten,

Use Block instead of loop in the Integration Process.

Send you some description in Detail via Email.

regards,

robin

Former Member
0 Kudos

Thank's Robin, that should work!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Karsten,

best it to have a look at the patterns SAP deliveres by default in your integration repository.

I guess there is a BPM pattern that exactly solves your problem.

Regards Mario

Former Member
0 Kudos

Hi Mario,

The SAP patterns never "exactely solve" any problem

They just cover very simple use cases.

I need to have several send steps in a certain order for every "item" in the incoming message.

Thanks anyway...

Karsten

Former Member
0 Kudos

Hi Karsten,

is the BPM MultipleFlightBookingCoordination not similar to yours?

A messages is split into 0... unbounded.

The splitted single messages get send (= your RFC).

Regards Mario