Ansicht
Dokumentation

ABAPIMPORT_MEDIUM - IMPORT MEDIUM

ABAPIMPORT_MEDIUM - IMPORT MEDIUM

General Material Data   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

IMPORT, medium

Short Reference



... ${ DATA BUFFER xstr $}
  $| ${ INTERNAL TABLE itab $}
  $| ${ MEMORY ID id $}
  $| ${ DATABASE      dbtab(ar) $[TO wa$] $[CLIENT cl$] ID id $}
  $| ${ SHARED MEMORY dbtab(ar) $[TO wa$] $[CLIENT cl$] ID id $}
  $| ${ SHARED BUFFER dbtab(ar) $[TO wa$] $[CLIENT cl$] ID id $} ...

Alternatives:

1. ... DATA BUFFER xstr

2. ... INTERNAL TABLE itab

3. ... MEMORY ID id

4. ... DATABASE dbtab(ar) $[TO wa$] $[CLIENT cl$] ID id

5. ... SHARED MEMORY dbtab(ar) $[TO wa$] $[CLIENT cl$] ID id

6. ... SHARED BUFFER dbtab(ar) $[TO wa$] $[CLIENT cl$] ID id

Effect

The data cluster to be imported can be taken from an elementary data object xstr or an internal table itab, the ABAP Memory, a database table dbtab, or a cross-program memory area (SHARED MEMORY or BUFFER specified).

Alternative 1

... DATA BUFFER xstr


Effect

If DATA BUFFER is specified, the data cluster is taken from the elementary data object xstr, which must be of the type xstring. The data object must contain a data cluster that was created using the DATA BUFFER addition of the EXPORT statement. Otherwise, a runtime error occurs. The data object must not be initial.

Example

See the example for the addition DATA BUFFER of the statement EXPORT.

Alternative 2

... INTERNAL TABLE itab


Effect

If INTERNAL TABLE is specified, the data cluster is taken from the internal table itab. The first column of itab must have the data type s or i and the second column must have the type x. The only table category allowed for itab are standard tables without secondary table keys. The internal table must contain a data cluster created using the INTERNAL TABLE addition of the EXPORT statement; otherwise, a runtime error occurs. The internal table must not be empty.

Example

See the example for the addition INTERNAL TABLE of the statement EXPORT.

Alternative 3

... MEMORY ID id


Effect

If MEMORY is specified, the data cluster that was written to the ABAP Memory under the ID specified in id by the statement EXPORT is imported. id expects a flat character-like data object. This object contains the ID of the data cluster, which is case-sensitive.

Note

Outside of classes, an obsolete short form exists, in which the addition ID can be omitted. This reads the data cluster stored using the statement EXPORT without specifying an ID.

Example

See the example for the addition MEMORY ID of the statement EXPORT.

Alternative 4

... DATABASE dbtab(ar) $[TO wa$] $[CLIENT cl$] ID id


Effect

If DATABASE is specified, the data cluster that was written to the export/import table dbtab in the area ar and under the ID specified in id using the statement EXPORT is imported. The export/import table dbtab must be structured as described in the EXPORT statement. id expects a flat, character-like data object that contains the ID of the data cluster, which is case-sensitive. The two-character area ar must be specified directly.

After TO, a work area wa that has the same data type as the database table dbtab can be specified. When imported, the values of the database fields that are between the fields SRTF2 and CLUSTR are assigned to the components of wa with the same name. If the addition TO wa is not specified within classes, no data transport takes place in these components. If the addition TO wa is not specified outside of classes, but the statement TABLES is used to declare a table work area for the export/import table dbtab, the values of these database fields are assigned to the components of the table work area dbtab with the same names during the import.

If the export/import table dbtab is client-dependent, a flat character-like field cl can be specified after the addition CLIENT. This field contains a client ID. If the addition is not specified, the current client is used.

Notes

  • Since each client represents a self-contained unit, the addition CLIENT should not be used in application programs.
  • It is still possible to use a table work area implicitly outside of classes instead of using TO wa explicitly. This should be considered an obsolete short form, however.
  • Only outside of classes can id still be replaced by the obsolete specification obs_id.

Example

Reading of the table exported under the name scarr_tab and the ID SCARR into the area SC of the database table DEMO_INDX_BLOB (see the example for the addition DATABASE of the statement EXPORT) into the internal table itab. Here, the freely selectable components are assigned to the structure wa.

Alternative 5

... SHARED MEMORY dbtab(ar) $[TO wa$] $[CLIENT cl$] ID id


Alternative 6

... SHARED BUFFER dbtab(ar) $[TO wa$] $[CLIENT cl$] ID id


Effect

If SHARED MEMORY or SHARED BUFFER is specified, the data cluster is imported that was written to the relevant application buffer of the shared memory using the statement EXPORT in the area ar and using the ID specified in id. The system accesses a memory table of the application buffer whose row structure is defined by an export/import table dbtab. The setup of this table is described in the statement EXPORT. id expects a flat character-like data object that contains the ID of the data cluster. The two-character area ar must be specified directly.

For the optional specification of the work area wa and client cl, the same applies as to imports from a database table.

Notes

  • The length of the key fields of the export/import table defined between the columns RELID and SRTF2 must not exceed 59 or 62 characters, depending on whether a client column exists.
  • Instead of using data clusters in the shared memory, it is best to use shared objects. Shared objects make it possible to store objects with complex dependencies, can be processed like regular objects, and enable multiple users to access the shared memory without any copying effort.

Example

Reading of the table exported under the name scarr_tab and the ID SCARR into the area SC of the cross-transaction application buffer (see the example for the addition SHARED BUFFER of the statement EXPORT) into the internal table itab. Here, the freely selectable components are assigned to the structure wa.






General Material Data   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 12978 Date: 20240424 Time: 183533     sap01-206 ( 181 ms )