cancel
Showing results for 
Search instead for 
Did you mean: 

XI BPM : Help Needed

Former Member
0 Kudos

Hi All,

I am passing internal table from SAP R3 to sapXI ( BPM ).

It has aroud 2000 records. Now i want to pass these records to the legacy system synchronously in the batch of 200 records.

So how do i proceed? I mean how do i loop at the internal table in bpm?

Please do the needful.

Smita.

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

Hi,

You can achieve this with the help of ABAP proxy. Your bpm Collect pattern will be collect based on the Message.(Message Dependent Loop)

So you will be having Sender ABAP proxy which will send two messages to XI.

1) Actul Data with 200 records

2) Stop message to indicate the BPM that this message is last one.

In the BPM it works with the concept of Fork and it will keep on recieve two messages. WHen you get stop message it will come out from Fork step and write into File. Till stop message , your BPm will keep on collect all the messages.

And in configuration you will be having 3 receiver determinations.

1) Actual data to BPM ( ABAP proxy to BPM)

2) Stop Message to BPM(ABAP proxy to BPM)

3) BPM to legacy system

To more on this-

http://help.sap.com/saphelp_nw2004s/helpdata/en/84/e8763c997fda50e10000000a11405a/frameset.htm - here you go t oIntegration Proces(ccBPM)->Examples and Useage Cases->Example: Collecting and Bundling Messages - One Interface from the left menu

Hope this helps,

Regards,

Moorthy

Former Member
0 Kudos

Thanks Pratik/Moorhty,

Your solution is off course correct.

But the problem in my case is that, i have to pass 2000 records to bpm first and then i want to split into a batch of 200 records. This is because i am maintining a session with the legacy system and i want to send these all records in one session only.

Hence i dont want to come out of bpm once i send the message to it.

Is there any other way so that i can send the messages in the batch to the legacy system from the bpm.

Regards,

Smita.

moorthy
Active Contributor
0 Kudos

Hi Smita,

In this, suggested solution, you are sending data in the batch only i.e bulk messages only. In BPM you are going to collect all messages and then execute the N:1 transformation so that you will get entire messages in one shot.

<i> ***have to pass 2000 records to bpm first and then i want to split into a batch of 200 records</i>

Totally you want to send 2000 records at one shot to Legacy system right?

If so you can send entire 2K records one shot from R/3 thru ABAP proxy. but catch here is , if you send 2k records in one shot with one proxy call, it may be delayed, it may go to Queue etc. ( Based on Memory etc)

SO what I suggest is , send the proxy message for every 200 records into BPM. Once no of records reachs 2000 in the R/3, then send the stop message to BPM. Now BPM will stop collecting all these 200 Records slot. Now in your BPM , you are having N messages of 200 Records slot. So now execute N:1 Mapping so that you wil get all 2k records in one message so that you will get one file at your receiver.

HOpe this helps,

Regards,

Moorthy

Former Member
0 Kudos

Thanks Moorthy for your valuable guidance.

I am passing 2000 records to bpm successfully using RFC call.

Not i want to split this 2000 messages in the batch of 200 in the bpm only.

Actually i am doing this using java code in bpm. But i dont know how to access the container element value in the java code.

Can you please tell me how to access container element?

And if there is any alternative way to do this, please suggest.

Thanks a ton,

Smita.

moorthy
Active Contributor
0 Kudos

Hi Smita,

Regd. Container Element, if it is part of message then , if you are passing that message to the Java Mapping then you can access it.

I think without Transformation step, you can not get the Container Variable value.

Some discussions happend long back

Just my view-

Now you have 2000 records in your Message in the BPM. Just use ParForEach loop and inside this keep on collect records one by one until record count reachs 200. Once you reach 200, then it will comeout of COllection, it will send these records via N:1 Transformation STep and send this into Legacy. Inside the ParForEach, you need to have bpmCollectPattern of type No.Of messages and Transformation step Send Step.

It is just my thought.

In your case what are you going to do in Java Mapping ..If permits, just explain more-

Regards,

Moorthy

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

What you could do is to

1.collect all the 2000 records

2. put them into a container 0ne by one.

Have 2 counters. ctr1 = 0, ctr2 = 2000

3. Have a fork.In one branch, check if ctr1 = 200, if so, decrement ctr2 by 200 and place a send step after this.

4. In the other branch, check if ctr2 is 0, if so, place a stop step.

Hope this helps.

Regards,

Smitha.

Former Member
0 Kudos

Hi,

In this case use ABAP proxy, break the data in bunch of 200 records in each message and in the last message from the R/3 side send the last record indicator. Use BPM, use loop into the BPM and come out of the loop when the last record is received. I think this is one of the solution.

May be there can be other solution also.-:)

Thanks,

Prateek