Ansicht
Dokumentation

ABENUNICODE_DATENCLUSTER - UNICODE DATENCLUSTER

ABENUNICODE_DATENCLUSTER - UNICODE DATENCLUSTER

Fill RESBD Structure from EBP Component Structure   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Storing Data Clusters

Overview

1. Exporting data
2. Importing data

New variants of the IMPORT and EXPORT statements are available to support heterogeneous Unicode environments. They allow you to store data as a cluster as an XSTRING in a cross-platform format.

1. Exporting data

  1. EXPORT  obj1 ... objn   TO DATA BUFFER dbuf.
  2. EXPORT (ObjTab) TO DATA BUFFER dbuf.

Stores the objects obj1 ... objn (fields, structures, or tables) as a cluster in the data buffer, dbuf, which must be of type XSTRING.

Example

TYPES:
  BEGIN OF ITAB3_TYPE,
    CONT(4) TYPE C,
  END OF ITAB3_TYPE.
DATA:
  XSTR  TYPE XSTRING,
  F1    TYPE C LENGTH 4,
  F2    TYPE P,
  ITAB3 TYPE STANDARD TABLE OF ITAB3_TYPE WITH
    NON-UNIQUE DEFAULT KEY INITIAL SIZE 2.

EXPORT F1 =    F1
       F2 FROM F2
       ITAB3 FROM ITAB3
       TO DATA BUFFER XSTR.



New addition ... CODE PAGE HINT f1. This addition to the EXPORT obj1 ...objn TO [ DATA BUFFER | DATABASE | DATASET ] statement specifies the codepage, f1 to be used to interpret the import data (used where the codepages are ambiguous).

2. Importing data

  1. IMPORT  obj1 ... objn FROM DATA BUFFER dbuf.
  2. IMPORT (objTab) FROM DATA BUFFER dbuf.

Imports the data objects obj1 ... objn (fields, structures, complex structures, or tables) from a data cluster in the data buffer entered, dbuf¸ which must be of type XSTRING. The system reads all the data that were previously stored in the data buffer dbuf using the EXPORT ... TO DATA BUFFER statement. Again, the system does not check that the structures match when these EXPORT and IMPORT statements are used.

Note

The first column of the objTab table contains the object names in the data cluster, which correspond to obj1...objn statically. The second column contains the names used in the program (where these differ) that is, corresponding to the name of the field when the source field was assigned. If the table contains only one column, or if the second column contains only blank fields, this corresponds to a static IMPORT or EXPORT (without a source field assignment).

In any case the first and (if available) second columns of the internal table must be of type C or STRING. In ABAP Objects, objTab must have at least two columns, since the formal parameter is stored in the second column. Moreover, the table must not be defined as HASHED TABLE HASHED TABLE or ANY TABLE ANY TABLE.






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 3845 Date: 20240328 Time: 120440     sap01-206 ( 62 ms )