ABAP programs can read data from eCATT 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:
Note If an object was created in the SECATT dialog and not using the API, you can get write access to it with the API by activating the API Access Permitted option in the definition of the eCATT object. This option is in the definition of the relevant eCATT object (transaction SECATT) under .
Object Methods
The object methods are 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 TCD.
-
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_TDC_VERSION: Returns the name of the read version of the TDC.
-
GET_VERSION_LIST: Gets a list of all existing versions of a test data container in a target system. The number of existing versions (the highest assigned version number) is also returned as a numerical value.
-
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 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 an exception class: CX_ECATT_TDC_ACCESS.