cancel
Showing results for 
Search instead for 
Did you mean: 

route-through processing plus extended receiver determination

Former Member
0 Kudos

Dear experts, the scenario is:

Web app. (http or soap) -> PI -> File

Depending on some "account number" (can be given by the sender as a http-header or soap-header), the receiver must be looked up (by an RFC).

But the payload is non-XML (txt) and shall be routed through as-is, without being changed.

In which steps could this be done?

One idea was:

  1. Use ASMA (adapter specific message attribute), e.g. XHeaderName1 (if SOAP, or accordingly for http), to supply the account number
  2. And embed the non-xml payload in a trivial XML-message, so that a mapping can be used in the next step
  3. Use UDF (user defined function) and RFC lookup in receiver determination's message mapping. The UDF pulls the account number from context into the message mapping and the RFC gets the receiver.
  4. BUT - the file adapter puts the XML file, not the txt-payload desired. Any help for this file adapter/payload issue?

Any other ideas, or is this a valid approach? 'To map or not to map' - this is here the question.

Thanks, Rolf

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Couple of comments:

In which steps could this be done?

One idea was:

  1. Use ASMA (adapter specific message attribute), e.g. XHeaderName1 (if SOAP, or accordingly for http), to supply the account number

This is fine, you can use XHeaderName1. Keep in mind to enable ASMA and enter a value for XHeaderName1

And embed the non-xml payload in a trivial XML-message, so that a mapping can be used in the next step

If you can send it as an attachment, there is no need to embed the document. Sender CC should have Keep Attachments option checked and Operation Mapping should have Read Attachments checked.

Use UDF (user defined function) and RFC lookup in receiver determination's message mapping. The UDF pulls the account number from context into the message mapping and the RFC gets the receiver.

This is needed to get the value of XHeaderName1.

BUT - the file adapter puts the XML file, not the txt-payload desired. Any help for this file adapter/payload issue?

If the payload was sent as an attachment, you could simple use payloadSwapBean to swap the payload. See an example in the thread below:

http://scn.sap.com/message/13806725#13806725

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mark ,

thanks! Will check and give you points.

Best regards,

Rolf

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mark,

it works the way you said.

We found it easier to give the account number within the soap body, as a regular element in the payload. Hence no need for the UDF discussed. Extended receiver determination and payload swap do the job.

Thanks again!

Rolf