cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI 7.4 Message Routing by Attachment

Muru
Explorer
0 Kudos

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

manoj_khavatkopp
Active Contributor
0 Kudos

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

Muru
Explorer
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor
0 Kudos

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

Answers (2)

Answers (2)

Muru
Explorer
0 Kudos

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

Former Member
0 Kudos

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.