Skip to Content
0

Pass Request message Value To Response message

Sep 21, 2017 at 01:28 AM

64

avatar image
Former Member

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-getpayloadvaluebean-and-putpayloadvaluebean/

https://blogs.sap.com/2015/08/28/copy-value-from-request-message-to-response-message-using-dynamicconfigurationbean-and-dynamic-header-fields/

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Evgeniy Kolmakov Sep 21, 2017 at 09:00 AM
0

Hi Gaurav!

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

Regards, Evgeniy.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi,

Yes standard synchronous, Rest to IDOC

Thanks

0

Hi Gaurav!

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

Regards, Evgeniy.

0
Evgeniy Kolmakov Sep 22, 2017 at 07:26 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded