Skip to Content
avatar image
Former Member

SAP-PI - RFC call to SAP backend system


my scenario is as follows:

I want to implement a RFC-call in SAP-PI to my backend SAP-system

(Receiver system for the IDoc) in order to insert a new entry in a z-table

in the backend system. This will be done by implementing an RFC-enabled

function module in the backend system. If the RFC-enabled FM returns an

exception I want to temporarily set the IDoc in PI "on hold".

After some time (for ex.30 min) I want to try to perform the RFC-call again.

If the RFC-enabled FM in the backend system this time does not return any

exception, then the processing of the IDoc should continue in PI, i.e the IDoc

should be transferred to the receiver system.

In the SAP-PI documentation in URL

it is written:



When a mapping program is executed on the Integration Server, the lookup API

calls the required application system by using the central Adapter Engine.

(Graphical presentation)

The call is synchronous. This means that the adapter called returns the result of

the call immediately (not represented in the graphic).



My questions to this forum are as follows

1) Does "synchronous call" in the context above concrete mean that the adapter is

waiting for the completion of the RFC function call to the SAP application system,

before it gives the control back to the mapping program via the lookup API?

2) If so, is it possible to implement an error handling in the mapping program (or the

lookup API) if the RFC call returns a negative result?

3) If so, can this error handling in the mapping program (or the lookup API) - in case

of negative result from the RFC function call - temporarily put the inbound IDoc from

the sender (i.e from the external world) "on hold" in order to be re-processed again


4) If so, is it possible to "trigger" the re-processing of the IDoc in PI by a signal from

the backend SAP application system?

If so, how do I give this signal to PI from the backend SAP system in the best way?

Could it be done with a RFC function call from the SAP application system back to PI;

i.e is it also possible to retrieve RFC-calls in PI, not only send RFC-calls?

Or would it be better to "schedule" a program in PI which tries to repeat the RFC function

call for IDocs "on-hold" due to failure in previous RFC call? If so, how do I schedule

such a program in PI?

Kind regards

Viveka Schwartz

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Nov 26, 2008 at 07:05 PM

    hi Viveka,

    This scenario can be implemented easily using a ccBPM. You can loop and call the RFC, if error is returned, wait for 30mins and again try. If sucess response, post the IDoc.

    Without using ccBPM and only using a mapping lookup it will be difficult to do this. Again if you try to wait inside the mapping to try again after 30mins, timeout error will come.

    Otherwise if in the lookup is returning error, send the data to a temp folder, pick it after 30mins and retry. If success, sent the IDoc. You may use content based routing for this.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Arun,

      thank you very much for your answer.

      I have in the meantime tried to find out how to implement an "activity step" (as we call it in workflow) in the ccBPM BPEL Process Editor, in order to implement a RFC-call to a function module in the SAP backend system (ERP). As far as I can see in the documentation there is no such process type for this type of activity.

      There is a wait-step as you say, but how can I implement a call to a function module in the process in PI / XI ?

      Thank you once again..

      Kind regards