Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

import/export statements

Former Member
0 Likes
910

hi all

how to use inport and export statements in reports ?

thanks & regards

brahma

7 REPLIES 7
Read only

Former Member
0 Likes
878

Basically in your calling ABAP...

you can use the EXPORT.

EXPORT f1 TO MEMORY.

SUBMIT zrep1 and return.

ZREP1 report.

IMPORT f1 FROM MEMORY.

Read only

Former Member
0 Likes
878

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.

Read only

Former Member
0 Likes
878

hi

IMPORT ITAB TO ITAB FROM MEMORY ID 'MOVEMENTS'.

EXPORT ITAB1 TO ITAB1 TO MEMORY ID 'INITINV'.

Regards

Read only

Former Member
0 Likes
878

Hi,

In your ABAP editor, write IMPORT / Export and do F1.

You will get all sorts of options.

Hope that helps.

Manish

Read only

Former Member
0 Likes
878

hi Brahma,

WELCOME TO SDN ..

Check..

Regards,

santosh

Read only

Former Member
0 Likes
878
<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>
Read only

Former Member
0 Likes
878

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.