SAP CTMS_CLASS_OBJECT_DDB Function Module for Dynamic database set up for class entered
CTMS_CLASS_OBJECT_DDB is a standard ctms class object ddb SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Dynamic database set up for class entered processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for ctms class object ddb FM, simply by entering the name CTMS_CLASS_OBJECT_DDB into the relevant SAP transaction such as SE37 or SE38.
Function Group: CTMS
Program Name: SAPLCTMS
Main Program: SAPLCTMS
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CTMS_CLASS_OBJECT_DDB pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'CTMS_CLASS_OBJECT_DDB'"Dynamic database set up for class entered.
EXPORTING
* BATCH = ' ' "
* SET_VALUES_FROM_DB = 'X' "
* APPLICATION = "
* APPL_INSTANCE = "
* ADDITIONAL_OBJECTID = "
* ADDITIONAL_OBJECT = "
* READONLY = ' ' "
* UDEF_RST = "
* I_LOAD_CUSTOMIZING = ' ' "
* I_TABS_ACTIVE = ' ' "
* I_INCLUDE_HEADER = "Structures for Calling with Screen Module
* CLASS = "
* I_NO_OBJECTS = ' ' "
* I_CALLED_FROM_DDB = ' ' "
CLASSTYPE = "
* STATUS = "
* LANGUAGE = SY-LANGU "
OBJECTID = "
OBJECT = "
* DISPLAY = ' ' "
* KEY_DATE = SY-DATUM "
IMPORTING
INSTANCE = "
TABLES
* BUFF_KSSK = "
* BUFF_AUSP = "
EXCEPTIONS
NOT_FOUND = 1 NO_ALLOCATION_TO_CLASSES = 2
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLCTMS_001 Set Default Values
EXIT_SAPLCTMS_002 Check for Same Classification
EXIT_SAPLCTMS_003 Object Dependencies When Finding Objects
EXIT_SAPLCTMS_999 Dummy User Exit
IMPORTING Parameters details for CTMS_CLASS_OBJECT_DDB
BATCH -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SET_VALUES_FROM_DB -
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
APPLICATION -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
APPL_INSTANCE -
Data type: INOB-CUOBJOptional: Yes
Call by Reference: No ( called with pass by value option)
ADDITIONAL_OBJECTID -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
ADDITIONAL_OBJECT -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
READONLY -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
UDEF_RST -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_LOAD_CUSTOMIZING -
Data type: RMCLF-KREUZDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TABS_ACTIVE -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_INCLUDE_HEADER - Structures for Calling with Screen Module
Data type: INCL_BILDOptional: Yes
Call by Reference: No ( called with pass by value option)
CLASS -
Data type: KLAH-CLASSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_NO_OBJECTS -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_CALLED_FROM_DDB -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CLASSTYPE -
Data type: KLAH-KLARTOptional: No
Call by Reference: No ( called with pass by value option)
STATUS -
Data type: KSSK-STATUOptional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE -
Data type: SY-LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECTID -
Data type: TCLA-OBTABOptional: No
Call by Reference: No ( called with pass by value option)
OBJECT -
Data type: KSSK-OBJEKOptional: No
Call by Reference: No ( called with pass by value option)
DISPLAY -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
KEY_DATE -
Data type: CABN-DATUVDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CTMS_CLASS_OBJECT_DDB
INSTANCE -
Data type: DDB_C02-INSTANCEOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CTMS_CLASS_OBJECT_DDB
BUFF_KSSK -
Data type: CLZUORD_PUOptional: Yes
Call by Reference: No ( called with pass by value option)
BUFF_AUSP -
Data type: AUSPOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ALLOCATION_TO_CLASSES -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CTMS_CLASS_OBJECT_DDB Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_batch | TYPE STRING, " ' ' | |||
| lv_instance | TYPE DDB_C02-INSTANCE, " | |||
| lt_buff_kssk | TYPE STANDARD TABLE OF CLZUORD_PU, " | |||
| lv_not_found | TYPE CLZUORD_PU, " | |||
| lv_set_values_from_db | TYPE CLZUORD_PU, " 'X' | |||
| lv_application | TYPE CLZUORD_PU, " | |||
| lv_appl_instance | TYPE INOB-CUOBJ, " | |||
| lv_additional_objectid | TYPE INOB, " | |||
| lv_additional_object | TYPE INOB, " | |||
| lv_readonly | TYPE INOB, " ' ' | |||
| lv_udef_rst | TYPE INOB, " | |||
| lv_i_load_customizing | TYPE RMCLF-KREUZ, " SPACE | |||
| lv_i_tabs_active | TYPE RMCLF, " SPACE | |||
| lv_i_include_header | TYPE INCL_BILD, " | |||
| lv_class | TYPE KLAH-CLASS, " | |||
| lt_buff_ausp | TYPE STANDARD TABLE OF AUSP, " | |||
| lv_no_allocation_to_classes | TYPE AUSP, " | |||
| lv_i_no_objects | TYPE AUSP, " SPACE | |||
| lv_i_called_from_ddb | TYPE C, " SPACE | |||
| lv_classtype | TYPE KLAH-KLART, " | |||
| lv_status | TYPE KSSK-STATU, " | |||
| lv_language | TYPE SY-LANGU, " SY-LANGU | |||
| lv_objectid | TYPE TCLA-OBTAB, " | |||
| lv_object | TYPE KSSK-OBJEK, " | |||
| lv_display | TYPE KSSK, " ' ' | |||
| lv_key_date | TYPE CABN-DATUV. " SY-DATUM |
|   CALL FUNCTION 'CTMS_CLASS_OBJECT_DDB' "Dynamic database set up for class entered |
| EXPORTING | ||
| BATCH | = lv_batch | |
| SET_VALUES_FROM_DB | = lv_set_values_from_db | |
| APPLICATION | = lv_application | |
| APPL_INSTANCE | = lv_appl_instance | |
| ADDITIONAL_OBJECTID | = lv_additional_objectid | |
| ADDITIONAL_OBJECT | = lv_additional_object | |
| READONLY | = lv_readonly | |
| UDEF_RST | = lv_udef_rst | |
| I_LOAD_CUSTOMIZING | = lv_i_load_customizing | |
| I_TABS_ACTIVE | = lv_i_tabs_active | |
| I_INCLUDE_HEADER | = lv_i_include_header | |
| CLASS | = lv_class | |
| I_NO_OBJECTS | = lv_i_no_objects | |
| I_CALLED_FROM_DDB | = lv_i_called_from_ddb | |
| CLASSTYPE | = lv_classtype | |
| STATUS | = lv_status | |
| LANGUAGE | = lv_language | |
| OBJECTID | = lv_objectid | |
| OBJECT | = lv_object | |
| DISPLAY | = lv_display | |
| KEY_DATE | = lv_key_date | |
| IMPORTING | ||
| INSTANCE | = lv_instance | |
| TABLES | ||
| BUFF_KSSK | = lt_buff_kssk | |
| BUFF_AUSP | = lt_buff_ausp | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| NO_ALLOCATION_TO_CLASSES = 2 | ||
| . " CTMS_CLASS_OBJECT_DDB | ||
ABAP code using 7.40 inline data declarations to call FM CTMS_CLASS_OBJECT_DDB
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| DATA(ld_batch) | = ' '. | |||
| "SELECT single INSTANCE FROM DDB_C02 INTO @DATA(ld_instance). | ||||
| DATA(ld_set_values_from_db) | = 'X'. | |||
| "SELECT single CUOBJ FROM INOB INTO @DATA(ld_appl_instance). | ||||
| DATA(ld_readonly) | = ' '. | |||
| "SELECT single KREUZ FROM RMCLF INTO @DATA(ld_i_load_customizing). | ||||
| DATA(ld_i_load_customizing) | = ' '. | |||
| DATA(ld_i_tabs_active) | = ' '. | |||
| "SELECT single CLASS FROM KLAH INTO @DATA(ld_class). | ||||
| DATA(ld_i_no_objects) | = ' '. | |||
| DATA(ld_i_called_from_ddb) | = ' '. | |||
| "SELECT single KLART FROM KLAH INTO @DATA(ld_classtype). | ||||
| "SELECT single STATU FROM KSSK INTO @DATA(ld_status). | ||||
| "SELECT single LANGU FROM SY INTO @DATA(ld_language). | ||||
| DATA(ld_language) | = SY-LANGU. | |||
| "SELECT single OBTAB FROM TCLA INTO @DATA(ld_objectid). | ||||
| "SELECT single OBJEK FROM KSSK INTO @DATA(ld_object). | ||||
| DATA(ld_display) | = ' '. | |||
| "SELECT single DATUV FROM CABN INTO @DATA(ld_key_date). | ||||
| DATA(ld_key_date) | = SY-DATUM. | |||
Search for further information about these or an SAP related objects