cancel
Showing results for 
Search instead for 
Did you mean: 

Sol Req for SCN :Calling 3 BAPI's from PI and map it to single XML file

Former Member
0 Kudos

Hi ALL

I require solution for following scenario.

I need to call one BAPI from PI and after that if the data is received in PI then I need to call Transactional Commit to confirm.

And If the first BAPI call is successfull then I need to call second BAPI in the same way as first one( Transactional commit also)

And If the Second BAPI call is successfull then I need to call Third BAPI in the same way as second one

After Receiving all three BAPI data then I need to map this things to Single XML file.

Regards

Kumar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi! Prasanna,

According to my knowledge I am just providing some inputs. I am not sure 100% but why can't we think in this way..just try out.

I need to call one BAPI from PI and after that if the data is received in PI then I need to call Transactional Commit to confirm.
And If the first BAPI call is successfull then I need to call second BAPI in the same way as first one( Transactional commit also)
And If the Second BAPI call is successfull then I need to call Third BAPI in the same way as second one

ANS:: Yes it is possible via BPM

1st way of Approach::

1) Through BPM If u keep Fork Step THree Branches containind 3 receive steps and send step in each branch.

a) Logic will be like this manner:: Once the IDOC_1 receives successfully from ECC and a Proxy Message Interfaces needs to sends with data and IDOC name at which based on that message I mean once this message reaches to R3 it needs to triggers another IDOC lets say IDOC_2.data Similarly for IDOC_3.

*Note::1 *Logic in that proxy should in such a way that based on the message and IDOC number and a key field common value in all the 3 idocs's or simply IDOC name the second IDOC needs to be triggeres.

Note:: 2:: Since I am not having an sufficient knowledge on R3 Proxy coding side I have one doubt whether they can trigger second IDOC directly based on the message sending through send step or not If not possible what they need to do is they need to create one Proxy PI Interface as Second Receive Step instead of IDOC_2 but that interface means data type structure should be similar to IDOC structure such that based on the Proxy logic it can invokes the IDOC message type data into proxy Interface so that again the cycle repeats for 3rd Receive Step.

2nd Way of Approach::

1) In PI there is a latest concept known as BAM means Business Activity monitoring.

In that flow will be like this::

a) Receive Step for receving SO data by invoking the proxy.

b) Receive Step for receving PO data by invoking the another proxy.

c) Send SYNCH Step I mean it is not exactly a synchronous interface but here functionality is to

carry or send PO data and release that PO Data and brings or Carry the GR data.

d) Receive Steop to hold the GR data and remaining concepts are different.

2) But there the thing is Is it possible in such a way to release first IDOC-1 and carry bringing IDOC-2.

check out.

3rd Way of Approach::

If they only wants confirmation such that IDOC was reached succesfully to PI means simply by changing few changes to first way of approach that Insert Control Step instead of SEND Step and through a mail ALert confirmatio and now trigger remaining IDOC;s based on that confirmation

Note:: Or check it out Is it possible to trigger new or second IDOC based on the intial IDOC Acknowledgement. I mean some r3 side settings to restrict the IDOC triggering.

I hope this will give some idea..

Regards::

Amar Srinivas Eli

Edited by: Amar Srinivas Eli on Apr 2, 2009 4:44 PM

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi all,

Here in this case PI should be the initiater to call BAPI at regular interval of time,lets say for every 5 secs.

SAP R/3 is not going to push the BAPI data to PI. PI will initiate the request and call first BAPI and get the data after that it call second BAPI and get the data then it calls third BAPI and get the data.Finally it maps all the received data to target XML structure.

So all processing is done from PI side.

Former Member
0 Kudos

Hi,

I did not get why you need PI to be the initiator. If you use Proxy to File scenario, then you can schedule(Background Job Scheduling) the program where you are calling the proxy to execute every 5 Sec. If you still want the PI to be the initiator then you need to go for BPM.

Regards,

Shwetambari.

former_member206760
Active Contributor
0 Kudos

Prassana,

Try this...

1. create a Z RFC which will have BAPI 1 + BAPI 2 + BAPI 3

you can do appropriate error handling in this ...like if any one is in error an internal table error should be filled

2. Create a driver program on XI which will call that Z RFC ( same as u create a driver program on R3..but here the control will be with XI )

Former Member
0 Kudos

Hi!

Also you can Go for Cleint PROXY to FILE SCenario such that this scenario will be depends mainly through the logic written by abapers and logic will be in such a way that it would combine all the three IDOC's one after another by clubbing all the theree IDOC;s data intoa single Proxy Interface and sending that data to FILE.

My Question is:: Your requirement is you want to send IDOC;s one after another only after reaching the confirmation right ?

It means after confirmation you can send second IDOC right which implies that no need of waiting for any other thing right ?

If that is the case why cant u club all the IDOC's into a single MT and go for PROXY to FIle Scenario.

Note:: I think if the above condition only is the requirment means you can go for that scenario right instead of complications like BPM

Note:: Or else are u populating any field of sending IDOC_2 by the key field or mandatory field present in the IDOC_1. eventhough that is the case you can update that field mainly in the IDOC_2 same as how you are entering in the IDOC_1 right

Regards::

Amar Srinivas Eli

Former Member
0 Kudos

Hi! Prasanna,

After Receiving all three BAPI data then I need to map this things to Single XML file.

1) Once u receiving all the 3 IDOC;s Data You can mapp all the there IDOC's by clubing in a single message mapping I mean by adding all the 3 IDOC's in a Signature tab and mapp to single FILE.

2) Now Insert Transformation Step in BPM immediate to Fork Step.

Note:: If the Scenario transaction is handling with Huge data it may lead to BPM perfromance issues in Future also. because all the BPM process will happends in Process Engine and the Tranformation Step undergoes in Java Stack every time it is Swtiching from PE to J2EE engine but an advantage is only one Transformation step means it needs to switching noly one time. So I think some what no probs.

Regards::

Amar Srinivas Eli

Edited by: Amar Srinivas Eli on Apr 2, 2009 4:46 PM

Former Member
0 Kudos

proxy to file is the advisable, other than that you can use BPM or use custome BAPI in which combine all operations...

Former Member
0 Kudos

Hi,

I think you should use Proxy to File in this case. In proxy you can all the three BAPI's in the sequence and then send the requied data back to PI. After that you can map it to the target structure and then by usinf file adapter you can create XML file.

Regards,

Shwetambari.