SAP CUKD_KNOWLEDGE_DEFINITION Function Module for
CUKD_KNOWLEDGE_DEFINITION is a standard cukd knowledge definition SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 cukd knowledge definition FM, simply by entering the name CUKD_KNOWLEDGE_DEFINITION into the relevant SAP transaction such as SE37 or SE38.
Function Group: CUKD
Program Name: SAPLCUKD
Main Program: SAPLCUKD
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CUKD_KNOWLEDGE_DEFINITION 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 'CUKD_KNOWLEDGE_DEFINITION'".
EXPORTING
* AKTTYP = 'A' "H = create, V = change, A = display
TABLE = "Object table
* DATE = SY-DATUM "Search date and valid-from date (ECM)
* ECM_NUMBER = ' ' "Change number
* RELEASE_LOC_DEP_IF_CHECKED = "
* NO_SAVE_WITHOUT_GEN = "
ALLOCATION_NUMBER = "Allocation number object - relationship
* APPLIC_MOD_FLAG = ' ' "Flag if modif. already in calling application
* HISTORY = ' ' "Space = without history, 'X' = with history
* MODE = 'EDITOR' "ALLOCATIONS = allocations, EDITOR = editor
* TURN_ON_KNOBJ_SCROLL = ' ' "
* SUBSCREEN_PROGRAM = 'SAPLCUKD' "Program name for object sub-screen
* SUBSCREEN_DYNPRO = "Screen number of object sub-screen in SUBSCREEN program
* SUBSCREEN_FIELDS = "Transfer structure f. screen module
IMPORTING
ALLOCATION_NUMBER = "Allocation number object - relationship
FCODE = "Returned function code
UPDATEFLAG = "Space = no change, 'X' = change
TABLES
* RESULTING_DEPENDENCIES = "API Structure for Basic Data of Dependency
EXCEPTIONS
NO_RELATION_FOUND = 1 ECM_NUMBER_NOT_FOUND = 2 ECM_NUMBER_NOT_FOR_DEPS = 3 ECM_NEEDED = 4 OTHER_ECM_NUMBER_USED = 5 DATE_IN_PAST = 6 SUBSCREEN_DATA_NEEDED = 7
IMPORTING Parameters details for CUKD_KNOWLEDGE_DEFINITION
AKTTYP - H = create, V = change, A = display
Data type:Default: 'A'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLE - Object table
Data type: CUOB-KNTABOptional: No
Call by Reference: No ( called with pass by value option)
DATE - Search date and valid-from date (ECM)
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ECM_NUMBER - Change number
Data type: CUKB-AENNRDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
RELEASE_LOC_DEP_IF_CHECKED -
Data type: COptional: Yes
Call by Reference: Yes
NO_SAVE_WITHOUT_GEN -
Data type: XFELDOptional: Yes
Call by Reference: Yes
ALLOCATION_NUMBER - Allocation number object - relationship
Data type: CUOB-KNOBJOptional: No
Call by Reference: No ( called with pass by value option)
APPLIC_MOD_FLAG - Flag if modif. already in calling application
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
HISTORY - Space = without history, 'X' = with history
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
MODE - ALLOCATIONS = allocations, EDITOR = editor
Data type:Default: 'EDITOR'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TURN_ON_KNOBJ_SCROLL -
Data type: RCURS-CHECKEDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUBSCREEN_PROGRAM - Program name for object sub-screen
Data type: SY-REPIDDefault: 'SAPLCUKD'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUBSCREEN_DYNPRO - Screen number of object sub-screen in SUBSCREEN program
Data type: SY-DYNNROptional: Yes
Call by Reference: No ( called with pass by value option)
SUBSCREEN_FIELDS - Transfer structure f. screen module
Data type: RCUSBOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CUKD_KNOWLEDGE_DEFINITION
ALLOCATION_NUMBER - Allocation number object - relationship
Data type: CUOB-KNOBJOptional: No
Call by Reference: No ( called with pass by value option)
FCODE - Returned function code
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UPDATEFLAG - Space = no change, 'X' = change
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CUKD_KNOWLEDGE_DEFINITION
RESULTING_DEPENDENCIES - API Structure for Basic Data of Dependency
Data type: RCUKB1Optional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_RELATION_FOUND - No allocation(s) available.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ECM_NUMBER_NOT_FOUND - Change number not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ECM_NUMBER_NOT_FOR_DEPS - Change number not active for dependencies
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ECM_NEEDED - Change number required
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OTHER_ECM_NUMBER_USED - Change change number already used (DATUM)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DATE_IN_PAST - No maintenance < SY-DATUM
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SUBSCREEN_DATA_NEEDED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CUKD_KNOWLEDGE_DEFINITION 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_akttyp | TYPE STRING, " 'A' | |||
| lv_allocation_number | TYPE CUOB-KNOBJ, " | |||
| lv_no_relation_found | TYPE CUOB, " | |||
| lt_resulting_dependencies | TYPE STANDARD TABLE OF RCUKB1, " | |||
| lv_table | TYPE CUOB-KNTAB, " | |||
| lv_date | TYPE SY-DATUM, " SY-DATUM | |||
| lv_ecm_number | TYPE CUKB-AENNR, " ' ' | |||
| lv_release_loc_dep_if_checked | TYPE C, " | |||
| lv_no_save_without_gen | TYPE XFELD, " | |||
| lv_fcode | TYPE XFELD, " | |||
| lv_allocation_number | TYPE CUOB-KNOBJ, " | |||
| lv_ecm_number_not_found | TYPE CUOB, " | |||
| lv_updateflag | TYPE CUOB, " | |||
| lv_applic_mod_flag | TYPE CUOB, " ' ' | |||
| lv_ecm_number_not_for_deps | TYPE CUOB, " | |||
| lv_history | TYPE CUOB, " ' ' | |||
| lv_ecm_needed | TYPE CUOB, " | |||
| lv_mode | TYPE CUOB, " 'EDITOR' | |||
| lv_other_ecm_number_used | TYPE CUOB, " | |||
| lv_date_in_past | TYPE CUOB, " | |||
| lv_turn_on_knobj_scroll | TYPE RCURS-CHECKED, " ' ' | |||
| lv_subscreen_program | TYPE SY-REPID, " 'SAPLCUKD' | |||
| lv_subscreen_data_needed | TYPE SY, " | |||
| lv_subscreen_dynpro | TYPE SY-DYNNR, " | |||
| lv_subscreen_fields | TYPE RCUSB. " |
|   CALL FUNCTION 'CUKD_KNOWLEDGE_DEFINITION' " |
| EXPORTING | ||
| AKTTYP | = lv_akttyp | |
| TABLE | = lv_table | |
| DATE | = lv_date | |
| ECM_NUMBER | = lv_ecm_number | |
| RELEASE_LOC_DEP_IF_CHECKED | = lv_release_loc_dep_if_checked | |
| NO_SAVE_WITHOUT_GEN | = lv_no_save_without_gen | |
| ALLOCATION_NUMBER | = lv_allocation_number | |
| APPLIC_MOD_FLAG | = lv_applic_mod_flag | |
| HISTORY | = lv_history | |
| MODE | = lv_mode | |
| TURN_ON_KNOBJ_SCROLL | = lv_turn_on_knobj_scroll | |
| SUBSCREEN_PROGRAM | = lv_subscreen_program | |
| SUBSCREEN_DYNPRO | = lv_subscreen_dynpro | |
| SUBSCREEN_FIELDS | = lv_subscreen_fields | |
| IMPORTING | ||
| ALLOCATION_NUMBER | = lv_allocation_number | |
| FCODE | = lv_fcode | |
| UPDATEFLAG | = lv_updateflag | |
| TABLES | ||
| RESULTING_DEPENDENCIES | = lt_resulting_dependencies | |
| EXCEPTIONS | ||
| NO_RELATION_FOUND = 1 | ||
| ECM_NUMBER_NOT_FOUND = 2 | ||
| ECM_NUMBER_NOT_FOR_DEPS = 3 | ||
| ECM_NEEDED = 4 | ||
| OTHER_ECM_NUMBER_USED = 5 | ||
| DATE_IN_PAST = 6 | ||
| SUBSCREEN_DATA_NEEDED = 7 | ||
| . " CUKD_KNOWLEDGE_DEFINITION | ||
ABAP code using 7.40 inline data declarations to call FM CUKD_KNOWLEDGE_DEFINITION
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_akttyp) | = 'A'. | |||
| "SELECT single KNOBJ FROM CUOB INTO @DATA(ld_allocation_number). | ||||
| "SELECT single KNTAB FROM CUOB INTO @DATA(ld_table). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_date). | ||||
| DATA(ld_date) | = SY-DATUM. | |||
| "SELECT single AENNR FROM CUKB INTO @DATA(ld_ecm_number). | ||||
| DATA(ld_ecm_number) | = ' '. | |||
| "SELECT single KNOBJ FROM CUOB INTO @DATA(ld_allocation_number). | ||||
| DATA(ld_applic_mod_flag) | = ' '. | |||
| DATA(ld_history) | = ' '. | |||
| DATA(ld_mode) | = 'EDITOR'. | |||
| "SELECT single CHECKED FROM RCURS INTO @DATA(ld_turn_on_knobj_scroll). | ||||
| DATA(ld_turn_on_knobj_scroll) | = ' '. | |||
| "SELECT single REPID FROM SY INTO @DATA(ld_subscreen_program). | ||||
| DATA(ld_subscreen_program) | = 'SAPLCUKD'. | |||
| "SELECT single DYNNR FROM SY INTO @DATA(ld_subscreen_dynpro). | ||||
Search for further information about these or an SAP related objects