Variants: See ID must be specified and Implicit Field
Names not Allowed in Clusters Effect memory. All data exported to ABAP SY-SUBRC = 4: ABAP memory was probably empty. ABAP memory. These variants only exist for the sake of compatibility with
R/2. Please consult Data Area and Modularization Unit Organization documentation as well. Addition 2 Effect ABAP memory under the key key is imported. SY-SUBRC = 4: Related Variant 2 See Implicit field names not allowed in clusters and Table work areas not
allowed. Effect SY-SUBRC = 4: Example Addition 2 Effect Example Note Effect Note Runtime errors: Various runtime errors can occur, depending on the operands you use to
import data: Addition 5 Effect Example Addition 7 See Generic ID not allowed. Effect Note See Implicit field names not allowed in clusters Effect SY-SUBRC = 4: Variant 4 See Table work areas not allowed. Effect SY-SUBRC = 4: Effect Addition 2 Effect Example NAME: OTYPE: FTYPE: TFILL: FLENG: Variant 5 See Clusters not allowed in files Note Catchable runtime errors Variant 6 Additions: See No implicit field names allowed in clusters and Table work areas not
allowed. Effect SY-SUBRC = 4: Example Please consult Data Area and Modularization Unit Organization documentation as well. Effect Addition 4 Effect Example Effect Note Example Note Runtime errors: is set as follows: Note catchable runtime errors Additional help Creating a Directory of a Data Cluster Reading Data Objects from Cluster Databases
1. IMPORT obj1 ... objn FROM MEMORY.
2. IMPORT obj1 ... objn FROM DATABASE dbtab(ar) ID key.
3. IMPORT obj1 ... objn FROM LOGFILE ID key.
4. IMPORT DIRECTORY INTO itab FROM DATABASE dbtab(ar) ID key.
5. IMPORT obj1 ... objn FROM DATASET dsn(ar) ID key.
6. IMPORT obj1 ... objn FROM SHARED BUFFER dbtab(ar) ID key.
7. IMPORT (itab) FROM ... .
Additions:
1. ... = f (for each object to be imported)
2. ... TO f (for each object to be imported)
3. ... ID key
The
The contents of all listed objects remain unchanged.
You may have used an incorrect ID.
The contents of all listed objects remain unchanged.
Additions:
1. ... = f (for each object you want to import)
2. ... TO f (for each object you want to import)
3. ... CLIENT g (before ID key)
4. ... USING form
5. ... TO wa (as last addition or after dbtab(ar))
6. ... MAJOR-ID id1 (instead of ID key)
7. ... MINOR-ID id2 (together with MAJOR-ID id1)
You may have used an incorrect ID.
The contents of all listed objects remain unchanged.
TYPES: BEGIN OF TAB3_TYPE,
CONT(4),
END OF TAB3_TYPE.
DATA: INDXKEY LIKE INDX-SRTFD,
F1(4), F2 TYPE P,
TAB3 TYPE STANDARD TABLE OF TAB3_TYPE WITH
NON-UNIQUE DEFAULT KEY,
WA_INDX TYPE INDX.
INDXKEY = 'INDXKEY'.
IMPORT F1 = F1
F2 = F2
TAB3 = TAB3 FROM DATABASE INDX(ST) ID INDXKEY
TO WA_INDX.
Exception: The last field may be longer or shorter, as long as it has type
CHAR. Likewise, you can add or remove CHAR fields at the
end of the structure.
DATA: F1,
WA_INDX TYPE INDX.
IMPORT F1 = F1 FROM DATABASE INDX(AR) CLIENT '002' ID 'TEST'
TO WA_INDX.
Incompatible changes or further developments may occur at any time
without warning or notice.
DATA WA LIKE INDX.
DATA F1.
IMPORT F1 = F1 FROM DATABASE INDX(AR)
CLIENT '002' ID 'TEST'
TO WA.
WRITE: / 'AEDAT:', WA-AEDAT,
/ 'USERA:', WA-USERA,
/ 'PGMID:', WA-PGMID.
Incompatible changes or further developments may occur at any time
without warning or notice.
Additions:
1. ... = f (for each field f you want to import)
2. ... TO f (for each field f you want to import)
You may have used an incorrect ID.
The contents of all objects listed in the statement remain unchanged.
Additions:
1. ... CLIENT g (before ID key)
2. ... TO wa (last addition or after dbtab(ar))
You may have used an incorrect ID.
The internal table itab must have the same structure as the ABAP
Dictionary structure CDIR (
TYPES: BEGIN OF TAB3_LINE,
CONT(4),
END OF TAB3_LINE,
BEGIN OF DIRTAB_LINE.
INCLUDE STRUCTURE CDIR.
TYPES END OF DIRTAB_LINE.
DATA: INDXKEY LIKE INDX-SRTFD,
F1(4),
F2(8) TYPE P decimals 0,
TAB3 TYPE STANDARD TABLE OF TAB3_LINE,
DIRTAB TYPE STANDARD TABLE OF DIRTAB_LINE,
INDX_WA TYPE INDX.
INDXKEY = 'INDXKEY'.
EXPORT F1 = F1
F2 = F2
TAB3 = TAB3
TO DATABASE INDX(ST) ID INDXKEY " TAB3 has 17 entries
FROM INDX_WA.
...
IMPORT DIRECTORY INTO DIRTAB FROM DATABASE INDX(ST) ID INDXKEY
TO INDX_WA.
NAME OTYPE FTYPE TFILL FLENG
-----------------------------------
F1 F C 0 4
F2 F P 0 8
TAB3 T C 17 4
Structures and internal tables have type C.
For internal tables: Length of the header line.
1. ... = f (for each object you want to import)
2. ... TO f (for each object you want to import)
3. ... CLIENT g (before ID key)
4. ... TO wa (last addition or after dbtab(ar))
You may have used an incorrect ID.
The contents of all data objects listed in the statement remain unchanged.
TYPES: BEGIN OF ITAB3_LINE,
CONT(4),
END OF ITAB3_LINE.
DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
F1(4),
F2(8) TYPE P DECIMALS 0,
ITAB3 TYPE STANDARD TABLE OF ITAB3_LINE,
INDX_WA TYPE INDX.
* Import data
IMPORT F1 = F1 F2 = F2 ITAB3 = ITAB3
FROM SHARED BUFFER INDX(ST) ID INDXKEY TO INDX_WA.
* After the import, the fields before CLUSTR
* (INDX-AEDAT and INDX-USERA) are filled with the
* values they had before the corresponding EXPORT
* statement.
DATA: INDX_WA TYPE INDX,
F1.
IMPORT F1 = F1 FROM SHARED BUFFER INDX(AR)
CLIENT '001' ID 'TEST'
TO INDX_WA.
WRITE: / 'AEDAT:', INDX_WA-AEDAT,
/ 'USERA:', INDX_WA-USERA,
/ 'PGMID:', INDX_WA-PGMID.
The first column of the table contains the object name in the data cluster
(corresponds to obj1 ... objn from the static case. The second column
contains the different name in the program (if necessary), and corresponds to
f in the FROM f addition. If the table has only one column,
or the second column contains only blanks, the statemeht is the equivalent of
a static IMPORT with no TO addition. Both the first and the
second columns should have the type character.
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.
IMPORT (OBJ_TAB) FROM MEMORY ID 'ABCD'.
IMPORT A = A B = B_PROG C = C_PROG FROM MEMORY ID 'ABCD'.
The