Entering content frame

Function documentation User-Defined Incoming File Checks Locate the document in its SAP Library structure

Use

You can configure your own file-specific checks that are to be carried out on incoming DME files when you run the conversion program. In the checks, you define that certain conditions are to be met before the file is converted. These checks refer to individual fields in the file; you can also define a check segment that runs once at the end of processing and stores all checks that are valid for the entire file.

If you cannot represent a check using the statements provided in the DME Engine, you can create a function module to perform the check and enter it here.

Features

If a condition you define is not met, you define how the system is to respond when you run the conversion program:

Standard messages are available for each of these system responses, or you can create your own message and specify it here.

Integration

If you set the Generate Check Results indicator in the conversion program and the defined check condition is not met, the system responds as follows:

System Response
Defined in Check

Related System Actions

Warning

Always creates a converted file;
Displays a log

Error

Does not create a converted file if at least one error occurs;
Displays a log

Termination

Always terminates the conversion program (even if the indicator above is not set);
Does not create a file;
Does not display a log (only an error message)

Caution

If you deselect the Generate Check Results indicator, be aware that the program creates a converted file – even if errors occurred during the conversion program.

Example

You want to check that the amount of all payment records sent in an incoming file must be identical to the total amount contained in a separate Total amount element.

First, you create a technical node to aggregate the values of the payment records with the reference ID "CHECK_TOTAL". You then compare this aggregated value against the value of the Total amount element. Create a Total amount element and define the following check on its File Checks tab:

File Checks

Segment

Operator (Logical)

Arg2-1

Arg2-2

Type

Operator (Linking)

Total amount

=

CHECK_TOTAL

1A

3

leave blank

The system automatically copies the current node to the beginning of the file check. You then define that the amount in the Total amount segment is to be equal to the value in the node with the reference ID "CHECK_TOTAL". Type 3 indicates that the argument (Arg2-1) refers to a reference ID, so you need to enter the node attribute that is to be checked in Arg2-2, which is contents in internal format (1A) in this case.

Note 

The value you specify for Arg2-2 depends on the type of argument (1=constant, 2=field of a target structure, 3=reference ID), so there is no input help for the field. If the argument refers to a reference ID, you need to enter the node attribute that is to be checked in the condition. For possible input values, refer to the field help for Arg2-2 and click on the node attribute link.

When the system converts an incoming file with this format tree, it checks that the total amount in the incoming file is the same as the aggregated value of all payment records. If the amounts are not equal, the system creates a warning or error message in the log, or terminates the conversion program – as defined in the file check.

See also:

For more information on possible logical operators in the check, see Structure linkComparing Strings.

Leaving content frame