cancel
Showing results for 
Search instead for 
Did you mean: 

Call R/3 program from PI

Former Member
0 Kudos

I have a scenario where a file will be placed by 3rd party into a FTP directory accessible by PI.

PI's file receiver channel keeps polling the directory, and as soon as the file has come, it should trigger a program in SAP which was waiting for that file.

I have heard it is possible theoretically by calling a program from PI.

But I am not sure where should I write the code to call the program? I don't need any mapping, I dont need any transformation.

Just as soon as the file comes, trigger the program.

Any clues on what can be the simplest solution for this requirement?

Thanks in adv gurus.

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

if you ask me, this should be a File to ABAP proxy scenario.

That is the ideal design that can be suggested.

note that you can also send the file as an attachment in the ABAP proxy

Answers (1)

Answers (1)

former_member200962
Active Contributor
0 Kudos
PI's file receiver channel keeps polling the directory

PI's file sender channel keeps polling the source directory....receiver does not poll.

 it should trigger a program in SAP which was waiting for that file. 

program in the sense RFC or IDOC or PROXY?

Any clues on what can be the simplest solution for this requirement?

it will be a file to RFC/ IDOC/ PROXY scenario.

Former Member
0 Kudos

Thanks Abhishek for correcting me - yes, sender channel that will poll for a file, and then as soon as the file comes, trigger an R/3 program which processes that file. That is a normal R/3 program - no IDOC involved.

So it can either be RFC or Proxy, but I am not sure which would be the cleanest solution, and where to trigger the program.

Do you mean to suggest that we still need to create all message types (both inbound and outbound, even if they r the same structure), then use RFC communication channel to pass through them?

Will PROXY be a better solution in this case?

Thanks again.

former_member472138
Active Contributor
0 Kudos

Hi Aishi,

You can go ahead with File to Proxy. In proxy you can include your program or routine to perform your functionality.

http://wiki.sdn.sap.com/wiki/display/XI/Step-by-stepFTPtoABAPProxy

In the above link you have step by step procedure for your scenario and also you can be clear with what are all the objects to be created in IR and ID.

Regards

Pothan

former_member200962
Active Contributor
0 Kudos
both inbound and outbound, even if they r the same structure

You dont need to create both...you can use the same structure on file and Proxy side...so no mapping.

but I am not sure which would be the cleanest solution

I would suggest PROXY.

and where to trigger the program

The proxy code that you develop in the R3 system should be able to trigger the internal (R3) processes...on the coding part you can check with your ABAP counterpart.

then use RFC communication channel to pass through them?

If you are using Proxy, then it will be XI channel.

Regards,

Abhishek.

Former Member
0 Kudos

Hi,

Another option can be write FM and expose the same as RFC ....

you can call this rfc from PI...

if it is standard one go for RFC/BAPI...if it is some complex and will be processing huge volume of data then as said above proxy will be the best choice..

HTH

Rajesh

rajarshi_muhuri
Active Participant
0 Kudos

Hi Rajesh

You mentioned the RFC approach, I posed a new thread on this topic . COuld the RFC event be triggered without using BPM ?

regards

rishi

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>> COuld the RFC event be triggered without using BPM ?

Yes RFC event can be triggered without BPM.