Start of Content Area

Procedure documentation Adding PayloadSwapBean in the Module Processor  Locate the document in its SAP Library structure


You use the PayloadSwapBean module to replace the application payload of the XI message that contains the business data with another payload that is appended to the XI message as an additional attachment.

The module can be applied in adapters that forward attachments.


You can use the module in the mail adapter for mails with attachments, for example.

More information: Mail Adapter


You have configured a communication channel of type Mail and are on the Module tab page in change mode.


Add the Module in the Processing Sequence


       1.      Enter the module name /AF_Modules/PayloadSwapBean before the module name of the adapter.

For information about where to insert the module, see: Extending the Module Chain for SAP Adapters in the Module Processor

       2.      Under Module Type, enter Local Enterprise Bean.

The default module key is displayed.

Add Parameters in the Module Configuration

       3.      To ensure that the attachment that is to replace the application payload can be found, you must specify a parameter from the MIME header.

Under Parameter Name, enter swap.keyName.

       4.      Under Parameter Value, enter a payload attribute such as payload-name or payload-description, or an attribute from the MIME header such as content-type or content-description.

       5.      Under Parameter Name, enter swap.keyValue .

       6.      Under Parameter Value, enter the value that the attribute is to have.

The MIME headers of the payloads are searched in order and the system takes the first payload that meets the criteria. This payload is swapped with the application payload.


End of Content Area