ABAPIMPORT_DIRECTORY - IMPORT DIRECTORY

Addresses (Business Address Services)   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

IMPORT DIRECTORY

Short Reference



Syntax

IMPORT DIRECTORY INTO itab
  FROM DATABASE dbtab(ar) [TO wa] [CLIENT cl] ID id.

Effect

With this statement, a table of contents of all data objects of adatacluster that was written to the database table dbtab in the area ar and under theID specified in id using the statement EXPORT is passed to the internal table itab. The database table dbtab must beset upas described for the statement EXPORT. For id, aflatcharacter-likedata object is expected that contains the ID of the data cluster and the two-digit area armust be specified directly. The additions TO and CLIENT also have the same relevance asdescribed in the statement IMPORT for important data from the data cluster.

For itab, index tables whose row type matches the structureCDIR in the ABAP Dictionary are allowed. The following table shows the components of the structure CDIR and their relevance.

ComponentTypeRelevance
NAMECHAR(30)Name of the parameter under which a data object was stored.
OTYPECHAR(1)General type of the stored data object. The following values are possible: "F" for elementary, flat data objects, "G" for strings, "R" forflat structures, "S" fordeepstructures, "T" for internal tables with a flat row type and "C" for tables with a deep row type.
FTYPECHAR(1)Exact type of the stored data object. For elementary data objects and internal tableswith a elementary row type, the data or row type is returned in accordance with the table of returnvalues from DESCRIBEFIELD ... TYPE ("a", "b", "C", "D", "e", "g", "F", "I", "N", "P", "s", "T", "X", "y"). In the case of flat structures and internal tables with flat structured row types, "C" is returned. In the case ofdeepstructures and internal tables with deep, structured row type, "v" is returned. In the case of a table that has an internal table as a row type, "h" is returned.
TFILLINT4Filled length of the stored data object. For strings, the length of the content inbytes is returned; for internal tables, the number of rows is returned; for other data objects, the value 0 is returned.
FLENGINT2Length of the stored data object or the stored table rows in bytes. For strings, the value 8 is returned.

System fields

sy-subrcRelevance
0The specified data cluster was found and a list of the imported data objects was passed to the internal table itab.
4The specified data cluster was not found.

Example

Storing three data objects in a data cluster and reading the directory. The content of the table itab in a Unicode system is as follows:

NAMEOTYPEFTYPETFILLFLENG
"PAR1""F""a"08
"PAR2""T""I"104
"PAR3""R""C"0168

DATA: f1 TYPE decfloat16,
      f2 TYPE TABLE OF i,
      f3 TYPE spfli.

DATA itab TYPE STANDARD TABLE OF cdir.

DO 10 TIMES.
  APPEND sy-index TO f2.
ENDDO.

EXPORT par1 = f1
       par2 = f2
       par3 = f3 TO DATABASE indx(hk) ID 'HK'.

IMPORT DIRECTORY INTO itab FROM DATABASE indx(hk) ID 'HK'.

Exceptions

Non-Catchable Exceptions

  • Cause: Target table has illegal structure.
    Runtime Error: IMPORT_DIR_WRONG_TABLE_STRUC







CPI1466 during Backup   General Data in Customer Master  
This documentation is copyright by SAP AG.


Length: 7119 Date: 20120522 Time: 064552     triton ( 231 ms )