Skip to Content

PI/XI: Quick tip: Preserving attributes of XI messages via MultipartHeaderBean

Imagine a scenario where you’d like to use the same content attribute
that arrived with the sender adapter inside the receiver adapter. This could be
like content disposition (which stores the filename) or content type
(which stores the type of the message which arrived). Inside your mappings
you could use that to set the dynamic configuration parameters for some
receiver adapter but how to access them? It turns out SAP has prepared
a new adapter module – MultipartHeaderBean – which allows doing just that.
The main purpose of the module is to put the attributes of the XI message
into the dynamic configuration parametes which can be easily accessed later on.

How to configure that adapter module:

Basically you need to add the adapter module – AF_Modules/MultipartHeaderBean
to your module processing sequence as shown in the figure below:

and then you need to populate two parameters:

a) requiredHeaders – with value “ALL” to see get all possible attributes

b) dcNamespace – namespace of the sender adapter in which you’re using this module

Now once you start the flow which uses this adapter you will see additional sections
inside dynamic configuration – which you can reuse later on (for example in the mapping).

More details can be found on:
Adding MultipartHeaderBean in the Module Processor


With info about this adapter module together with two articles from Gabriel Sagaya Selvam:

Standard Adapter Framework modules [AF_Modules] in PI 7.1 –Part 1

Standard Adapter Framework modules [AF_Modules] in PI 7.1 –Part 2

you should have a description of all SAP standard adapter modules as for SAP PI 7.11

You must be Logged on to comment or reply to a post.
  • Good ..but does it really deserve a blog?
    You just copied with screenshots whatever is mentioned in help?

    I hope people who come to sdn or those who work in XI should be smart enough to understand something which is mentioned in help.

    • Hi Rahul,

      >>>You just copied with screenshots whatever is mentioned in help?

      not really – as you see
      does not provide a real life example
      and my blogs does 🙂
      and that’s the key difference…

      >>>Good ..but does it really deserve a blog?

      this one is supposed to be an addition to
      what was already posted in 2 blogs which I mentioned. So now we have ALL adapter modules described in the very same way in blogs.

      Some blogs are just for showing people
      that something exits as not everyone reads for every new PI version  – even simple func and this is one of them.

      anyway thanks for your opinion

      Michal Krawczyk

  • Hi Michal,

    May I know how can we contact you online aside from your email or skype? We want to consult you on regarding multipart adapter. Thanks!

    • Hi Kevin,

      my skype ID is : krawczykm
      but till 17.08.2011 I’m on holidays so don’t know if I’m going to have any internet connection

      Michal Krawczyk

  • Good tip!

    Do you know how to do it with HTTP adapter?

    With message mapping, I can set the dynamic configuration with a UDF, passing some payload field to receiver adapter header, but I would like to read sender header and set receiver header.