cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding the RFC Function Module call from PI

Former Member
0 Kudos

Hi All,

I am working on one File to RFC interface, in which File adapter picks the file, this file data has to goto 2 function modules in SAP system. For this i added 2 Inbound interfaces in INTERFACE DETERMINATION and I developed 2 RECEIVER AGREEMENTS. In 2 RECEIVER AGREEMENTS i added single receiver RFC Communication Channel.

Now i want assurance that once 1 st function module will execute completely, then only my second function module should be called. Is there any setting that i can do to make this sync?????.

what is the use of Send 'Confirm Transaction' in receiver RFC Communication Channel under Adavanced Mode.

Thanks,

Balu

Accepted Solutions (0)

Answers (3)

Answers (3)

Shabarish_Nair
Active Contributor
0 Kudos

you can either go for a rfc wrapper and have the functionality of both the RFC into one and make sure the first executes followed by the other. But the ideal way for you to go is as mentioned by sarvesh. use an ABAP proxy.

Former Member
0 Kudos

This we can control only by using BPM. We will send input to function module from BPM(Sync Send), after getting response, then we can send Input to second function Module.

But i got resolved this by other approach by combing both function modules to single function module.

Thanks,

Balu

Former Member
0 Kudos

Hi,

As per you requirement I would suggest to change your scenario as File To Proxy. It will much more easier and 100% sure to process second BAPI only after first gets successful inside the proxy.

Pass the data from file adapter to inbound proxy and then inside proxy code you first call the first BAPI and use commit wrok. Once commit work is successful then you call the second BAPI otherwise rollback the changes.

Example:

Call First_BAPI 
<pass the data to it's import export parameters> 
Commit work. 

if sy-subrc =0. 
Call Second_BAPI. 
<pass the data to it's import export parameters> 
Commit work. 
endif.

Note: If you are not very much comfortable with ABAP the discuss this with your ABAP team mate.

Regards,

Sarvesh

former_member181985
Active Contributor
0 Kudos

Options:

1. wrap the two BAPI's into one single BAPI and call this.

(or)

2. Using BPM

(or)

3. For the second BAPI call, in the mapping introduce some delay (Thread.sleep() using UDF)

Former Member
0 Kudos

Hi Praveen,

If i will put Thread to wait in UDF, it will not work for 1 minute etc, it doesnt work. Even it is not recommended.

I can not use single BAPI, as these 2 RFC function Modules were already developed.

My last priority is BPM, if i will not get solution. Finally i am planning to go to BPM.

Thanks,

balu