F How to access one program data to another program without EXPORT IMPORT or GET SET? | CodeTheta

How to access one program data to another program without EXPORT IMPORT or GET SET?

September 09, 2023

First Program Code : 

REPORT zvp_a.

TYPESBEGIN OF ty_mara,
         matnr TYPE mara-matnr,
         mtart TYPE mara-mtart,
         matkl TYPE mara-matkl,
       END OF ty_mara.

DATAit 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

Second Program Code : 

REPORT zvp_b.

TYPESBEGIN OF ty_mara,
         matnr TYPE mara-matnr,
         mtart TYPE mara-mtart,
         matkl TYPE mara-matkl,
       END OF ty_mara.

DATAwa TYPE ty_mara.

PERFORM display.

FORM display.
  DATAlv_tname TYPE LENGTH 30.
  FIELD-SYMBOLS <table> TYPE ANY TABLE.
  MOVE '(ZVP_A)IT' TO lv_tname.
  ASSIGN (lv_tnameTO <table>.

  LOOP AT <table> INTO wa.
    write:/ wa-matnr,
            wa-mtart,
            wa-matkl.
  ENDLOOP.

ENDFORM.

Execute ZVP_A Program.

Output :




IDE Used To Test This Code : ABAP Editor.
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