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

Export statement in user-exit??

Former Member
0 Likes
1,882

I have used the following export statement in a user-exit:"EXPORT xaccit TO MEMORY ID 'ZCACHEPPA'."-I have doubt that - will this statement export the contents of the table XACCIT to memory and those contents in the memory will be imported by the IMPORT statement in other user-exit.....??

If no,then which EXPORT/IMPORT statement should be used....is there any other keyword that can be used to export the contents to the memory?

7 REPLIES 7
Read only

Former Member
0 Likes
1,162

Hi,

It will export the internal table to the memory..

Then you can IMPORT statement to get the values from the memory...as long as the IMPORT statement is used in the same run time..

Ex..

IMPORT xaccit FROM MEMORY ID 'ZCACHEPPA'.

Thanks,

Naren

Read only

Former Member
0 Likes
1,162

Hi,

If that doesn't work, you could try set parameter and get parameter statement.

Hope this helps

Bob

Read only

Former Member
0 Likes
1,162

Hi

See the doc related to SAP Memory and ABAP memory

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

Reward points if useful

Regards

Anji

Read only

Former Member
0 Likes
1,162

I beleive the memory id should be of length 3 only

EXPORT xaccit TO MEMORY ID<b> 'ZCA'</b>.

and IMPORT statement should inport the data

Read only

Former Member
0 Likes
1,162

hi,

yes it will export the table contents to the memory id.

and it will be imported in the targeted program.

reward points if it is useful

Regards,

Sangeetha.a

Read only

Former Member
0 Likes
1,162

But I think EXPORT obj1 ... objn TO MEMORY only keeps the data while the same session is running, but the statement EXPORT obj1 ... objn TO SHARED BUFFER itab(ar) ID key saves the data into the database with an ID key. Then another session may have access to this data when using the same ID key.

What say....am I Right??

Read only

Former Member
0 Likes
1,162

Hi,

Yes you are right..

Thanks,

Naren