Professional Documents
Culture Documents
How To Use TVARV Table in My Dialog Program
How To Use TVARV Table in My Dialog Program
Maintain list of variable ***************
- use STVARV to maintain list of values,
- select tab SELECTION OPTIONS
-enter name ZFIELD001
-click on yellow arrow
-write down list of value
******* AT value request ***************
PROCESS ON VALUE-REQUEST.
field ZTAB-FIELD001 MODULE f4_field001.
***** Module *******
MODULE f4_field001 INPUT.
data:
lt_outtab type table of DDSHRETVAL ,
ls_outtab type DDSHRETVAL.
select * from TVARVC into GT_TVARVC where name = 'ZFIELD001''.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = 'TVARVC'
RETFIELD = 'LOW'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = GT_TVARVC
RETURN_TAB = lt_outtab
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
if sy-subrc = 0.
read table lt_outtab into ls_outtab index 1.
if sy-subrc = 0.
ZTAB-FIELD001 = ls_outtab-FIELDVAL.
endif.
endif.
clear: lt_outtab ,ls_outtab,gt_knvk, gs_knvk.