Skip to Content

Message mapping using system variables

On the ESB in Message Mappings I am moving a Constant value to USERID field e.g. USR01. This is the user we want for Dev, however on Quality system we want to use userid USR02, and on Production USR03.

My question is how do we cater for this in the Message Mapping section of ESB? Bear in mind that none of the other fields in our structure contain the system details. Are there system variables we can use, like in ABAP? If so, then how?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jul 07, 2015 at 08:11 AM

    Hi Glen,

    No need for UDF, just use mapping parameters (string category) and enter the value in integration directory.

    Regards,

    Mark

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 06, 2015 at 03:00 PM

    Hi Glen,

    Here is the sample code for your reference.

    // Assume XID is Dev, XIQ is QA etc

    String sysName = (String) System.getProperty("SAPSYSTEMNAME");

    if(sysName.equals("XID"))

    {

    //your logic here

    }

    else if(sysName.equals("XIQ"))

    {

    //your logic here

    }

    else

    {

    // your logic

    }

    You can pass the values dynamically after determining type of the system (DEV/Quality/PROD) if required.

    Regards

    Venkat

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 06, 2015 at 02:43 PM

    Hi Glen,

    You can take the system name form java code Find physical machine name in Java - Stack Overflow

    and with value-mapping or any lookup to set if that machine is dev, qua or pro.

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 07, 2015 at 06:22 AM

    Hi Glen,

    You can start with Venkat code and link to practice with UDF PI concept. However, i recommend don't hardcode the DEV, QUA and PRO environments directly on the UDF. You can take only the machine name and later use a value-mapping (Value mapping - Process Integration - SCN Wiki). The benefits to use value mapping are the value are configurable on the ID, if tomorrow you basis team change the machine name you won't need to change your ESR in all your environments, you only need to change this value directly in the ID. Summing up, Configurable values should be in the ID and not in the ESR.

    Regards.

    Add comment
    10|10000 characters needed characters exceeded