SAP CUKD_GET_KNOWLEDGE Function Module for
CUKD_GET_KNOWLEDGE is a standard cukd get knowledge 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 get knowledge FM, simply by entering the name CUKD_GET_KNOWLEDGE 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_GET_KNOWLEDGE 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_GET_KNOWLEDGE'".
EXPORTING
* KNOWLEDGE_TYPE = 'S' "Knowledge module type (S=Source)
* RELATION = ' ' "Relationship name (alternative: RELATION_NR)
* RELATION_NR = ' ' "Number of relationship (alternative: RELATION)
* DATE = SY-DATUM "Valid on
IMPORTING
ADZHL = "
AENNR = "Change number also of dependent entries (CUEX,..)
TABLES
KNOWLEDGE_TAB = "Table with knowledge module
EXCEPTIONS
NO_KNOWLEDGE_FOUND = 1 NO_RELATION_FOUND = 2
IMPORTING Parameters details for CUKD_GET_KNOWLEDGE
KNOWLEDGE_TYPE - Knowledge module type (S=Source)
Data type:Default: 'S'
Optional: Yes
Call by Reference: No ( called with pass by value option)
RELATION - Relationship name (alternative: RELATION_NR)
Data type: CUKB-KNNAMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
RELATION_NR - Number of relationship (alternative: RELATION)
Data type: CUKB-KNNUMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATE - Valid on
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CUKD_GET_KNOWLEDGE
ADZHL -
Data type: CUKN-ADZHLOptional: No
Call by Reference: No ( called with pass by value option)
AENNR - Change number also of dependent entries (CUEX,..)
Data type: CUKN-AENNROptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CUKD_GET_KNOWLEDGE
KNOWLEDGE_TAB - Table with knowledge module
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_KNOWLEDGE_FOUND - No knowledge module found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_RELATION_FOUND - No dependency found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CUKD_GET_KNOWLEDGE 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_adzhl | TYPE CUKN-ADZHL, " | |||
| lt_knowledge_tab | TYPE STANDARD TABLE OF CUKN, " | |||
| lv_knowledge_type | TYPE CUKN, " 'S' | |||
| lv_no_knowledge_found | TYPE CUKN, " | |||
| lv_aennr | TYPE CUKN-AENNR, " | |||
| lv_relation | TYPE CUKB-KNNAM, " SPACE | |||
| lv_no_relation_found | TYPE CUKB, " | |||
| lv_relation_nr | TYPE CUKB-KNNUM, " SPACE | |||
| lv_date | TYPE SY-DATUM. " SY-DATUM |
|   CALL FUNCTION 'CUKD_GET_KNOWLEDGE' " |
| EXPORTING | ||
| KNOWLEDGE_TYPE | = lv_knowledge_type | |
| RELATION | = lv_relation | |
| RELATION_NR | = lv_relation_nr | |
| DATE | = lv_date | |
| IMPORTING | ||
| ADZHL | = lv_adzhl | |
| AENNR | = lv_aennr | |
| TABLES | ||
| KNOWLEDGE_TAB | = lt_knowledge_tab | |
| EXCEPTIONS | ||
| NO_KNOWLEDGE_FOUND = 1 | ||
| NO_RELATION_FOUND = 2 | ||
| . " CUKD_GET_KNOWLEDGE | ||
ABAP code using 7.40 inline data declarations to call FM CUKD_GET_KNOWLEDGE
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.| "SELECT single ADZHL FROM CUKN INTO @DATA(ld_adzhl). | ||||
| DATA(ld_knowledge_type) | = 'S'. | |||
| "SELECT single AENNR FROM CUKN INTO @DATA(ld_aennr). | ||||
| "SELECT single KNNAM FROM CUKB INTO @DATA(ld_relation). | ||||
| DATA(ld_relation) | = ' '. | |||
| "SELECT single KNNUM FROM CUKB INTO @DATA(ld_relation_nr). | ||||
| DATA(ld_relation_nr) | = ' '. | |||
| "SELECT single DATUM FROM SY INTO @DATA(ld_date). | ||||
| DATA(ld_date) | = SY-DATUM. | |||
Search for further information about these or an SAP related objects