‎2006 Sep 27 2:30 PM
hi all
how to use inport and export statements in reports ?
thanks & regards
brahma
‎2006 Sep 27 2:31 PM
Basically in your calling ABAP...
you can use the EXPORT.
EXPORT f1 TO MEMORY.
SUBMIT zrep1 and return.
ZREP1 report.
IMPORT f1 FROM MEMORY.
‎2006 Sep 27 2:33 PM
Please see these examples for memory id
Simple form:
EXPORT <variables>/<internal tables> MEMORY ID 'MID'.
IMPORT <variables>/<internal tables> FROM MEMORY
ID 'MID'.
Note that the datatype and names of the variables and
internal tables need to be same in both programs.
‎2006 Sep 27 2:33 PM
hi
IMPORT ITAB TO ITAB FROM MEMORY ID 'MOVEMENTS'.
EXPORT ITAB1 TO ITAB1 TO MEMORY ID 'INITINV'.
Regards
‎2006 Sep 27 2:34 PM
Hi,
In your ABAP editor, write IMPORT / Export and do F1.
You will get all sorts of options.
Hope that helps.
Manish
‎2006 Sep 27 2:34 PM
‎2006 Sep 27 2:35 PM
<b>Import</b>
TYPES: BEGIN OF OBJ_LINE,
CLUSTERNAME(30),
PROGRAMNAME(10),
END OF OBJ_LINE,
BEGIN OF B_LINE,
FIELD_1 TYPE I,
FIELD_2(1) TYPE N,
END OF B_LINE.
DATA: OBJ_TAB TYPE STANDARD TABLE OF OBJ_LINE,
OBJ_WA TYPE OBJ_LINE,
B_PROG TYPE STANDARD TABLE OF B_LINE,
B_WA TYPE B_LINE,
A(10),
C_PROG LIKE SYST.
MOVE: 'A' TO OBJ_WA-CLUSTERNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
MOVE: 'B' TO OBJ_WA-CLUSTERNAME,
'B_PROG' TO OBJ_WA-PROGRAMNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
MOVE: 'C' TO OBJ_WA-CLUSTERNAME,
'C_PROG' TO OBJ_WA-PROGRAMNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
<b>IMPORT (OBJ_TAB) FROM MEMORY ID 'ABCD'.</b>
<b>export</b>
TYPES: BEGIN OF OBJ_LINE,
CLUSTERNAME(30),
PROGRAMNAME(10),
END OF OBJ_LINE.
DATA: OBJ_TAB TYPE STANDARD TABLE OF OBJ_LINE,
OBJ_WA TYPE OBJ_LINE.
TYPES: BEGIN OF B_LINE,
FIELD_1 TYPE I,
FIELD_2(1) TYPE N,
END OF B_LINE.
DATA: B_PROG TYPE STANDARD TABLE OF B_LINE.
DATA: A(10),
C_PROG LIKE SYST.
MOVE: 'A' TO OBJ_WA-CLUSTERNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
MOVE: 'B' TO OBJ_WA-CLUSTERNAME,
'B_PROG' TO OBJ_WA-PROGRAMNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
MOVE: 'C' TO OBJ_WA-CLUSTERNAME,
'C_PROG' TO OBJ_WA-PROGRAMNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
<b>EXPORT (OBJ_TAB) TO MEMORY ID 'ABCD'.</b>
‎2006 Sep 27 2:35 PM
Check the sample code:
data: ws_anlage_pod LIKE eanl-anlage,
wk_division LIKE eanl-sparte,
ws_anlage = '1212313'.
wk_division = '12'.
EXPORT ws_anlage_pod TO MEMORY ID 'anlage_pod'.
EXPORT wk_division TO MEMORY ID 'division'.
In the importing program declare the sample variable and import it.
data: ws_anlage_pod LIKE eanl-anlage,
wk_division LIKE eanl-sparte.
IMPORT ws_anlage_pod FROM MEMORY ID 'anlage_pod'.
IMPORT wk_division FROM MEMORY ID 'division'.
Prakash.