Entering content frameProcedure documentation CHETAB – Check Table Contents Locate the document in its SAP Library structure

The function CHETAB compares database field values with specified values to check database updates after transactions. You can also check with CHETAB whether a particular table entry exists. You can also check customizing table entries.

CHETAB requires specification of the complete key.

Caution

If the key is not completely specified, those key field which are not specified take the initial value for their type (spaces for CHAR, "0" for NUM).

Note

In those exceptional cases where you need to select by non-key fields, you can call appropriately programmed function modules in test cases, with the function FUN . If the tables to be read are buffered, you should call the CAT_TABLE_BUFFER_RESET function module with the function FUN, before the read function module. This resets a table in the table buffer.

Procedure

  1. Enter CHETAB in the Funct. column, and the table name in the Object field.
  2. Position the cursor on this line and double-click. The field contents maintenance detail screen appears. At first only the key fields are listed.
  3. Assign values to all the key fields (ARG). You can use constant values, or variables and parameters which already contain values.
  4. Choose Display all fields to list the function part fields as well.
  5. Enter the function field (FKT) target values, for which a target/actual comparison should be made.

Caution

Database table values must be input in the fields in internal format. Values which fail the target/actual comparison are output as errors in the log.

Note

If the CHETAB function does not find any entries for the specified values in the corresponding table in special cases, because e.g. an account has not yet been updated, an error occurs, because CATT assumes that this is an error. You can avoid this by reading the corresponding table entry with the function SETVAR<table> . If the entry does not exist, SY-SUBRC <> 0, and this can be tested in a condition.

Maintaining a function in a remote system

You can specify a parameter for remote maintenance after recording with this function, as described under Create a remote call in REF – Refer to test case.

If a parameter with the remote access target is defined, this function is performed remote when the procedure is called. The destination is the current contents of the parameters.

 

 

 

Leaving content frame