cancel
Showing results for 
Search instead for 
Did you mean: 

Recommendations about mapping lookup

former_member226216
Participant
0 Kudos

Hi experts.

I heard that it is not recommended to implement lookup in java mapping if something is written to a receiver system during lookup. They say it is not guaranteed that mapping will be run only once during message processing.

If it is really true then I would like to see the source of these recommendations from SAP. Could you please suggest something?

Best regards,

Andrey

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member190293
Active Contributor

Hi Andrey!

I couldn't find recommendations from SAP itself, but I read the blogs describing these constraints.

Let's imagine, that we have asynchronous scenario with message mapping at receiver side in which some kind of lookup is used. And this lookup changes some data in a sided target system. During message processing something went wrong while delivering to receiver (connection issue, for example) and message failed. But your message mapping has been successfuly proccessed and data was changed in target system by lookup. What PI is gonna do? Yes, it tries to process that failed message again (as it's in asynchronous mode) and all the steps are repeated including message mapping execution. Thus, you get second data change by lookup.

Even if you use synchronous communication and it fails somewhere after processing message mapping step you'll get the same result. When sender sends request again (as previous was unsuccessful) data in target system is changed again.

Of course, if you're quite sure that this repeating data change won't affect target system data consistency(for example, it will just update existing data with the same values), you can proceed with such lookup functionality, but it's definitely not a good practice.

Regards, Evgeniy.