cancel
Showing results for 
Search instead for 
Did you mean: 

Processing subsequent messages only after current is successfully processed

Former Member
0 Kudos

Hello Experts,

I have the following requirement in my project. Can you please let me know of the best way to achieve this?

1) Source system sends XML file to PI

2) PI transforms the file to destination format (a BAPI call in this case)

3) PI makes a synchronus call to the BAPI and waits for BAPI response.

4) Once BAPI response indicates successful processing, proceeds to processing of subsequent messages.

The aim is to make sure that PI sends the next message only after it gets a confirmation that the current message is successfully processed.

- Michelle

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Michelle

 1) Source system sends XML file to PI 

Asuming that PI picks the file from some folder.

use a temporary file as a flag to trigger the interface and change the name of the flag file once picked. after successfully processing revert back the name of flag file. so as next file can be picked.

You can go like this.

Use operating system commands - Before processing to first check the folder for existance of temp2.dat file. if it exist then only sender file channel will pick the original xml file. Use operating system commands - After processing to change the name of "temp2.dat" with "temp1.dat" (to use as flag) in same folder. after coompletion of the synchronous flow File - > PI - > BAPI -> PI - > File (you can use different file receiver channel here, otherwise you can set request response bean). Now change the name of temporary file to "temp2.dat". so as next file can be picked.

Drop "temp2.dat" for the first time to trigger the inteface.

Regards

Raj

Former Member
0 Kudos

Hello,

Thanks for your response. Can you elaborate on the following? I am using XI adapter to invoke the BAPI. So this is an asynchronous BAPI call. How do I get control back with async BAPI call if I am not using BPM? And how or where do I set request response bean?

after coompletion of the synchronous flow File - > PI - > BAPI -> PI - > File (you can use different file receiver channel here, otherwise you can set request response bean). Now change the name of temporary file to "temp2.dat". so as next file can be picked.

Thanks,

- M

Former Member
0 Kudos

Hi

you can do this in using bpm , try your hands on with the help of the blog /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit