SAP CKM8N_DOCUMENT_REPORT Function Module for
CKM8N_DOCUMENT_REPORT is a standard ckm8n document report 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 ckm8n document report FM, simply by entering the name CKM8N_DOCUMENT_REPORT into the relevant SAP transaction such as SE37 or SE38.
Function Group: CKM8N
Program Name: SAPLCKM8N
Main Program: SAPLCKM8N
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CKM8N_DOCUMENT_REPORT 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 'CKM8N_DOCUMENT_REPORT'".
EXPORTING
I_KALNR = "
* I_NO_BUFFER = "
* I_REFRESH_BUFFER = "
* I_ONLINE = 'X' "
I_BDATJ = "
I_POPER = "
* I_UNTPER = "
* I_RUN_ID = "Number of Costing Runs for Material Ledger
* I_USE_KEY = "
* I_PTYP = "Process category for procurement alt. or consuption alt.
* I_BVALT = "Procurement Alternative/Process
* I_ONLY_NOT_MLCD_DOCS = "
IMPORTING
E_ERROR_IN_SETTLEMENT = "
E_CPUTM_WIP = "Time of Entry
E_CPUDT_CL = "Accounting Document Entry Date
E_CPUTM_CL = "Time of Entry
E_ERROR_BELNR = "
E_ERROR_KJAHR = "
E_REDUCED_BOM = "
E_CPUDT_MS = "Accounting Document Entry Date
E_CPUTM_MS = "Time of Entry
E_CPUDT_VNB = "Accounting Document Entry Date
E_CPUTM_VNB = "Time of Entry
E_CPUDT_WIP = "Accounting Document Entry Date
TABLES
OT_DOCS = "
EXCEPTIONS
NO_DOCUMENT_FOUND = 1 NO_DATA_FOUND = 2
IMPORTING Parameters details for CKM8N_DOCUMENT_REPORT
I_KALNR -
Data type: CKMLHD-KALNROptional: No
Call by Reference: Yes
I_NO_BUFFER -
Data type: BOOLE_DOptional: Yes
Call by Reference: Yes
I_REFRESH_BUFFER -
Data type: BOOLE_DOptional: Yes
Call by Reference: Yes
I_ONLINE -
Data type: BOOLE_DDefault: 'X'
Optional: Yes
Call by Reference: Yes
I_BDATJ -
Data type: CKMLPP-BDATJOptional: No
Call by Reference: Yes
I_POPER -
Data type: CKMLPP-POPEROptional: No
Call by Reference: Yes
I_UNTPER -
Data type: CKMLPP-UNTPEROptional: Yes
Call by Reference: Yes
I_RUN_ID - Number of Costing Runs for Material Ledger
Data type: CKML_RUN_IDOptional: Yes
Call by Reference: Yes
I_USE_KEY -
Data type: BOOLE_DOptional: Yes
Call by Reference: Yes
I_PTYP - Process category for procurement alt. or consuption alt.
Data type: MLCD-PTYPOptional: Yes
Call by Reference: Yes
I_BVALT - Procurement Alternative/Process
Data type: MLCD-BVALTOptional: Yes
Call by Reference: Yes
I_ONLY_NOT_MLCD_DOCS -
Data type: BOOLE_DOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for CKM8N_DOCUMENT_REPORT
E_ERROR_IN_SETTLEMENT -
Data type: CK_XABRERROptional: No
Call by Reference: Yes
E_CPUTM_WIP - Time of Entry
Data type: MLHD-CPUTMOptional: No
Call by Reference: Yes
E_CPUDT_CL - Accounting Document Entry Date
Data type: MLHD-CPUDTOptional: No
Call by Reference: Yes
E_CPUTM_CL - Time of Entry
Data type: MLHD-CPUTMOptional: No
Call by Reference: Yes
E_ERROR_BELNR -
Data type: MLHD-BELNROptional: No
Call by Reference: Yes
E_ERROR_KJAHR -
Data type: MLHD-KJAHROptional: No
Call by Reference: Yes
E_REDUCED_BOM -
Data type: CK_MODIFOptional: No
Call by Reference: Yes
E_CPUDT_MS - Accounting Document Entry Date
Data type: MLHD-CPUDTOptional: No
Call by Reference: Yes
E_CPUTM_MS - Time of Entry
Data type: MLHD-CPUTMOptional: No
Call by Reference: Yes
E_CPUDT_VNB - Accounting Document Entry Date
Data type: MLHD-CPUDTOptional: No
Call by Reference: Yes
E_CPUTM_VNB - Time of Entry
Data type: MLHD-CPUTMOptional: No
Call by Reference: Yes
E_CPUDT_WIP - Accounting Document Entry Date
Data type: MLHD-CPUDTOptional: No
Call by Reference: Yes
TABLES Parameters details for CKM8N_DOCUMENT_REPORT
OT_DOCS -
Data type: CKMD_T_DOCUMENT_REPORTOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_DOCUMENT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_DATA_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CKM8N_DOCUMENT_REPORT 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_i_kalnr | TYPE CKMLHD-KALNR, " | |||
| lt_ot_docs | TYPE STANDARD TABLE OF CKMD_T_DOCUMENT_REPORT, " | |||
| lv_no_document_found | TYPE CKMD_T_DOCUMENT_REPORT, " | |||
| lv_e_error_in_settlement | TYPE CK_XABRERR, " | |||
| lv_e_cputm_wip | TYPE MLHD-CPUTM, " | |||
| lv_i_no_buffer | TYPE BOOLE_D, " | |||
| lv_e_cpudt_cl | TYPE MLHD-CPUDT, " | |||
| lv_i_refresh_buffer | TYPE BOOLE_D, " | |||
| lv_i_online | TYPE BOOLE_D, " 'X' | |||
| lv_e_cputm_cl | TYPE MLHD-CPUTM, " | |||
| lv_i_bdatj | TYPE CKMLPP-BDATJ, " | |||
| lv_e_error_belnr | TYPE MLHD-BELNR, " | |||
| lv_no_data_found | TYPE MLHD, " | |||
| lv_i_poper | TYPE CKMLPP-POPER, " | |||
| lv_e_error_kjahr | TYPE MLHD-KJAHR, " | |||
| lv_i_untper | TYPE CKMLPP-UNTPER, " | |||
| lv_e_reduced_bom | TYPE CK_MODIF, " | |||
| lv_i_run_id | TYPE CKML_RUN_ID, " | |||
| lv_e_cpudt_ms | TYPE MLHD-CPUDT, " | |||
| lv_i_use_key | TYPE BOOLE_D, " | |||
| lv_e_cputm_ms | TYPE MLHD-CPUTM, " | |||
| lv_i_ptyp | TYPE MLCD-PTYP, " | |||
| lv_e_cpudt_vnb | TYPE MLHD-CPUDT, " | |||
| lv_i_bvalt | TYPE MLCD-BVALT, " | |||
| lv_e_cputm_vnb | TYPE MLHD-CPUTM, " | |||
| lv_e_cpudt_wip | TYPE MLHD-CPUDT, " | |||
| lv_i_only_not_mlcd_docs | TYPE BOOLE_D. " |
|   CALL FUNCTION 'CKM8N_DOCUMENT_REPORT' " |
| EXPORTING | ||
| I_KALNR | = lv_i_kalnr | |
| I_NO_BUFFER | = lv_i_no_buffer | |
| I_REFRESH_BUFFER | = lv_i_refresh_buffer | |
| I_ONLINE | = lv_i_online | |
| I_BDATJ | = lv_i_bdatj | |
| I_POPER | = lv_i_poper | |
| I_UNTPER | = lv_i_untper | |
| I_RUN_ID | = lv_i_run_id | |
| I_USE_KEY | = lv_i_use_key | |
| I_PTYP | = lv_i_ptyp | |
| I_BVALT | = lv_i_bvalt | |
| I_ONLY_NOT_MLCD_DOCS | = lv_i_only_not_mlcd_docs | |
| IMPORTING | ||
| E_ERROR_IN_SETTLEMENT | = lv_e_error_in_settlement | |
| E_CPUTM_WIP | = lv_e_cputm_wip | |
| E_CPUDT_CL | = lv_e_cpudt_cl | |
| E_CPUTM_CL | = lv_e_cputm_cl | |
| E_ERROR_BELNR | = lv_e_error_belnr | |
| E_ERROR_KJAHR | = lv_e_error_kjahr | |
| E_REDUCED_BOM | = lv_e_reduced_bom | |
| E_CPUDT_MS | = lv_e_cpudt_ms | |
| E_CPUTM_MS | = lv_e_cputm_ms | |
| E_CPUDT_VNB | = lv_e_cpudt_vnb | |
| E_CPUTM_VNB | = lv_e_cputm_vnb | |
| E_CPUDT_WIP | = lv_e_cpudt_wip | |
| TABLES | ||
| OT_DOCS | = lt_ot_docs | |
| EXCEPTIONS | ||
| NO_DOCUMENT_FOUND = 1 | ||
| NO_DATA_FOUND = 2 | ||
| . " CKM8N_DOCUMENT_REPORT | ||
ABAP code using 7.40 inline data declarations to call FM CKM8N_DOCUMENT_REPORT
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 KALNR FROM CKMLHD INTO @DATA(ld_i_kalnr). | ||||
| "SELECT single CPUTM FROM MLHD INTO @DATA(ld_e_cputm_wip). | ||||
| "SELECT single CPUDT FROM MLHD INTO @DATA(ld_e_cpudt_cl). | ||||
| DATA(ld_i_online) | = 'X'. | |||
| "SELECT single CPUTM FROM MLHD INTO @DATA(ld_e_cputm_cl). | ||||
| "SELECT single BDATJ FROM CKMLPP INTO @DATA(ld_i_bdatj). | ||||
| "SELECT single BELNR FROM MLHD INTO @DATA(ld_e_error_belnr). | ||||
| "SELECT single POPER FROM CKMLPP INTO @DATA(ld_i_poper). | ||||
| "SELECT single KJAHR FROM MLHD INTO @DATA(ld_e_error_kjahr). | ||||
| "SELECT single UNTPER FROM CKMLPP INTO @DATA(ld_i_untper). | ||||
| "SELECT single CPUDT FROM MLHD INTO @DATA(ld_e_cpudt_ms). | ||||
| "SELECT single CPUTM FROM MLHD INTO @DATA(ld_e_cputm_ms). | ||||
| "SELECT single PTYP FROM MLCD INTO @DATA(ld_i_ptyp). | ||||
| "SELECT single CPUDT FROM MLHD INTO @DATA(ld_e_cpudt_vnb). | ||||
| "SELECT single BVALT FROM MLCD INTO @DATA(ld_i_bvalt). | ||||
| "SELECT single CPUTM FROM MLHD INTO @DATA(ld_e_cputm_vnb). | ||||
| "SELECT single CPUDT FROM MLHD INTO @DATA(ld_e_cpudt_wip). | ||||
Search for further information about these or an SAP related objects