cancel
Showing results for 
Search instead for 
Did you mean: 

Synch SOAP scenario - access request data as part of response mapping?

Former Member
0 Kudos

Hello experts,

I have a synch SOAP scenario which is working but I want to improve the error handling.

Under normal situation I send the SOAP request and the remote web service responds with a given message structure which includes my invoice number as a key field. I then create an IDOC with this number and processing is great.

However, sometimes there is an error response from the web service which follows a different message structure and does not include the invoice number 😞

There could be many reasons for this error such as a field was missing or wrong format or even we ran out of prepaid web service calls (this is to get a government approval of invoice which we pay for in groups of approvals).

When they respond with an error I would like to send this information in IDOC to SAP, but I have no invoice number to tie the response to. Therefore the information is kind of useless in ERP. Is there a way in PI for a response message to reference the synchronous request data we sent to the web service in the first place?

Many thanks for your ideas,

-Aaron

Accepted Solutions (1)

Accepted Solutions (1)

Harish
Active Contributor
0 Kudos

Hi Aaron,

If you have the invoice number in the request message then below blog will be helpful

regards,

Harish

Former Member
0 Kudos

Thanks Harish, this is the solution I used and it is working perfectly.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks guys these are super helpful suggestions. I will try some approaches and close the thread when I choose one.

iaki_vila
Active Contributor
0 Kudos

Hi Aaron,

Also you can define static variables

About Mark suggestion you have an interesting Adarsh Dhingra's blog here

I think the better way is to use the Harish approximation because is the solution more standard.

Regards.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Aaron,

In your request mapping use dynamic configuration to place the invoice number and then in your error response mapping use dc to retrieve it.

Regards,

Mark