Skip to Content

How to read Application Message ID in Integration

Hi Experts,

I am trying to read/get the Application Message ID in Integration.I have seen some standard mappings and they were built with UDF mapping. I am unable to import that in the Iflow. Please give me any standard solution for it. Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    May 08 at 09:51 AM

    Hello Imran,

    If I am not wrong you are looking for AppicationId not message id(mpl Id).

    ApplicationId can be read using below header (badically this id can be set manually and message can be searched in MessageMinitoring).

    ${header.SAP_ApplicationID}

    Regards,

    Sriprasad Shivaram Bhat

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Sri,

      I can see some other value(Idoc Num) with that property you have given. But i didn't get the Application Message ID that we can see in Message Monitoring.

  • May 06 at 05:05 PM

    Hello Imran,

    The below code simple expression should help:

    ${property.SAP_MessageProcessingLogID}

    or you could use below UDF for the same.

    import com.sap.it.api.mapping.*;
    
    //Add MappingContext as an additional argument to read or set Headers and properties.
    
    def String customFunc(String input_date,MappingContext context){
            //Read property Value and store it in String
        String propVal = context.getProperty(SAP_MessageProcessingLogID);
        propVal_Str = propVal.toString();
        return propVal_Str;
        
    }

    ref:

    https://answers.sap.com/questions/265499/retrieve-messageid-in-custom-function.html

    Hope this helps!

    thanks and regards,

    Praveen T

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 07 at 03:05 PM

    HI Imran,

    If you want to read Application Message ID in your Integration flow without mapping or UDF then y

    ou can simply create an header in content modifier with ‚ÄúSAP_MessageProcessingLogID‚ÄĚ as value and use it.

    contentmodifier.jpg

    /Mehar

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Mehar,

      I tried with the key word you have given but it is also giving the Message ID Only. But i need Application Message ID. I tried by taking the keyword in Content Modifier with the type as Constant, it is not producing anything. If i changed the type to header, it has produced the Message ID. But i require the Application Message ID. Attached the screenshot.

      app-id.png

      app-id.png (12.2 kB)
  • May 08 at 09:28 AM

    Hello Imran,

    Can you please name the standard Integration package name or standard Integration flow name along with message mapping name where you have observed getting the Application Message ID?

    Regards,

    Naresh

    Add comment
    10|10000 characters needed characters exceeded