ZVP_A and ZVP_B there are two programs. ZVP_A program data will be transfer to ZVP_B program using PERFORM display subroutine.
ZVP_A Program Code -
REPORT zvp_a.
TYPES: BEGIN OF ty_mara,
matnr TYPE mara-matnr,
mtart TYPE mara-mtart,
matkl TYPE mara-matkl,
END OF ty_mara.
DATA: it TYPE STANDARD TABLE OF ty_mara.
SELECT matnr
mtart
matkl
FROM mara INTO TABLE it
UP TO 10 ROWS.
PERFORM display IN PROGRAM zvp_b IF FOUND.
TYPES: BEGIN OF ty_mara,
matnr TYPE mara-matnr,
mtart TYPE mara-mtart,
matkl TYPE mara-matkl,
END OF ty_mara.
DATA: it TYPE STANDARD TABLE OF ty_mara.
SELECT matnr
mtart
matkl
FROM mara INTO TABLE it
UP TO 10 ROWS.
PERFORM display IN PROGRAM zvp_b IF FOUND.
ZVP_B Program Code -
REPORT zvp_b.
TYPES: BEGIN OF ty_mara,
matnr TYPE mara-matnr,
mtart TYPE mara-mtart,
matkl TYPE mara-matkl,
END OF ty_mara.
DATA: wa TYPE ty_mara.
PERFORM display.
FORM display.
DATA: lv_tname TYPE c LENGTH 30.
FIELD-SYMBOLS : <lt> TYPE ANY TABLE.
MOVE '(ZVP_A)IT' TO lv_tname.
ASSIGN (lv_tname) TO <lt>.
LOOP AT <lt> INTO wa.
write:/ wa-matnr,
wa-mtart,
wa-matkl.
ENDLOOP.
ENDFORM.
TYPES: BEGIN OF ty_mara,
matnr TYPE mara-matnr,
mtart TYPE mara-mtart,
matkl TYPE mara-matkl,
END OF ty_mara.
DATA: wa TYPE ty_mara.
PERFORM display.
FORM display.
DATA: lv_tname TYPE c LENGTH 30.
FIELD-SYMBOLS : <lt> TYPE ANY TABLE.
MOVE '(ZVP_A)IT' TO lv_tname.
ASSIGN (lv_tname) TO <lt>.
LOOP AT <lt> INTO wa.
write:/ wa-matnr,
wa-mtart,
wa-matkl.
ENDLOOP.
ENDFORM.
Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us. We will reply you as soon as possible.
Post a Comment