Show TOC

Function documentation Creating a Payload Locate the document in its SAP Library structure

Use

In both the inbound and outbound cases it is useful to be able to access the payload. Note the following two cases:

·         You only need the payload after you have sent the message, or once you have received it (for example, to archive the sent message).

·         Before you send the message, you need to know what the payload looks like (for example, because you want to identify the receiver in advance and the receiver depends on data in the payload).

Activities

Calling the payload after you have sent or received a message

You can have the system return the payload of the message on both the inbound and outbound side. Use the controller object methods to do this:

1.       Using the factory class CL_AI_FACTORY,  generate a controller object.

2.       Once you have called an outbound proxy, use the methods GET_OUTPUT_PAYLOAD and GET_INPUT_PAYLOAD of this object, to make the system return the payload of the output and the input message (the latter is only relevant for synchronous outbound interfaces).

3.       You can access the payload of the input message as part of inbound processing. Use the interface controller parameter to fetch the payload using the method GET_INPUT_PAYLOAD. To call the payload for the outbound message, use the method create_parameter2xml() of the factory class (see the next section).

Calling the payload before sending a message

You can create the payload of a message using the method create_parameter2xml() of the factory class CL_AI_FACTORY (also see report SEI_PROXY_01).

 

 

 

 

Leaving content frame