cancel
Showing results for 
Search instead for 
Did you mean: 

How extract XML payload from integration engine using Java?

gopalkrishna_baliga
Participant
0 Kudos

Hi Experts,

  I want to pull PI XML payloads for my interfaces from integration engine using a Java program.

  Is this possible? Can somebody give sample Java program for the same?

  My scenario:

  SAP R/3 --> IDOC --> PI ---> JMS --> BizTalk.

   Now I want to get the IDOC XML that has come in PI  from Integration engine.

   Please help.

Thanks

Gopal

Accepted Solutions (0)

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos

Hi Gopal,

The table that contains the XML message is SXMSPMAST.

Also this document can be useful for you, altough is not java access, http://scn.sap.com/docs/DOC-3746

To read PI table during the mapping check this thread http://scn.sap.com/thread/1333614

When exactly do you want to read the ABAP PI tables?

Regards.

gopalkrishna_baliga
Participant
0 Kudos

Hi Inaki,

   I want to extract the message XML payload and store it in a file shared folder. The end user needs this file for some comparison.

   SXMSPMAST is available only in ABAP stack. Hence I think if my PI scenario contains any ABAP based adapter (PROXY or IDOC) or non AAE then only it will store the message in SXMSPMAST.

   If my PI scenario uses only Java adapters or Advanced Adapter Engine (AAE) will then also the message be stored in SXMSPMAST? For example if I have IDOC to Proxy  using AAE.

iaki_vila
Active Contributor
0 Kudos

Hi Gopal,

If you are talking about Integration Engine, the message will go to ABAP stack. If you use for example the ICO object, not ABAP stack is involved but the problem is other and you will need to acces to the java dictionary. Also you need to have the trace level enabled in order to have stored the data in the PI tables.

Regards.

gopalkrishna_baliga
Participant
0 Kudos

Hi Inaki,

   If my scenario does not use ICO or AAE and both outbound and inbound side adapters are Java based then will PI payload be still stored in ABAP stack table SXMSPMAST? or will it store in Java stack only?

  When I use AAE or ICO (integrated configuration object) then ABAP stack is not used and hence I will not be able to use table SXMSPMAST.

  In this case, how to access Java dictionary tables to extract PI message payload?

And what are the Java tables I need to query? Is there any sample code?

Thanks

Gopal

iaki_vila
Active Contributor
0 Kudos

Hi Gopal,

As far as I know the table is BC_MSG. You can check some SQL setences in this wiki http://wiki.scn.sap.com/wiki/display/XI/PI+Adapter+Engine+Troubleshooting+SQL+Statements

Respect how to extract the information, if you dont need the data during runtime, you can create a new scenario PROXY - JDBC scenario to extract the data.

Regards,

gopalkrishna_baliga
Participant
0 Kudos

What about synchronous scenarios? As i know Sync messages are not persistent in DB and that is why we cannot resend them. In this case will the Sync message Payload be still stored in ABAP Stack or Java Stack?

Thanks

Gopal

iaki_vila
Active Contributor
0 Kudos

Hi Gopal,

You are right, sync messages are not stored in DB, they are only in memory.

However, in this thread, says that is possible in PI 7.31 http://scn.sap.com/message/13923625#13923625,, i haven't checked it.

The reason because they can not be resend, i think, it is by its idiosincrasy, the sender cant be waiting eternally.

Regards,

Former Member
0 Kudos

If my scenario does not use ICO or AAE and both outbound and inbound side adapters are Java based then will PI payload be still stored in ABAP stack table SXMSPMAST? or will it store in Java stack only?

It will store in SXMSPMAST table only , in this case..

Regards,

Krishna