Skip to Content

In this post I have described how the process works to receive an inbound event message using ES, AIF and how to re-process the failed event messages.

Scenario


/wp-content/uploads/2014/08/processflow_512498.png

Abbreviation

FWO: Forwarding order

TO: Freight order / Transport order

FU: Freight unit

TU: Trailer unit

Using SAP EM Enterprise Service  TrackedProcessEventNotificationCreateRequest_In events are posted in EM. SAP PO/PI service interface and interface mapping required from PI/PO end.

SAP AIF supports for event message re-processing by changing the event details such as location, event code, tracking id and date /time. Authorisation based on event tracking ID is also promising in AIF but it requires custom development in AIF.

Security roles for business users are required to re-process the error event message in AIF. Using event message tracking id, standard EM authorisation is sufficient for accessing AIF monitoring tool.

AIF Monitoring Dashboard selection screen


AIF_SEL.png


AIf_SEL2.png


AIF Event Message re-processing

AIf_MEs1.png


AIF_MES2.png


Data structure space from the right bottom of the AIF dashboard support for event message reprocessing by changing the event details.

AIf_MES3.png


AIF_ERR.png


Structure value turns to yellow colour by default after changing the values.


AIF_yello.png


/wp-content/uploads/2014/08/final_512525.png


Message mapping based on master/ transactional data in AIF is easy to maintain rather than building the complex message mapping in PI/PO or any other integration tools. PI Inbound message  queue can be deleted after the error as it may block the subsequent event processing.

Benefits of using AIF in EM

Event message re-processing

Tracking id mapping and custom business validations

Allowing the business user to re-process the event messages

To report this post you need to login first.

11 Comments

You must be Logged on to comment or reply to a post.

  1. dipak mukherjee

    This is informative.

    Can you tell me in details how EM can be set up for integration with application interface framework which you have shown above. Step by step set up will help  a lot

    (0) 
    1. Erik Bengtson

      I did a similar implementation, here is roughly how to implement it:

      install AIF Add-ons on EM

      install support packs (i faced blocking issues without those)

      Import RFC objects from BAPI (addEventMessage02) in SPROXY

      Create Service Interface using RFC messages

      Create a Proxy for the Service Interface

      in transaction SIW generate AIF code

      using /AIF/CUST and /AIF/IFB, customize structure mappings in /AIF/ (the annoying part), value mappings as you need.

      There are several pain points during the generation of the AIF interface, but you will find the way.

      (0) 
  2. dipak mukherjee

    secondly if a carrier externally sends an event message and in case message fails due to wrong tracking ID/location etc can we use AIF to reprocess the event messages.

    (0) 
      1. dipak mukherjee

        can you provide me step by step config process to have this functionality activated. I hope this needs to be added within EM only and not to any application system?

        (0) 
        1. sukumar perumalsamy Post author

          yes you have to install AIF add on component in EM system not on application system.

          at present no step by step document available …check it in SDN AIF forums …

          (0) 
  3. Kevin Wilson

    I have a couple of points to make here:

    • AIF performs basically the same functions as PI so you don’t in fact need PI in this landscape at all unless it’s your point of entry in to your system from the outside world. You could receive a carrier 214 in Gentran, Gentran can map that to a generic XML structure and pass it to AIF which will in turn map it in to a structure to call the BAPI to add the event message
    • Whenever you suggest that a tool can modify data received from the outside world you should also state that this is bad practice…. If the supplier has sent you the fact that they are sending your shipment to warehouse ABC and you decide to change it to BCD then where is the integrity of the process? The supplier needs to change it on their end and resubmit it so that both systems are in synch. In some cases it’s a compliance issue to manually adjust EDI content and it’s the same in this regard. Be careful when changing data – Reserve this for a support function and understand the business process and ramifications fully before proceeding.

    Michal Krawczyk implemented AIF on our EM server about a year ago and wrote several blogs on the step-by-step setup of it. Check it out on SCN.

    (0) 
    1. sukumar perumalsamy Post author

      Hi Kevin,

      Integrity of the process is defined/driven by business process not based on tools/personal opinions. you don’t need to provide the change option to entire structure of the message, lot of options/authorisations are available to change only to particular data in message.

      Regards

      Sukumar

      (0) 
  4. Abhishek Vasudevan

    Hi Sukumar,

    Thanks for the post.

    Could you please shed some light on what is the difference between modifying the event message through AIF / modifying the IDOCS to process events messages. Lets say i have a customer pre-processing function module like in the above case to validate BP, Location, Freight Order id and tracking ID and every time the details donot match; i fail the IDOC. I could potentially reprocess the IDOC to post event messages. My understanding is that it works in similar ways to modifying IDOCS except that it offers “n” number of selection criteria and authorization as to what data values can actually be modified by the user. Correct me if i am wrong.

    Thanks

    Abhishek Vasudevan

    (0) 
    1. sukumar perumalsamy Post author

      Yes Abhishek your understanding is correct, EM pre-processing FM validation generate invalid event entry in EM table. Using AIF you can stop the event message in AIF and you can get rid of invalid event message entry in table.

      AIF provides business user can able to re-process the message rather than depending on consultants and you can include the business validation and external mapping.

      For application system AIF is useful when the business volume grows and involves more business validation.

      For EM from the day one you will receive more events, for example 1 application document may needed 10 event messages and you can’t process 1000 error event message using idoc and it may require additional resource for support activity.


      ~Sukumar

      (0) 
  5. sukumar perumalsamy Post author

    Hi All,

    Steps to enable ES and AIF for event posting.

    1) import SCMEMSRV 9.0  component in PI/PO

    2) it will automatically generate the proxy class in EM

    3) then enable the sproxy class link to AIF using /AIF/CUST

    4) define new interface name space and mapping, error monitoring configuration and selection screen program for interface .

    5) Use the /SAPTRX/SPOT_SE_EM_SERVICES Enhancement Spot for custom validation

        SAP EM ES Standard BADI

    6) You have to pass the return values of BAPI to AIF to set the message as  processed or park as error event.

    Regards

    Sukumar

    (0) 

Leave a Reply