Field Symbols Example to Change Value at run time
Changin Value at Run time
FIELD-SYMBOLS: TYPE any.
FIELD-SYMBOLS: TYPE any.
LOOP AT t_item[] ASSIGNING .
ASSIGN COMPONENT 'VV077' OF STRUCTURE TO .
IF IS ASSIGNED.
= '0.01'.
MODIFY t_item[] FROM .
ENDIF.
ENDLOOP.
XCOPA500 copa Document
COPA0005 Enhancement for actual data update (CO-PA)
EXIT_SAPLKEII_001
EXIT_SAPLKEII_002
FIELD-SYMBOLS: TYPE any.
FIELD-SYMBOLS: TYPE any.
FIELD-SYMBOLS: TYPE any.
data : lv_matnr type mara-matnr.
LOOP AT t_item[] ASSIGNING .
ASSIGN COMPONENT 'VV077' OF STRUCTURE TO .
ASSIGN COMPONENT 'ARTNR' OF STRUCTURE TO .
IF IS ASSIGNED.
lv_matnr = .
SELECT SINGLE MATNR,UMREZ,UMREN FROM MARM INTO @DATA(GS_MARM) WHERE MATNR = @lv_matnr.
= '0.01'.
MODIFY t_item[] FROM .
ENDIF.
clear: lv_matnr.
ENDLOOP.
FIELD-SYMBOLS: TYPE any.
FIELD-SYMBOLS: TYPE any.
FIELD-SYMBOLS: TYPE any.
data : lv_matnr type mara-matnr,
lv_umrez type marm-umrez.
LOOP AT t_item[] ASSIGNING .
ASSIGN COMPONENT 'VV077' OF STRUCTURE TO .
ASSIGN COMPONENT 'ARTNR' OF STRUCTURE TO .
IF IS ASSIGNED.
lv_matnr = .
SELECT SINGLE MATNR,UMREZ,UMREN FROM MARM INTO @DATA(GS_MARM) WHERE MATNR = @lv_matnr and MEINH = 'PAL'.
lv_umrez = gs_marm-umren / gs_marm-umrez.
= lv_umrez .
MODIFY t_item[] FROM .
ENDIF.
clear: lv_matnr,lv_umrez,gs_marm.
ENDLOOP.
FIELD-SYMBOLS: TYPE any.
FIELD-SYMBOLS: TYPE any.
FIELD-SYMBOLS: TYPE any.
FIELD-SYMBOLS: TYPE any.
data : lv_matnr type mara-matnr,
lv_umrez type p DECIMALS 3,
LV_ABSMG TYPE LAENG.
LOOP AT t_item[] ASSIGNING .
ASSIGN COMPONENT 'VV077' OF STRUCTURE TO .
ASSIGN COMPONENT 'ARTNR' OF STRUCTURE TO .
ASSIGN COMPONENT 'ABSMG' OF STRUCTURE TO .
IF IS ASSIGNED.
lv_matnr = .
LV_ABSMG = .
SELECT SINGLE MATNR,UMREZ,UMREN FROM MARM INTO @DATA(GS_MARM) WHERE MATNR = @lv_matnr and MEINH = 'PAL'.
lv_umrez = gs_marm-umren / gs_marm-umrez.
lv_umrez = LV_UMREZ * LV_ABSMG.
= lv_umrez .
MODIFY t_item[] FROM .
ENDIF.
clear: lv_matnr,lv_umrez,gs_marm,,LV_ABSMG.
ENDLOOP.
Comments
Post a Comment