cancel
Showing results for 
Search instead for 
Did you mean: 

Pass Request message Value To Response message

Former Member
0 Kudos

Hi Experts,

I have a requirement to pass a value from request to response

I have successfully achieved this using below blogs

Actual Requirement : Client is asking to send the value back in response even in the case of message mapping error, lets says if a condition fails due to bad/wrong value that value should be passed on to response and send it back to client

When message mapping error occurs, message processing stops and does NOT go further till RFC receiver channel to execute put and get payload beans modules

How do i achieve this

Is there anyway where i can check value and if it is wrong pass it immediately to response with out sending it further to receiver channel

https://blogs.sap.com/2013/03/20/insert-value-from-request-message-to-response-using-getpayloadvalue...

https://blogs.sap.com/2015/08/28/copy-value-from-request-message-to-response-message-using-dynamicco...

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member190293
Active Contributor
0 Kudos

Hi Gaurav!

In case of sync-async bridge is used you can try approach when you check required field's value in Receiver determination and if it's wrong - send message to separate receiver with its own message mapping to build fault data response. And you use communication channel for that receiver in which you add NotifyResponseBean module and remove default module. Thus you close synchronous request with fault response.

Regards, Evgeniy.

former_member190293
Active Contributor
0 Kudos

Hi Gaurav!

What is your scenario type? Is it synchronous or do you use async-sync bridge?

Regards, Evgeniy.

Former Member
0 Kudos

Hi,

Yes standard synchronous, Rest to IDOC

Thanks

former_member190293
Active Contributor
0 Kudos

Hi Gaurav!

IDoc is asynchronous interface by default. Or do you use SAP built-in webservice for posting?

Regards, Evgeniy.