Application Development 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: 

export import to memory

former_member189410
Participant
0 Kudos
328

hi,

i exported one internal table to memory

git_fi_flowdata[] = g_tab_selected_flowdata[] .

EXPORT git_fi_flowdata[] to database indx(x1) ID '<FLOWT>'.

my internal table git_fi_flowdata contains ddtaa but wen i import from memory

import git_fi_flowdata[] from DATABASE indx(x1) ID '<FLOWT>'. i m getting blank internal table can anyone letme knoe y so .

thnx points weill b assigned

1 ACCEPTED SOLUTION

Former Member
0 Kudos
154

Hello,

If ur export and import are in the same session then there is no need to export from database.

Try this


git_fi_flowdata[] = g_tab_selected_flowdata[] .
EXPORT git_fi_flowdata[] to memory  ID 'FLOWT'.

EXPORT git_fi_flowdata[] from memory  ID 'FLOWT'.

Regards,

Vasanth

8 REPLIES 8

Former Member
0 Kudos
154

hi,

try this

EXPORT L_DISCOUNT TO MEMORY ID 'CP_DISCOUNT'.

and

IMPORT L_DISCOUNT FROM MEMORY ID 'CP_DISCOUNT'.

regards,

venkatesh

Former Member
0 Kudos
154

Hi

SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens

SAP global memory retains field value through out session.

set parameter id 'MAT' field v_matnr.

get parameter id 'MAT' field v_matnr.

They are stored in table TPARA.

ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data

to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.

ABAP memory is temporary and values are retained in same LUW.

export itab to memory id 'TEST'.

import itab from memory Id 'TEST'.

Here itab should be declared of same type and length.

http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm

ABAP Memmory & SAP Memmory

http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm

http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos
155

Hello,

If ur export and import are in the same session then there is no need to export from database.

Try this


git_fi_flowdata[] = g_tab_selected_flowdata[] .
EXPORT git_fi_flowdata[] to memory  ID 'FLOWT'.

EXPORT git_fi_flowdata[] from memory  ID 'FLOWT'.

Regards,

Vasanth

Former Member
0 Kudos
154

Hi,

For EXPOR & IMPORT use the same abap Session. If u run separate sessions u won't import.

Selva

former_member404244
Active Contributor
0 Kudos
154

Former Member
0 Kudos
154

please see the sample of my query it was exporting an internal table data and then importing it also ..

TYPES: 
  BEGIN OF tab_type, 
    para TYPE string, 
    dobj TYPE string, 
  END OF tab_type. 

DATA: 
  id    TYPE c LENGTH 10 VALUE 'TEXTS', 
  text1 TYPE string VALUE `IKE`, 
  text2 TYPE string VALUE `TINA`, 
  line  TYPE tab_type, 
  itab  TYPE STANDARD TABLE OF tab_type. 

line-para = 'P1'. 
line-dobj = 'TEXT1'. 
APPEND line TO itab. 

line-para = 'P2'. 
line-dobj = 'TEXT2'. 
APPEND line TO itab. 

EXPORT (itab)     TO MEMORY ID id. 
IMPORT p1 = text2 
       p2 = text1 FROM MEMORY ID id. 

Reward points if it us usefull ...

Girish

0 Kudos
154

hi,

my scenario is i m having one zreport in which i m exporting my internal table t memory and in another function module i m importing it .

thnx ,

0 Kudos
154

Hi,

can anyone let me know y data is not coming wid export import .

tnx