Start of Content Area

Background documentation Accessing Test Data by API  Locate the document in its SAP Library structure

 

ABAP programs can read the data from eCATT’s test data containers. In particular, this feature is intended for use with ABAP Unit. The class CL_APL_ECATT_TDC_API provides the necessary methods.

To get access to a test data container from a program, the test data container must be loaded and prepared by the static method GET_INSTANCE. For example:

DATA tdc_ref TYPE REF TO cl_apl_ecatt_tdc_api.

CALL METHOD cl_apl_ecatt_tdc_api=>get_instance

EXPORTING

i_testdatacontainer = 'MY_TEST_DATA_CONATINER'

RECEIVING

e_tdc_ref = tdc_ref.

Once the runtime object has been created, the object methods can be called. Below is an overview of the available methods.

 

Object Methods

The object methods can be divided into the categories listed below. For details about the methods and their parameters, see the links to the superordinate method categories:

 

Method Category

Associated Methods

General Methods

      GET_INSTANCE: The central routine for loading and preparing a TDC

      COMMIT_CHANGES: Writes the changes to the TDC to the database

      SET_EXCEPTION_MODE: Sets the mode of exception handling

      GET_EXCEPTION: Gets the last exception that occurred

      CLEAR_EXCEPTION: Deletes the internal attribute of the last exception that occurred

General Read Access

      GET_PARAM_LIST: Gets the table of defined parameters

      GET_PARAM_DEFINITION: Gets the definition of a parameter

      GET_PARAM_DESCRIPTION: Gets the short text and group of a parameter

      GET_VARIANT_LIST: Gets the table of defined variants

      GET_VARIANT_DESCRIPTION: Gets the short text of a variant

Read Access to Content

      GET_TDC_CONTENT: Gets the table of all values of all variants from the TDC as REFs

      GET_VARIANT_CONTENT: Gets the table of all values of a variant as REFs

      GET_VALUE: Reads the value from the TDC to a variable

      GET_VALUE_REF: Reads the value from the TDC to a REF memory area

General Write Access

      CREATE_PARAMETER: Creates a new parameter

      CHANGE_PARAMETER: Changes a parameter (as far as possible, values are copied when the definition is changed)

      COPY_PARAMETER: Copies a parameter (respective value is copied in all variants if requested)

      CREATE_VARIANT: Creates a new variant

      CHANGE_VARIANT: Changes a variant

      COPY_VARIANT: Copies a variant with all data

      DELETE_PARAMETER: Deletes a parameter

      DELETE_VARIANT: Deletes a variant

Write Access to Content

      SET_TDC_CONTENT: Writes the table of all values of all variants of the TDC

      SET_VARIANT_CONTENT: Writes a table of parameter values to a variant

      SET_VALUE: Transfers the value from a variable to the TDC

      SET_VALUE_REF: Transfers the value from a REF memory area to the TDC

 

There is one exception class: CX_ECATT_TDC_ACCESS.

 

End of Content Area