Skip to Content
0

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

Feb 09, 2017 at 12:30 PM

233

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Best Answer
sushant shinde Apr 11, 2017 at 05:30 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Raghuraman S Feb 10, 2017 at 08:49 AM
2

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

Share
10 |10000 characters needed characters left characters exceeded
sushant shinde Feb 10, 2017 at 12:21 PM
1

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

Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Feb 10, 2017 at 04:57 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
sushant shinde Feb 13, 2017 at 04:59 AM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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.

0

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

0
Iñaki Vila Feb 13, 2017 at 06:56 AM
0

Hi Sushant,

Have you checked this wiki

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

?

Regards.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0