SAP K_TOTAL_INIT Function Module for









K_TOTAL_INIT is a standard k total init 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 total init FM, simply by entering the name K_TOTAL_INIT 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_TOTAL_INIT 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_TOTAL_INIT'"
EXPORTING
* I_OBJ_DELETE_FLAG = 'X' "
* I_ITEMS_ONLY = ' ' "
* I_ALL_LEDGERS = 'X' "
* I_TRANSDATA_ONLY = ' ' "

TABLES
* T_LEDNR = "
* RA_GJAHR = "
* RA_WRTTP = "
* RA_VERSN = "
* RA_PERIO = "
* T_OBJNR_SELECT = "
.



IMPORTING Parameters details for K_TOTAL_INIT

I_OBJ_DELETE_FLAG -

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

I_ITEMS_ONLY -

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

I_ALL_LEDGERS -

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

I_TRANSDATA_ONLY -

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

TABLES Parameters details for K_TOTAL_INIT

T_LEDNR -

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

RA_GJAHR -

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

RA_WRTTP -

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

RA_VERSN -

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

RA_PERIO -

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

T_OBJNR_SELECT -

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

Copy and paste ABAP code example for K_TOTAL_INIT 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_lednr  TYPE STANDARD TABLE OF KARC_T_LEDNR, "   
lv_i_obj_delete_flag  TYPE C, "   'X'
lt_ra_gjahr  TYPE STANDARD TABLE OF C, "   
lv_i_items_only  TYPE C, "   SPACE
lt_ra_wrttp  TYPE STANDARD TABLE OF C, "   
lv_i_all_ledgers  TYPE C, "   'X'
lt_ra_versn  TYPE STANDARD TABLE OF C, "   
lv_i_transdata_only  TYPE C, "   SPACE
lt_ra_perio  TYPE STANDARD TABLE OF C, "   
lt_t_objnr_select  TYPE STANDARD TABLE OF C. "   

  CALL FUNCTION 'K_TOTAL_INIT'  "
    EXPORTING
         I_OBJ_DELETE_FLAG = lv_i_obj_delete_flag
         I_ITEMS_ONLY = lv_i_items_only
         I_ALL_LEDGERS = lv_i_all_ledgers
         I_TRANSDATA_ONLY = lv_i_transdata_only
    TABLES
         T_LEDNR = lt_t_lednr
         RA_GJAHR = lt_ra_gjahr
         RA_WRTTP = lt_ra_wrttp
         RA_VERSN = lt_ra_versn
         RA_PERIO = lt_ra_perio
         T_OBJNR_SELECT = lt_t_objnr_select
. " K_TOTAL_INIT




ABAP code using 7.40 inline data declarations to call FM K_TOTAL_INIT

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_i_obj_delete_flag) = 'X'.
 
 
DATA(ld_i_items_only) = ' '.
 
 
DATA(ld_i_all_ledgers) = 'X'.
 
 
DATA(ld_i_transdata_only) = ' '.
 
 
 


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!