Show TOC

Field ChecksLocate this document in the navigation structure

In this section you can specify the checks for source fields. You can perform checks for initial and fixed values, and specify field check classes for more complex tests. You can specify the following attributes:

  • Outbound/source structure: a source structure that you specified for this mapping step.

  • Source field: source structure field that the system checks.

  • Indicator initial: If this indicator is set, the source value must be initial.

  • Fixed value: If this value is not initial , the tool checks whether the source value is equal to the fixed valued specified.

  • Field check class: You can use this for more complex tests. The class must implement the interface IF_SMT_CHECK.

Example

If a check run is unsuccessful, the SMT triggers the exception CX_SMT_TRANSFORMATION_ERROR.

Field Check Classes

Field check classes implement the interface IF_SMT_CHECK. This interface contains only the method CHECK with the signature I_SOURCE (import parameter that contains the source value). If the test result is negative, the field check class must trigger a type CX_SMT_TRANSFORMATION_ERROR exception. This exception contains a log for storing multiple messages. If only one message is required, you can use the following template to trigger the exception:

DATA: "...
      l_protocol TYPE REF TO cl_smt_protocol,
      "...
   "...
   l_protocol = cl_smt_protocol=>create_protocol_for_message( i_msgid = l_msgid
                        i_msgty = l_msgty
                        i_msgno = l_msgno
                        i_msgv1 = l_msgv1
                        i_msgv2 = l_msgv2
                        i_msgv3 = l_msgv3
                        i_msgv4 = l_msgv4 ).
   RAISE EXCEPTION TYPE cx_smt_transformation_error EXPORTING a_protocol = l_protocol.