SAP K_VARIANCES_BATCH_LIST_WRITE Function Module for









K_VARIANCES_BATCH_LIST_WRITE is a standard k variances batch list write 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 variances batch list write FM, simply by entering the name K_VARIANCES_BATCH_LIST_WRITE into the relevant SAP transaction such as SE37 or SE38.

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



Function K_VARIANCES_BATCH_LIST_WRITE 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_VARIANCES_BATCH_LIST_WRITE'"
EXPORTING
I_USER = "
* I_VARNR = "
* I_SORTFNAME_1 = "
* I_SORTFNAME_2 = "
* I_SORTFNAME_3 = "
* I_XDESC = "
* I_BATCH_SUM = "
* I_FILTER = "
* I_FILTER_VAL = "
* I_OBJ_VAR_ALV = "
* I_LISTPARAM = "
I_DATA_SAVED = "
* I_LOG_DATA = "
* I_LS_RL = "
* I_LS_MESSAGE = "
* I_REPORT = "
* I_TEST = "
* I_PRTXT = "
* I_PLIST = "
I_CUMUL = "
I_ERR_COUNT = "
I_ERR_MAX = "
I_GJAHR1 = "
* I_GJAHR2 = ' ' "
I_PERIO1 = "
* I_PERIO2 = ' ' "

IMPORTING
E_SCHEDMAN_LS_EXT = "

TABLES
RESULT = "
T_KV20A = "
* ET_SPOOL = "
.



IMPORTING Parameters details for K_VARIANCES_BATCH_LIST_WRITE

I_USER -

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

I_VARNR -

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

I_SORTFNAME_1 -

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

I_SORTFNAME_2 -

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

I_SORTFNAME_3 -

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

I_XDESC -

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

I_BATCH_SUM -

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

I_FILTER -

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

I_FILTER_VAL -

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

I_OBJ_VAR_ALV -

Data type: OBJ_VAR_ALV_TAB
Optional: Yes
Call by Reference: Yes

I_LISTPARAM -

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

I_DATA_SAVED -

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

I_LOG_DATA -

Data type: OBJ_LOG_DATA
Optional: Yes
Call by Reference: Yes

I_LS_RL -

Data type: SCHEDMAN_EXT
Optional: Yes
Call by Reference: Yes

I_LS_MESSAGE -

Data type: SCHEDMAN_MESSAGE
Optional: Yes
Call by Reference: Yes

I_REPORT -

Data type: SYREPID
Optional: Yes
Call by Reference: Yes

I_TEST -

Data type: OBJ_VAR_GLOBAL-TEST
Optional: Yes
Call by Reference: Yes

I_PRTXT -

Data type: PRI_PARAMS-PRTXT
Optional: Yes
Call by Reference: Yes

I_PLIST -

Data type: PRI_PARAMS-PLIST
Optional: Yes
Call by Reference: Yes

I_CUMUL -

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

I_ERR_COUNT -

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

I_ERR_MAX -

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

I_GJAHR1 -

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

I_GJAHR2 -

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

I_PERIO1 -

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

I_PERIO2 -

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

EXPORTING Parameters details for K_VARIANCES_BATCH_LIST_WRITE

E_SCHEDMAN_LS_EXT -

Data type: SCHEDMAN_EXT
Optional: No
Call by Reference: Yes

TABLES Parameters details for K_VARIANCES_BATCH_LIST_WRITE

RESULT -

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

T_KV20A -

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

ET_SPOOL -

Data type: SCHEDMAN_SPOOL
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for K_VARIANCES_BATCH_LIST_WRITE 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_user  TYPE C, "   
lt_result  TYPE STANDARD TABLE OF KSS03, "   
lv_e_schedman_ls_ext  TYPE SCHEDMAN_EXT, "   
lv_i_varnr  TYPE KSS10-VARNR, "   
lv_i_sortfname_1  TYPE KDFIT-FIELDNAME, "   
lv_i_sortfname_2  TYPE KDFIT-FIELDNAME, "   
lv_i_sortfname_3  TYPE KDFIT-FIELDNAME, "   
lv_i_xdesc  TYPE KSS20-XDESC, "   
lv_i_batch_sum  TYPE SY-INPUT, "   
lv_i_filter  TYPE KDLIT-FIELDNAME, "   
lv_i_filter_val  TYPE KDLIT, "   
lv_i_obj_var_alv  TYPE OBJ_VAR_ALV_TAB, "   
lv_i_listparam  TYPE OBJ_LIST_PARAM_46A, "   
lt_t_kv20a  TYPE STANDARD TABLE OF KV20A, "   
lv_i_data_saved  TYPE SY-INPUT, "   
lv_i_log_data  TYPE OBJ_LOG_DATA, "   
lv_i_ls_rl  TYPE SCHEDMAN_EXT, "   
lv_i_ls_message  TYPE SCHEDMAN_MESSAGE, "   
lv_i_report  TYPE SYREPID, "   
lv_i_test  TYPE OBJ_VAR_GLOBAL-TEST, "   
lv_i_prtxt  TYPE PRI_PARAMS-PRTXT, "   
lv_i_plist  TYPE PRI_PARAMS-PLIST, "   
lv_i_cumul  TYPE C, "   
lt_et_spool  TYPE STANDARD TABLE OF SCHEDMAN_SPOOL, "   
lv_i_err_count  TYPE KSS10-ERR_COUNT, "   
lv_i_err_max  TYPE KSS10-ERR_MAX, "   
lv_i_gjahr1  TYPE KSS10-GJAHR1, "   
lv_i_gjahr2  TYPE KSS10-GJAHR2, "   SPACE
lv_i_perio1  TYPE KSS10-PERIO1, "   
lv_i_perio2  TYPE KSS10-PERIO2. "   SPACE

  CALL FUNCTION 'K_VARIANCES_BATCH_LIST_WRITE'  "
    EXPORTING
         I_USER = lv_i_user
         I_VARNR = lv_i_varnr
         I_SORTFNAME_1 = lv_i_sortfname_1
         I_SORTFNAME_2 = lv_i_sortfname_2
         I_SORTFNAME_3 = lv_i_sortfname_3
         I_XDESC = lv_i_xdesc
         I_BATCH_SUM = lv_i_batch_sum
         I_FILTER = lv_i_filter
         I_FILTER_VAL = lv_i_filter_val
         I_OBJ_VAR_ALV = lv_i_obj_var_alv
         I_LISTPARAM = lv_i_listparam
         I_DATA_SAVED = lv_i_data_saved
         I_LOG_DATA = lv_i_log_data
         I_LS_RL = lv_i_ls_rl
         I_LS_MESSAGE = lv_i_ls_message
         I_REPORT = lv_i_report
         I_TEST = lv_i_test
         I_PRTXT = lv_i_prtxt
         I_PLIST = lv_i_plist
         I_CUMUL = lv_i_cumul
         I_ERR_COUNT = lv_i_err_count
         I_ERR_MAX = lv_i_err_max
         I_GJAHR1 = lv_i_gjahr1
         I_GJAHR2 = lv_i_gjahr2
         I_PERIO1 = lv_i_perio1
         I_PERIO2 = lv_i_perio2
    IMPORTING
         E_SCHEDMAN_LS_EXT = lv_e_schedman_ls_ext
    TABLES
         RESULT = lt_result
         T_KV20A = lt_t_kv20a
         ET_SPOOL = lt_et_spool
. " K_VARIANCES_BATCH_LIST_WRITE




ABAP code using 7.40 inline data declarations to call FM K_VARIANCES_BATCH_LIST_WRITE

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 VARNR FROM KSS10 INTO @DATA(ld_i_varnr).
 
"SELECT single FIELDNAME FROM KDFIT INTO @DATA(ld_i_sortfname_1).
 
"SELECT single FIELDNAME FROM KDFIT INTO @DATA(ld_i_sortfname_2).
 
"SELECT single FIELDNAME FROM KDFIT INTO @DATA(ld_i_sortfname_3).
 
"SELECT single XDESC FROM KSS20 INTO @DATA(ld_i_xdesc).
 
"SELECT single INPUT FROM SY INTO @DATA(ld_i_batch_sum).
 
"SELECT single FIELDNAME FROM KDLIT INTO @DATA(ld_i_filter).
 
 
 
 
 
"SELECT single INPUT FROM SY INTO @DATA(ld_i_data_saved).
 
 
 
 
 
"SELECT single TEST FROM OBJ_VAR_GLOBAL INTO @DATA(ld_i_test).
 
"SELECT single PRTXT FROM PRI_PARAMS INTO @DATA(ld_i_prtxt).
 
"SELECT single PLIST FROM PRI_PARAMS INTO @DATA(ld_i_plist).
 
 
 
"SELECT single ERR_COUNT FROM KSS10 INTO @DATA(ld_i_err_count).
 
"SELECT single ERR_MAX FROM KSS10 INTO @DATA(ld_i_err_max).
 
"SELECT single GJAHR1 FROM KSS10 INTO @DATA(ld_i_gjahr1).
 
"SELECT single GJAHR2 FROM KSS10 INTO @DATA(ld_i_gjahr2).
DATA(ld_i_gjahr2) = ' '.
 
"SELECT single PERIO1 FROM KSS10 INTO @DATA(ld_i_perio1).
 
"SELECT single PERIO2 FROM KSS10 INTO @DATA(ld_i_perio2).
DATA(ld_i_perio2) = ' '.
 


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!