Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


EXAMPLE CASE: 

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

...

Info
titlePREREQUISITES:
  1. Interface name and namespace
  2. Message after conversion to flat format (by adapters modules) must be available in SAP PI / PO persistence. 
  3. Existing 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  and create a new object definition providing followind 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 The name and  and the namespace should  should be exactly the same as in the ICO of the interface. Check the Receiver Interfaces tab of the ICO. 



    Alternatively, it can be checked it in PI Message Monitor:  



     
  3. Go to Object Variables  and Variables and define variables names and  and descriptions. Unlimited You can declare an unlimited number of variables can be declared. Always try to give the variable a meaningful description. 
    The  The variable will be used to find message 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 , check the Variable processing section section.   Be aware that for contructing constructing XPath Expressions for flat files files, you should use Expression language for flat files should be used.




  5. Add Additional Parameters:

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

    log.condition - used  used to define the interface type i, e.eg., 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 to flatit will be visible as 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: 


    Make sure
    Ensure that the Interface Name and Namespace in you int4 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. 
    Flat 
    The flat version comes with the Log version status. Message versions with Log version status can be fetched only if the the 2437778 SAP note  note is installed. Before reaching out to your basis check 
    , check the full complete list of support packages containing this note:  https://launchpad.support.sap.com/#/notes/2437778
    Anchor
    ref_caption
    ref_caption


    For getting message versions with with Log version status It is status, it is required to use caption values i, e.eg., flat, AM, etc.
    Fill in the additional parameters. Set flat flat as the PI: Message Version after processing parameter  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 to determine determining alternative rules for the specified fields i, e.eg., Warning or  or Ignore.
    Again for these XPath Exceptions, Expression language for flat files should be used.

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

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

    .

  10. Test case execution reults:

...