Skip to Content

Recommendations about mapping lookup

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,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 16, 2016 at 12:49 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded