SAP Function ADK_CCMS_GET_OBJECTS - Return all archiving objects to a DB table

Parameter Reference Type Length Default Optional Text
DELETE_OBJECTS_ONLY ARCH_DEF-DELETE_FLG C 1 'X' X Control Which Objects are to be Determined
GET_ALL_TABLES ARCH_DEF-DELETE_FLG C 1 SPACE X Control, Determine All Object Tables
TABLE DD02L-TABNAME C 30 Database Table Name

Parameter Reference Length Optional Text
OBJECTS ADK_CCMS_OBJECTS 0 All database table archiving objects

Exception Text
NO_OBJECT_FOUND There is no suitable archiving object
POOL_OR_CLUSTER_NOT_IN_USE Pool or cluster table is not used
TABLE_IS_NOT_TRANSPARENT Table is not a transparent database table
TABLE_NOT_FOUND Table is unknown

Functionality
This function module gets all archiving objects which use this databasetable.
You can specify all archiving objects or only those which deleteentries in the specified table.
You can also get all tables which use the archiving object. As thisfunction module returns the names of the database tables and not theData Dictionary table names, the names returned can be different fromthe names in the archiving object definition.

Example
TYPE-POOLS: ADK.
DATA: OBJECTS TYPE ADK_CCMS_OBJECTS,
O_LINE TYPE ADK_CCMS_OBJECT,
T_LINE TYPE ADK_CCMS_TABLE.
CALL FUNCTION 'ADK_CCMS_GET_OBJECTS'
EXPORTING
TABLE = 'FILENAME'
GET_ALL_TABLES = 'X'
TABLES
OBJECTS = OBJECTS
EXCEPTIONS
TABLE_NOT_FOUND = 1
POOL_OR_CLUSTER_NOT_IN_USE = 2
NO_OBJECT_FOUND = 3
TABLE_IS_NOT_TRANSPARENT = 4
OTHERS = 5.
IF SY-SUBRC EQ 0.
LOOP AT OBJECTS INTO O_LINE.
WRITE: / O_LINE-OBJECT, O_LINE-OBJTEXT.
LOOP AT O_LINE-TABLES INTO T_LINE.
WRITE: /5 T_LINE-TABNAME, T_LINE-TEXT.
ENDLOOP.
SKIP.
ENDLOOP.
ENDIF.

Notes
If this function module can not find an archiving object, this need notmean that this table can not be archived. An archiving object may nothave been found for the following reasons:

  • archiving is not possible

  • the table contains derived data which are deleted but not written in
  • the archive (ADK does not know this table).
    • The data in this table are archived via a view or a similar structure
    • (ADK does not know this table).
      • The data in this table are archived via an archiving class for which
      • ADK has no table information.

        Description
        The parameter DELETE_OBJECTS_ONLY controls whether all archivingobjects should be returned that are used by the table according toparameter TABLE, or only those objects for which data wasremoved from this table.
        This parameter also controls whether with the archiving objects alldatabase tables should be returned, or only those from which data wasremoved from the table with the archiving object (see parameterGET_ALL_TABLES).

        Value range

        • 'X',,only objects/tables where deletion took place

        • ' ',,all objects and all tables
        • Default
          'X',,only objects/tables where deletion took place

          Description
          The parameter GET_ALL_TABLES controls whether the correspondingdatabase tables should be determined for the archiving objects.
          If you want to determine the database tables for an archiving object ata later date then you can use the function moduleADK_CCMS_GET_TABLES.

          Value range

          • 'X',,determine database tables

          • ' ',,determine no database tables
          • Default
            ' ',,determine no database tables

            Description
            Via the parameter TABLE you must pass the name of a transparentdatabase table that is active in the Data Dictionary.

            Description
            In this table (type ADK_CCMS_OBJECTS) the names of the requiredarchiving objects are returned.
            This table is multi-dimensional and also contains the names of thedatabase tables that are used by the archiving object (see parameterGET_ALL_TABLES und DELETE_OBJECTS_ONLY).