Versions Compared

Key

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

Anchor
XPath
XPath

USE: 

In most cases, eCATT recordings will be added to the test case repository to support interface postings that require manual actions (and are typically done by users). Usually, these manual steps generate new business documents in the SAP back-end system. These document numbers must be passed to the following interface test cases in the process chain. For this purpose, the IFTT variables concept is used. The next test case, in which Parent ID points back to the eCATT step, will have values passed by variables declared during ECATT configuration object creation.

Extracting values from the eCATT log

SAP eCATT stores a special log after each script execution. The logs are accessible through SECATT transaction, and they contain all system responses:

The sample eCATT log of scipt execution that creates outbound delivery

Technically, the log is stored in the SAP system as an XML message. The native XML content can be displayed by executing function module ECATT_LOG_SHOW_PARAM_XML report and entering the eCATT execution number. As already mentioned, in most cases, there is a need to pass the number of documents created during an eCATT test case execution to the following test cases. Usually, standard SAP transactions return the document numbers through system messages (as presented on the screenshot). If not, it is possible to read them during eCATT recordings (instruction GET). To fill the variable with such document number first, we need to define processing parameters for the variable. When we define the variable processor as ECATT_LOG we need to add an Xpath as the processing parameter. 

The Xpath's task is to point to the exact location of the value we want to pass in our declared variable. Take a look at some basic XPath syntax rules: 


The XPath for standard SAP message should have following syntax:

...

Z is Parameter number (1,2,3,4)

The main node, GuiScripting, is common for all eCATT logs. Other node names are visible in the tree structure using the regular eCATT log viewer.

Example:

to fetch delivery number that was created by tcode VL01:

...