Skip to Content
avatar image
Former Member

SAP PI 7.4 Message Routing by Attachment

Hello Everyone , We are in SAP PI 7.4 dual stack , working on Soap to Idoc interface . I will be receiving an attachment in the soap call. I have to validate the attachment and route it to the right mapping. Is there any way that it can be achieved .

- Murugavel

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    Hi Manoj , I want to route the message to one mapping if there is an attachment and to the other mapping if there is no attachment. It is my requirement. Is there any way that we can handle it with xpath or context object.

    - Murugavel

  • Can you please be more specific on what exactly you mean by "Validate"?

  • Get RSS Feed

3 Answers

  • Best Answer
    Jul 26, 2017 at 09:08 AM

    Hi,

    Belwo are the approaches:

    • Try to use extended receiver determination and use UDF to check if any ContentID exists then set it to some standard context object then use this context object in Interface Determination.
    • Keep MultiPartHeaderBean as the first module and see which Dynamic attribute has the attachment name then assign that attachment name to standard context object via DynamicConfiguration Bean then use the context object in interface determination.
    • Keep only one straight forward interface having target structure having both the Mainpaylaod and Attachement fileds which you want to use the populate them accordinlgy if the by checking attachement exists or not.

    Br,

    Manoj

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 26, 2017 at 08:22 AM

    make it two interfaces.

    first : web service to SOAP(PI) -- in the mapping perform attachment validation using udf. create one variable(append it to sender xml) which will hold true or false

    second: SOAP(PI) to ECC put xpath condition in interface determination based on the above variable. true--mapping 1, false mapping -2.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 01, 2017 at 09:30 AM

    Thanks a lot , i have fixed this by creating an extended receiver determination. In the Map used for determining the receivers i get the attachment name with a help of an UDF to the soap context object XHEADERNAME1 . Use that for interface determination condition check. It worked perfectly.

    - Murugavel

    Add comment
    10|10000 characters needed characters exceeded