How to trigger Output Control within Outbound test cases?
Outbound application interfaces based on the SAP Message Control can be tested end to end in Int4 Suite by a single test case. Examples of documents that use the output control in SAP S/4HANA are sales orders, purchase orders, outbound deliveries, or sales invoices.
The test case will verify both the S/4HANA and the integration platform together. Here you can find how Int4 Suite can reprocess interface messages from SAP Output Control.
Testing scope:
The solution is applicable for the below test types:
IDoc Outbound
SAP PI/PO Outbound
Below you will find the automation object’s required parameters and variables that will combine repeating the message in output control for the particular business document and capturing its final output message from the integration platform.
Configuration of an automation object:
Create a standard automation object for outbound interface (based on the description for a particular test type)
Setup an Additional Parameter:
Name: Trigger the output from message control (NAST)
Value: XAdd variables that will allow to repeat the message and correlate output based on the final content
Variable Name | Variable Description | Variable processors | Comment |
---|---|---|---|
KAPPL | Output application | Action: Populate Variable Before execution | For example: |
KSCHL | Output Type | Constant as above. Parameter should contain Output Type key | For example: |
PARNR | Partner | Constant as above. Parameter should contain Partner Name | Optional |
PARVW | Partner Role | Constant as above. The parameter should contain Partner Role | Optional |
SPRAS | Language | Constant as above. Parameter should contain Language | Optional |
AENDE | Change message flag | Constant as above. Used for testing change messages. | Optional |
NACHA | Message transmission medium | Constant as above | Optional |
OBJKY | SAP Document number | Two actions:
| The same XPath expression should be used for both actions. |
NEWSESSION | Trigger output in new session | Constant | Set to 'X' to trigger each output in new RFC session. This is required e.g. in situations when backend logic is implemented in function group and not all global variables are initialized correctly. Triggering multiple outputs in the same session can cause unwanted side effects in such scenarios. |
LOCALE | Language of the remote session | Â | Optional Set it to change sy-langu in target system using SET LOCALE statement |
The variables' names must be the same. They are used to populate an output in the SAP S/4HANA backend automatically.
First, The OBJKY variable is used to read the business document number that the test case output was captured. Next, the new entry is added to output control, and the interface logic creates a new test message.
Finally, by the second action in the OBJKY variable, Int4 Suite will search the integration platform and find a new message that was produced by the test case execution and contain the correct document number.
References & Examples:
Sample output control screen from SAP invoice and the variable names & values:
Sample OBJKY’s actions for SAP Invoice IDOC:
© 2017 - 2022 Int4 AG All rights reserved