SAP K40C_DOCUMENT_TABLES_GET Function Module for









K40C_DOCUMENT_TABLES_GET is a standard k40c document tables get 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 k40c document tables get FM, simply by entering the name K40C_DOCUMENT_TABLES_GET into the relevant SAP transaction such as SE37 or SE38.

Function Group: K40C
Program Name: SAPLK40C
Main Program: SAPLK40C
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function K40C_DOCUMENT_TABLES_GET 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 'K40C_DOCUMENT_TABLES_GET'"
EXPORTING
* USE_MESSAGE_HANDLER = 'X' "
* I_ACTIVITY = ' ' "
* GET_ALL = ' ' "
* I_GET_ARCHIVED_TOO = ' ' "
* I_GET_OVERHEAD_TOO = ' ' "Data Element for BOOLE Domain: TRUE (='X') and FALSE (=' ')

TABLES
ITCOBK = "
* ITCOEP = "CO Object: Line Items (by Period)
* ITCOEPL = "
* ITCOEPR = "
* ITCOBL = "
* ITCOEJ = "

EXCEPTIONS
DOCUMENT_NOT_FOUND = 1 ERROR_OCCURED = 2
.



IMPORTING Parameters details for K40C_DOCUMENT_TABLES_GET

USE_MESSAGE_HANDLER -

Data type: BOOLE_D
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_ACTIVITY -

Data type: CHAR5
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

GET_ALL -

Data type: BOOLE_D
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GET_ARCHIVED_TOO -

Data type: BOOLE_D
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GET_OVERHEAD_TOO - Data Element for BOOLE Domain: TRUE (='X') and FALSE (=' ')

Data type: BOOLE_D
Default: SPACE
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for K40C_DOCUMENT_TABLES_GET

ITCOBK -

Data type: COBK
Optional: No
Call by Reference: No ( called with pass by value option)

ITCOEP - CO Object: Line Items (by Period)

Data type: COEP
Optional: Yes
Call by Reference: No ( called with pass by value option)

ITCOEPL -

Data type: COEPL
Optional: Yes
Call by Reference: No ( called with pass by value option)

ITCOEPR -

Data type: COEPR
Optional: Yes
Call by Reference: No ( called with pass by value option)

ITCOBL -

Data type: COBL
Optional: Yes
Call by Reference: No ( called with pass by value option)

ITCOEJ -

Data type: COEJ
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

DOCUMENT_NOT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_OCCURED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for K40C_DOCUMENT_TABLES_GET 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:
lt_itcobk  TYPE STANDARD TABLE OF COBK, "   
lv_document_not_found  TYPE COBK, "   
lv_use_message_handler  TYPE BOOLE_D, "   'X'
lt_itcoep  TYPE STANDARD TABLE OF COEP, "   
lv_i_activity  TYPE CHAR5, "   SPACE
lv_error_occured  TYPE CHAR5, "   
lv_get_all  TYPE BOOLE_D, "   SPACE
lt_itcoepl  TYPE STANDARD TABLE OF COEPL, "   
lt_itcoepr  TYPE STANDARD TABLE OF COEPR, "   
lv_i_get_archived_too  TYPE BOOLE_D, "   SPACE
lt_itcobl  TYPE STANDARD TABLE OF COBL, "   
lv_i_get_overhead_too  TYPE BOOLE_D, "   SPACE
lt_itcoej  TYPE STANDARD TABLE OF COEJ. "   

  CALL FUNCTION 'K40C_DOCUMENT_TABLES_GET'  "
    EXPORTING
         USE_MESSAGE_HANDLER = lv_use_message_handler
         I_ACTIVITY = lv_i_activity
         GET_ALL = lv_get_all
         I_GET_ARCHIVED_TOO = lv_i_get_archived_too
         I_GET_OVERHEAD_TOO = lv_i_get_overhead_too
    TABLES
         ITCOBK = lt_itcobk
         ITCOEP = lt_itcoep
         ITCOEPL = lt_itcoepl
         ITCOEPR = lt_itcoepr
         ITCOBL = lt_itcobl
         ITCOEJ = lt_itcoej
    EXCEPTIONS
        DOCUMENT_NOT_FOUND = 1
        ERROR_OCCURED = 2
. " K40C_DOCUMENT_TABLES_GET




ABAP code using 7.40 inline data declarations to call FM K40C_DOCUMENT_TABLES_GET

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_use_message_handler) = 'X'.
 
 
DATA(ld_i_activity) = ' '.
 
 
DATA(ld_get_all) = ' '.
 
 
 
DATA(ld_i_get_archived_too) = ' '.
 
 
DATA(ld_i_get_overhead_too) = ' '.
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!