SAP K_COSTS_READ_ARCHIVE Function Module for
K_COSTS_READ_ARCHIVE is a standard k costs read archive 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 k costs read archive FM, simply by entering the name K_COSTS_READ_ARCHIVE into the relevant SAP transaction such as SE37 or SE38.
Function Group: KAAR
Program Name: SAPLKAAR
Main Program:
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function K_COSTS_READ_ARCHIVE 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 'K_COSTS_READ_ARCHIVE'".
EXPORTING
* I_ARCHIVE_HANDLE = 0 "
* I_OBJNR = ' ' "
* I_APPEND = ' ' "
TABLES
* T_COKA = "
* T_COEJ = "
* T_COOI = "
* T_COSPD = "
* T_COKS = "
* T_COSS = "
* T_COSSD = "
* T_CKHS = "
* T_CKHT = "
* T_CKIS = "
* T_CKIT = "
* T_COKP = "
* T_CKIP = "
* T_TEXT = "
* T_COSP = "
* T_COEP = "
* T_COBK = "
* T_COEPD = "
* T_COEPBR = "
* T_EBII = "
IMPORTING Parameters details for K_COSTS_READ_ARCHIVE
I_ARCHIVE_HANDLE -
Data type: SY-TABIXOptional: Yes
Call by Reference: No ( called with pass by value option)
I_OBJNR -
Data type: ONR00-OBJNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_APPEND -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for K_COSTS_READ_ARCHIVE
T_COKA -
Data type: COKAOptional: Yes
Call by Reference: No ( called with pass by value option)
T_COEJ -
Data type: COEJOptional: Yes
Call by Reference: No ( called with pass by value option)
T_COOI -
Data type: COOIOptional: Yes
Call by Reference: No ( called with pass by value option)
T_COSPD -
Data type: COSPDOptional: Yes
Call by Reference: No ( called with pass by value option)
T_COKS -
Data type: COKSOptional: Yes
Call by Reference: No ( called with pass by value option)
T_COSS -
Data type: COSSOptional: Yes
Call by Reference: No ( called with pass by value option)
T_COSSD -
Data type: COSSDOptional: Yes
Call by Reference: No ( called with pass by value option)
T_CKHS -
Data type: CKHSOptional: Yes
Call by Reference: No ( called with pass by value option)
T_CKHT -
Data type: CKHTOptional: Yes
Call by Reference: No ( called with pass by value option)
T_CKIS -
Data type: CKISOptional: Yes
Call by Reference: No ( called with pass by value option)
T_CKIT -
Data type: CKITOptional: Yes
Call by Reference: No ( called with pass by value option)
T_COKP -
Data type: COKPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_CKIP -
Data type: CKIPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_TEXT -
Data type: KARC_TEXTTABOptional: Yes
Call by Reference: No ( called with pass by value option)
T_COSP -
Data type: COSPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_COEP -
Data type: COEPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_COBK -
Data type: COBKOptional: Yes
Call by Reference: No ( called with pass by value option)
T_COEPD -
Data type: COEPDOptional: Yes
Call by Reference: No ( called with pass by value option)
T_COEPBR -
Data type: COEPBROptional: Yes
Call by Reference: No ( called with pass by value option)
T_EBII -
Data type: EBIIOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for K_COSTS_READ_ARCHIVE 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_t_coka | TYPE STANDARD TABLE OF COKA, " | |||
| lv_i_archive_handle | TYPE SY-TABIX, " 0 | |||
| lt_t_coej | TYPE STANDARD TABLE OF COEJ, " | |||
| lt_t_cooi | TYPE STANDARD TABLE OF COOI, " | |||
| lt_t_cospd | TYPE STANDARD TABLE OF COSPD, " | |||
| lt_t_coks | TYPE STANDARD TABLE OF COKS, " | |||
| lt_t_coss | TYPE STANDARD TABLE OF COSS, " | |||
| lt_t_cossd | TYPE STANDARD TABLE OF COSSD, " | |||
| lt_t_ckhs | TYPE STANDARD TABLE OF CKHS, " | |||
| lt_t_ckht | TYPE STANDARD TABLE OF CKHT, " | |||
| lt_t_ckis | TYPE STANDARD TABLE OF CKIS, " | |||
| lt_t_ckit | TYPE STANDARD TABLE OF CKIT, " | |||
| lt_t_cokp | TYPE STANDARD TABLE OF COKP, " | |||
| lv_i_objnr | TYPE ONR00-OBJNR, " SPACE | |||
| lt_t_ckip | TYPE STANDARD TABLE OF CKIP, " | |||
| lt_t_text | TYPE STANDARD TABLE OF KARC_TEXTTAB, " | |||
| lv_i_append | TYPE C, " SPACE | |||
| lt_t_cosp | TYPE STANDARD TABLE OF COSP, " | |||
| lt_t_coep | TYPE STANDARD TABLE OF COEP, " | |||
| lt_t_cobk | TYPE STANDARD TABLE OF COBK, " | |||
| lt_t_coepd | TYPE STANDARD TABLE OF COEPD, " | |||
| lt_t_coepbr | TYPE STANDARD TABLE OF COEPBR, " | |||
| lt_t_ebii | TYPE STANDARD TABLE OF EBII. " |
|   CALL FUNCTION 'K_COSTS_READ_ARCHIVE' " |
| EXPORTING | ||
| I_ARCHIVE_HANDLE | = lv_i_archive_handle | |
| I_OBJNR | = lv_i_objnr | |
| I_APPEND | = lv_i_append | |
| TABLES | ||
| T_COKA | = lt_t_coka | |
| T_COEJ | = lt_t_coej | |
| T_COOI | = lt_t_cooi | |
| T_COSPD | = lt_t_cospd | |
| T_COKS | = lt_t_coks | |
| T_COSS | = lt_t_coss | |
| T_COSSD | = lt_t_cossd | |
| T_CKHS | = lt_t_ckhs | |
| T_CKHT | = lt_t_ckht | |
| T_CKIS | = lt_t_ckis | |
| T_CKIT | = lt_t_ckit | |
| T_COKP | = lt_t_cokp | |
| T_CKIP | = lt_t_ckip | |
| T_TEXT | = lt_t_text | |
| T_COSP | = lt_t_cosp | |
| T_COEP | = lt_t_coep | |
| T_COBK | = lt_t_cobk | |
| T_COEPD | = lt_t_coepd | |
| T_COEPBR | = lt_t_coepbr | |
| T_EBII | = lt_t_ebii | |
| . " K_COSTS_READ_ARCHIVE | ||
ABAP code using 7.40 inline data declarations to call FM K_COSTS_READ_ARCHIVE
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 TABIX FROM SY INTO @DATA(ld_i_archive_handle). | ||||
| "SELECT single OBJNR FROM ONR00 INTO @DATA(ld_i_objnr). | ||||
| DATA(ld_i_objnr) | = ' '. | |||
| DATA(ld_i_append) | = ' '. | |||
Search for further information about these or an SAP related objects