Skip to Content
avatar image
Former Member

Standard xml structures for Event Massage and Event Handler Creation

Hi,

Like EHPOST1 and EVMSTA02 are there standard xml formats avaiable which EM can read inorder to create handlers and messages. One of the source systems in our client's landscape can only send xml and not IDOCs and we are looking at ways to avoiding using SAP-PI.

Regards,

Affan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Oct 17, 2014 at 07:52 PM

    A couple of ways to approach this Affan,

    1. You can get the source system to generate an EHPOST or EVMSTA IDoc in XML format. An Idoc is just a structured flat file and traditionally it's positional in nature. The XML format is also a flat file but delimited with the tags as per XML standards - That way all you need to do is have the partner profile set up to use an XML port and drop the XML file in that directory and call EDI_DATA_INCOMING and you are done. We have done this many times quite easily.
    2. SAP NW PI is an option to take XML and convert it to the BAPI - I would convert it to the IDoc and not the RFC call due to error handling capabilities that exist around the IDoc and not the RFC
    3. If you like pain 😊then you can get the source system to send an EPCIS (Electronic Product Code Information system) compliant XML message to SAP NW PI and it will do the mapping to EM for you - With this option, traditionally used in the serialized items process, you will have to do quite a bit of customization and development in EM

    The order above is in the order for consideration. If 1 is not an option then do 2...

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Kevin,

      Could you please shed some light on EPCIS to PML conversion or mapping in PI system.

      Thanks

  • avatar image
    Former Member
    Oct 17, 2014 at 07:27 AM

    Hi Affan,

    Normally, the clients will have an adapter tool (SAP XI or Webmethods or Gentran etc as mentioned by Debabrata Mohanty) to convert the XML and call EM RFC  /SAPTRX/BAPI_EH_POST & /SAPTRX/BAPI_EHADDEVENTMSG_02 to post the data.

    If the data is directly coming as XML structure then you need create a directory to place the XML file in SAP EM server, then use functional module IDX_IDOC_TO_XML to convert XML to IDOC EHPOST01 & EVMSTA02.

    The below functional modules will help you to do this.

    IDOCS_OUTPUT_IN_XML_FORMAT

    IDOCS_OUTPUT_VIA_XML_HTTP

    IDOC_INBOUND_XML_SOAP_HTTP

    IDOC_INBOUND_XML_VIA_HTTP

    IDOC_XML_DISPLAY

    IDOC_XML_FROM_FILE

    IDOC_XML_TRANSFORM

    IDX_IDOC_TO_XML

    IDX_XML_TO_IDOC

    SDIXML_IDOC_TO_SCHEMA

    SDIXML_IDOC_TO_TEMPLATE

    TABLEFRAME_IDOC_XML1

    TABLEPROC_IDOC_XML1

    Source:

    XML to IDOC conversion done by many clients and there are many discussions in SCN as well.

    You can check and let us know the outcome.

    Regards

    GGOPII

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2014 at 04:22 PM

    Hi Affan,

    I do not think we have any standard XML structures related to SAP EM. (Or I do not know probably)

    But also, I do not understand why would you need that ?

    For Event handler (EH) creation, your source system (Application system) should have Application Interface and  /SAPTRX/EVENT_MGR_COMMUNICATE can be invoked to transfer the extracted EH data.

    For event messages, /SAPTRX/BAPI_EH_ADDEVENTMSG_02  can be invoked from the reporting system. Its pretty straight forward if source reporting system is a SAP system.

    PI is generally required when the communication is done between a 3rd party (e.g non-SAP). Webmethods is also a very commonly used method for 3rd party communication.

    It would help if you can let us know what system will be reporting the event messages ? SAP or non-SAP ?

    Thanks,

    Deb

    Add comment
    10|10000 characters needed characters exceeded