SAP LT_VARIANT_SAVE Function Module for









LT_VARIANT_SAVE is a standard lt variant save 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 lt variant save FM, simply by entering the name LT_VARIANT_SAVE into the relevant SAP transaction such as SE37 or SE38.

Function Group: SKBS
Program Name: SAPLSKBS
Main Program: SAPLSKBS
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function LT_VARIANT_SAVE 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 'LT_VARIANT_SAVE'"
EXPORTING
* I_TOOL = 'LT' "
* I_OVERWRITE = "
* I_CUSTOMER_NAME_CHECK = 'X' "
* I_USER_SPECIFIC = ' ' "
* I_NO_ATTRIBUTES = "
I_TABNAME = "
* I_TABNAME_SLAVE = "
IT_FIELDCAT = "
* IT_SORT = "
* IT_FILTER = "
* IT_FILTER_GROUPS = "
* IS_LAYOUT = "
* I_DIALOG = 'X' "

IMPORTING
E_EXIT = "
ET_SORT = "

CHANGING
CS_VARIANT = "
* C_SUMLEVEL = "

EXCEPTIONS
WRONG_INPUT = 1 FC_NOT_COMPLETE = 2 FOREIGN_LOCK = 3 VARIANT_EXISTS = 4 NAME_RESERVED = 5
.



IMPORTING Parameters details for LT_VARIANT_SAVE

I_TOOL -

Data type: LTDX-RELID
Default: 'LT'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_OVERWRITE -

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

I_CUSTOMER_NAME_CHECK -

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

I_USER_SPECIFIC -

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

I_NO_ATTRIBUTES -

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

I_TABNAME -

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

I_TABNAME_SLAVE -

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

IT_FIELDCAT -

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

IT_SORT -

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

IT_FILTER -

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

IT_FILTER_GROUPS -

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

IS_LAYOUT -

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

I_DIALOG -

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

EXPORTING Parameters details for LT_VARIANT_SAVE

E_EXIT -

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

ET_SORT -

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

CHANGING Parameters details for LT_VARIANT_SAVE

CS_VARIANT -

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

C_SUMLEVEL -

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

EXCEPTIONS details

WRONG_INPUT -

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

FC_NOT_COMPLETE -

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

FOREIGN_LOCK -

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

VARIANT_EXISTS -

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

NAME_RESERVED -

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

Copy and paste ABAP code example for LT_VARIANT_SAVE 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_e_exit  TYPE C, "   
lv_i_tool  TYPE LTDX-RELID, "   'LT'
lv_cs_variant  TYPE DISVARIANT, "   
lv_wrong_input  TYPE DISVARIANT, "   
lv_i_overwrite  TYPE C, "   
lv_i_customer_name_check  TYPE C, "   'X'
lv_i_user_specific  TYPE C, "   ' '
lv_i_no_attributes  TYPE C, "   
lv_et_sort  TYPE KKBLO_T_SORTINFO, "   
lv_i_tabname  TYPE KKBLO_TABNAME, "   
lv_c_sumlevel  TYPE I, "   
lv_fc_not_complete  TYPE I, "   
lv_foreign_lock  TYPE I, "   
lv_i_tabname_slave  TYPE KKBLO_TABNAME, "   
lv_it_fieldcat  TYPE KKBLO_T_FIELDCAT, "   
lv_variant_exists  TYPE KKBLO_T_FIELDCAT, "   
lv_it_sort  TYPE KKBLO_T_SORTINFO, "   
lv_name_reserved  TYPE KKBLO_T_SORTINFO, "   
lv_it_filter  TYPE KKBLO_T_FILTER, "   
lv_it_filter_groups  TYPE KKBLO_T_GROUPLEVELS, "   
lv_is_layout  TYPE KKBLO_LAYOUT, "   
lv_i_dialog  TYPE C. "   'X'

  CALL FUNCTION 'LT_VARIANT_SAVE'  "
    EXPORTING
         I_TOOL = lv_i_tool
         I_OVERWRITE = lv_i_overwrite
         I_CUSTOMER_NAME_CHECK = lv_i_customer_name_check
         I_USER_SPECIFIC = lv_i_user_specific
         I_NO_ATTRIBUTES = lv_i_no_attributes
         I_TABNAME = lv_i_tabname
         I_TABNAME_SLAVE = lv_i_tabname_slave
         IT_FIELDCAT = lv_it_fieldcat
         IT_SORT = lv_it_sort
         IT_FILTER = lv_it_filter
         IT_FILTER_GROUPS = lv_it_filter_groups
         IS_LAYOUT = lv_is_layout
         I_DIALOG = lv_i_dialog
    IMPORTING
         E_EXIT = lv_e_exit
         ET_SORT = lv_et_sort
    CHANGING
         CS_VARIANT = lv_cs_variant
         C_SUMLEVEL = lv_c_sumlevel
    EXCEPTIONS
        WRONG_INPUT = 1
        FC_NOT_COMPLETE = 2
        FOREIGN_LOCK = 3
        VARIANT_EXISTS = 4
        NAME_RESERVED = 5
. " LT_VARIANT_SAVE




ABAP code using 7.40 inline data declarations to call FM LT_VARIANT_SAVE

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 RELID FROM LTDX INTO @DATA(ld_i_tool).
DATA(ld_i_tool) = 'LT'.
 
 
 
 
DATA(ld_i_customer_name_check) = 'X'.
 
DATA(ld_i_user_specific) = ' '.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_i_dialog) = 'X'.
 


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!