Outbound Flat File scenario with 'PI Outbound' interface testing


EXAMPLE CASE: 

Testing end-to-end an EDIFACT order confirmation - from IDOC generation in ECC backend till final outbound file. 


PREREQUISITES:

  1. Interface name and namespace
  2. Message after conversion to flat format (by adapters modules) must be available in SAP PI / PO persistence. 
  3. An existing inbound test case that will generate a message in the backend or inject a message into SAP PO

PROCEDURE: 


  1. Go to transaction /INT4/IFTT_CONF and create a new object definition providing the following data:  
    1. Object Definition ID 
    2. Description
    3. Name → name of the tested interface 
    4. Namespace → namespace of the tested interface
  2. The name and the namespace should be the same as in the ICO of the interface. Check the Receiver Interfaces tab of the ICO. 



    Alternatively, it can be checked in PI Message Monitor:



     
  3. Go to Object Variables and define variables names and descriptions. You can declare an unlimited number of variables. Always try to give the variable a meaningful description. The variable will be used to find messages generated by the previous test case.
     
  4. After selecting a single variable, move to Variable Processing. Here you define actions for every variable declared in the previous step. For more specific information, check the Variable processing section. Be aware that for constructing XPath Expressions for flat files, you should use Expression language for flat files.




  5. Add Additional Parameters:

    PI Message Version after processing is the parameter that allows defining which version of the message should Int4 IFTT fetch from PI persistence after test case execution.
    Messages to be persisted are defined in ICO advanced settings on SAP PI. However, in this particular scenario, we would like to obtain the message version at the stage of being processed by the adapter. 
    This setting can be done by setting up localejbs/AF_Modules/MessageLoggerBean module in the receiver communication channel Module tab. 

    log.condition - used to define the interface type, e.g., for asynchronous interfaces, this value should be set to 1.
    log.location - user defined parameter - it is used  to distinguish the version of the message in PI Monitor. If set to flat, it will be visible as a Log version with the caption: flat. 

    For more details on this particular module configuration, check this blog:  https://blogs.sap.com/2012/11/06/message-staging-and-logging-options-in-advanced-adapter-engine-of-pi-73x/




  6. After processing the message, the new flat version should be visible in PI Monitor as in the example below: 



    Ensure that the Interface Name and Namespace in your Int4 IFTT object configuration are the same as the values in the message monitor for the "flat" version of the message. 

    The flat version comes with the Log version status. Message versions with Log version status can be fetched if the 2437778 SAP note is installed. Before reaching out to your basis, check the complete list of support packages containing this note:  https://launchpad.support.sap.com/#/notes/2437778

    For getting message versions with Log version status, it is required to use caption values, e.g., flat, AM, etc.
    Fill in the additional parameters. Set flat as the PI: Message Version after processing parameter value ( or whichever version name was set in the log.location parameter of the CC ).



  7. Define XPath Exceptions. By default, all differences in values are treated as errors. Xpath Exceptions allow determining alternative rules for the specified fields, e.g., Warning or Ignore.
    Again for these XPath Exceptions, Expression language for flat files should be used.

  8. Create a test case in relation to the already existing inbound test case that would trigger an outbound message. 

  9. To assure that the outbound test case will run correctly, it must be run together with the related test case defined in the pre caseID column. Highlight both test cases by selecting them with CTRL and press Execute Selected. 

    .

  10. Test case execution results:








© 2017 - 2022 Int4 AG All rights reserved