07-11-2008 5:55 AM
Explain the EXPORT and IMPORT commands? How can you pass more than one
group of data by using IMPORT commands?
07-11-2008 5:56 AM
Hi
EXPORT & IMport Commands are useful in trasferring the data from one program to another program by using ABAP and SAP maemory
SAP memory
The SAP memory, otherwise known as the global memory, is available to a user during the entire duration of a terminal session. Its contents are retained across transaction boundaries as well as external and internal sessions. The SET PARAMETER and GET PARAMETER statements allow you to write to, or read from, the SAP memory.
ABAP/4 memory
The contents of the ABAP/4 memory are retained only during the lifetime of an external session (see also Organization of Modularization Units). You can retain or pass data across internal sessions. The EXPORT TO MEMORY and IMPORT FROM MEMORY statements allow you to write data to, or read data from, the ABAP memory.
For different forms of passing the data by using IMPORt and EXPORt
flloeww the link
http://members.tripod.com/sap_abap/import01.htm
Regards
Pavan
Edited by: Pavan Bhamidipati on Jul 11, 2008 6:59 AM
07-11-2008 5:57 AM
Hi john,
i hope this will help u out.
EXPORT :-
To read data objects from an ABAP program into ABAP memory, use the following
statement:
Syntax
EXPORT <f1> [FROM <g 1>] <f 2> [FROM <g 2>] ... TO MEMORY ID <key>.
This statement stores the data objects specified in the list as a cluster in memory. If you
do not use the option FROM <f i >, the data object <f i > is saved under its own name. If
you use the FROM <g i > option, the data objet <g i > is saved under the name <f i >.
The name <key> identifies the cluster in memory. It may be up to 32 characters long.
The EXPORT statement always completely overwrites the contents of any existing data
cluster with the same name <key>.
IMPORT :-
To read data objects from ABAP memory into an ABAP program, use the following
statement:
Syntax
IMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.
This statement reads the data objects specified in the list from a cluster in memory. If
you do not use the TO <g i > option, the data object <f i > in memory is assigned to the
data object in the program with the same name. If you do use the option, the data object
<f i > is read from memory into the field <g i >. The name <key> identifies the cluster in
memory. It may be up to 32 characters long.
You do not have to read all of the objects stored under a particular name <key>. You
can restrict the number of objects by specifying their names. If the memory does not
contain any objects under the name <key>, SY-SUBRC is set to 4.
Rewards with pts if answered.
thanks,
Anurodh
07-11-2008 5:59 AM
Hi john,
PLease chcek this sites;-
http://help.sap.com/saphelp_nw70/helpdata/en/7c/209667b05b844399f6402a0213ef95/content.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/76/1f07205a499947bda5149e692dae94/content.htm
Regards,
Bhumika
07-11-2008 5:59 AM
Hey!!
Check out this link
http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm
Regards
Abhijeet Kulshreshtha
07-11-2008 6:02 AM
Check following links for example code...
To Export
http://www.erpgenie.com/abap/code/chap1401.txt
To Import
07-11-2008 6:03 AM
hi,
Check thhis link.
http://www.sapbrainsonline.com/ARTICLES/TECHNICAL/ABAP/MEMORY/SAP_INTERNAL_MEMORY.html
regards
Sumit Agarwal
07-11-2008 6:12 AM
hi..
syntax of EXPORT command is...
EXPORT parameter_list TO medium [COMPRESSION {ON|OFF}].
This statement stores a data cluster defined using parameter_list in a storage area medium. You can use the COMPRESSION addition to specify whether the data is stored in the cluster in compressed form. You can retrieve a data cluster from the storage area using the IMPORT statement and delete a data cluster using DELETE FROM.
All data objects are archived according to the current byte sequence (endian) and character-like data objects according to the current character representation of the current text environment. The identification of the data cluster indicates which byte sequence and character representation have been used during the export. When you import the data cluster using the IMPORT statement, this identification is evaluated and the data is converted to the current byte sequence and character representation.
syntax of IMPORT command is...
IMPORT parameter_list FROM medium [conversion_options].
Import data objects specified in parameter_list from a data cluster stored in the memory area medium. If required, the data is automatically converted to the current byte sequence (Endian) and character representation. Use additions conversion_options to make adaptations to the current platform.
hope this will clear your doubt.
please reward if it helps.
thanks.
07-11-2008 6:28 AM
Hello John,
EXPORT <FIELD1> TO MEMORY ID <ID>
EXPORT <FIELD2> TO MEMORY ID <ID>
this will overwrite the field1 with field2.
EXPORT <FIELD1> <FIELD2> TO MEMORY ID <ID>
here you will have both the fields in the ID.
Hope you find it helpful
Indu.