Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 11, 2017 at 05:30 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 10, 2017 at 08:49 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 10, 2017 at 12:21 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 10, 2017 at 04:57 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 13, 2017 at 04:59 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Raghuraman S

      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

  • Feb 13, 2017 at 06:56 AM

    Hi Sushant,

    Have you checked this wiki

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

    ?

    Regards.

    Add comment
    10|10000 characters needed characters exceeded