cancel
Showing results for 
Search instead for 
Did you mean: 

Converting entire IDoc structure into a single field in using XSLT in SAP PI

Former Member
0 Kudos

Hello experts,

I have a scenario Idoc-PI-SOAP, I need to supply the entire IDoc data into a single target field. In addition to this I have added customized headers using XSLT mapping

I am stuck at the point of converting the IDOC structure into a single field using the same xslt

Please suggest some options

Regards,

Sushant

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Friends,

Thank you for all your support, the requirement was achieved by using "string as xml" and the SOAP protocol was changes to SOAP 1.1.

Regards,

Sushant

Answers (5)

Answers (5)

former_member186851
Active Contributor

You can introduce a simple message mapping with "Return as XML" option followed by XSLT to add the required header.

former_member190293
Active Contributor

Hi Sushant!

You can read input payload into string in java mapping, create another string for your output payload, concatenate that strings and send to Output stream.

Regards, Evgeniy.

Former Member

Hi Raghuraman,

I have tried the option, both the mappings are executed individually and the resultant xml is either just the xml header or the main paylaod, but I need a result in which the payload is appended to the header but the results are varying as described above.

Regards,

Sushant

iaki_vila
Active Contributor
0 Kudos

Hi Sushant,

Have you checked this wiki

https://wiki.scn.sap.com/wiki/display/XI/Whole+Payload+to+a+XML+field

?

Regards.

Former Member
0 Kudos

Hi Inaki,

Thank you for your reply.

The link provided by you deals with handling input payload and converting the same into string, but I need to achieve the payload as a string along with that need to add desired SOAP headers, will attach the same herewith.soap-header-as-required-by-the-target-service.png

Regards,

Sushantsoap-header-as-required-by-the-target-service.png

Former Member
0 Kudos

Hi Evgeniy,

Thank you for your response,

Can you please elaborate on the same, Just to clarify in case of any misconceptions.I need to achieve a desired SOAP header and the input IDoc needs to be populated into in single field as a string at the target side, for the same I have used xslt mapping to achieve SOAP header and I have been successful in doing that and using "String as xml" I have achieved the other thing using graphical mapping but I am facing difficulty in concatenating the two mappings, Please help me,if the same can be achieved with JAVA mapping

Regards,

Sushant

former_member186851
Active Contributor
0 Kudos

Hello,

You wish to add the content in soap header?

If you wish to add it in a field in body you can use graphical mapping first then XSLT in the Operation mapping.

You can refer the link shared by Inaki.

Former Member
0 Kudos

Hi Raghuraman,

I wish to add the content in the SOAP header, as you mentioned have tried all the possible mapping in IM, but no success.

referred to the link provided by Inaki, but it just helps to achieve one of my requirements of accepting string in a single field

Regards,

Sushant