cancel
Showing results for 
Search instead for 
Did you mean: 

SAP-PI - fundamental question

viveka_schwartz3
Explorer
0 Kudos

Hello,

SAP-PI is defined as a middleware when reading about it on internet. However, it is difficult to find a simple picture and a simple explanation on how PI relates to SAP Web AS.

Is the SAP-PI a kind of application (as CRM, BI etc) founded on a SAP WAS platform installed on a separate server?

If so, does SAP-PI have its own SAP-database where it stores an inbound IDoc before it transfers it further to the SAP backend system?

If so, could an ABAP-based program exit be implemented in SAP-PI in order to perform some customer specific coding based on the incoming IDoc from an external partner, before the IDoc is further transferred by PI to the SAP backend system?

Example, I would like to implement a customer specific coding in order to update a customer table in the SAP backend system, as soon as the IDoc has arrived to PI from the outside world - but before the IDoc is transferred further to the SAP backend system. What kind of "user-exits" do I have in PI to do that? Do I have things like "CMOD user-exits", BAdis, Message control configuration, ABAP Workbench in the PI system itself?

Kind regards

Viveka Schwartz

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Is the SAP-PI a kind of application (as CRM, BI etc) founded on a SAP WAS platform installed on a separate server?

Yes. But common WebAS can be there need not to install separate Web AS server

f so, does SAP-PI have its own SAP-database where it stores an inbound IDoc before it transfers it further to the SAP backend system?

PI is having database but that can be shared DB to other sap systems in your landscape. SAP PI is not build to hold data its based on message bus/hub concept. It will pass data from source to sender. So cannot be considered as storage for data.

If so, could an ABAP-based program exit be implemented in SAP-PI in order to perform some customer specific coding based on the incoming IDoc from an external partner, before the IDoc is further transferred by PI to the SAP backend system?

PI systems are mostly defined as integration server and so its not used for ABAP coding. Its always recommended to use the source or target system for application/business logic using ABAP/Java

Looking at your example.

PI can receive your IDOC and before sending to target system you can do certain operations like some data validation. Connection to a database and retrive some values to be pushed to target etc. Do validation making JCo call to SAP database etc but not exactly CMOD user exit, BAdi or control operation.

These operations you can do using certain PI processes like RFC to the system where data exist. ABAP proxies which allow you to do coding before pushing data to SAP backend

Moreover tu suit your example requirement using PI

You can do

IDOC ->PI -> ABAP(Proxy) proxy you need to write on target system

or

IDOC -> PI(BPM) -> SAP system

from BPM (RFC,ABAP proxy SYNC)

Thanks

Gaurav

Answers (4)

Answers (4)

viveka_schwartz3
Explorer
0 Kudos

Hello again,

In one of the links from Patrick it is written:

INTEGRATION

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).

**

Question:

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?

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?

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 external world "on hold" in order to re-process it again later?

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 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?

Thanks again...

Regards

Viveka

viveka_schwartz3
Explorer
0 Kudos

Hello Gaurav, Björn and Patrick,

thank you very much for your answers.

Patrick, the architecture picture in one of your links to the documentation is great. Also Gauravs detailed answers are very helpful. Björn if I understood your answer correct, it was more about how to manipulate the content of the IDoc and how to add own values to the IDoc, which is also helpful to

know and might be needed in the project as well.

I keep the track open for another week to see if more ideas drops in.

Kind regards

Viveka

Former Member
0 Kudos

Hi,

> Is the SAP-PI a kind of application (as CRM, BI etc) founded on a SAP WAS platform installed on a separate server?

Yes.

> Example, I would like to implement a customer specific coding in order to update a customer table in the SAP backend system, as soon as the IDoc has arrived to PI from the outside world - but before the IDoc is transferred further to the SAP backend system. What kind of "user-exits" do I have in PI to do that?

You could use for example a mapping look up:

http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm

or Integration Processes:

http://help.sap.com/saphelp_nw04/helpdata/en/3c/831620a4f1044dba38b370f77835cc/frameset.htm

Regards

Patrick

Former Member
0 Kudos

Hi,

your requirements to add user definied values to an IDOC can be solved by XI/PI. But normally you do not use a user exit but a mapping in the XI enviroment. In your example you need a IDOC 2 IDOC scenario. In the XI you do a mapping from the customer IDOC Version to your own IDOC Version (maybe with an enhancement structure). This mapping can be graphical mapping (tool provided by XI), an XSLT mapping or a java mapping.

Regards,

Björn