cancel
Showing results for 
Search instead for 
Did you mean: 

Executing a message map based on result of execution of another map

Former Member
0 Kudos

Hi,

My requirement is to execute a message map based on the result of execution of another map. The second map should be executed only if the first map is successful (the first map is a synchronous call and it will return "Error" in one of the response fields if the synchronous call was not successful). So the second map should not be executed when the first map returns "Error" in the response field. Does anyone have an idea about how this can be done? Both the maps use the same source structure and different target structures.

Also, is it possible to have a global variable whose value wil be retained across different message maps? Both the maps use the same source structure and different target structures. I need the value of the global variable to be maintained for the execution of both the maps for the same source file. And then the value needs to be reinitialized before the maps process the next source file.

Thanks..

Accepted Solutions (0)

Answers (2)

Answers (2)

moorthy
Active Contributor
0 Kudos

Hi,

The first map if of type RFC lookup ??? If so get the response back and in the second mapping check for the value. After first mapping, just check for the field value, if it is an error, then map to some dummy constant and proceed. Else map all the fields as required.

another option is using BPM.

Rgds,

Moorthy

Former Member
0 Kudos

Hi Murthy,

The first mapping is not an RFC look up, but something similar, inserts data to an ECC table using a BAPI (RFC adapter sync). I have a message mapping for the response. But then how do I check a field in the response message structure of the first map from the second map? The response message structure of the first map and the source structure of the second map are different.

Regards,

Sarah

moorthy
Active Contributor
0 Kudos

Currently what is happening for Response message structure? this will give with Error or no error right? If so, what you need to map for the Second Map?

Something different i,e what data you need to pass for second mapping if the response is success? If it is original input , you need to pass for 2nd map, then you need to go for BPM and you can proceed. Else if you want to map just a response structure into 2nd map, without BPM you can try out. (Also note that, you can make use of conditions in the Interface Determination)

Hope this helps,

Rgds,

Moorthy

justin_santhanam
Active Contributor
0 Kudos

Sarah,

The first thing about global variables. Global variables can't be used across message mappings. Since I tried this option i'm sure its not possible.

Are you using any BPM? If yes then issue is solved. Based on the payload value of the synch call you have to decide shall I execute the next mapping or not? Am I right, reply for further discussions.

Best regards,

raj.

Former Member
0 Kudos

Raj,

Am not using BPM. Is there a way to do it without using BPM? If BPM is the only option, can you pls elaborate on how it can be done?

justin_santhanam
Active Contributor
0 Kudos

Sarah,

I'm not aware of doing other than BPM. If you want the BPM Steps, Please refer below

Step 1 : Receive

Step 2 : Transformation

Step 3 : Send (Syncronous call to the target system)

Step 4 : Switch(Check the Payload value as per your reqmt)

Step 5 : Transformation(Switch : False ,If the payload value is not ERROR)

Step 6 : What you wanna do ( Switch :True)

If you want more technically, then let me know the source and target systems, I will help you to design

the complete flow.

Best Regards,

raj.