Ansicht
Dokumentation
ABAP/4 Dictionary: New Data Types LCHR and LRAW ( RELNBC_DS_30A_LONG_TYPES )
rdisp/max_wprun_time - Maximum work process run time RFUMSV00 - Advance Return for Tax on Sales/PurchasesThis documentation is copyright by SAP AG.
Short text
ABAP/4 Dictionary: New Data Types LCHR and LRAW
Description
Two new data types for long fields were implemented in the ABAP/4 Dictionary: LRAW and LCHR. These types are to be used for long fields with binary or character data. With the implementation of these types, the previous data type VARC can no longer be used for new fields for the definition of tables or structures. VARC will not be supported as of 4.0. (see under "Changes in procedure")
1. Using LRAW
The data type LRAW should be used for byte strings of arbitrary length, but with a minimum length of 256. Fields of type LRAW can occur in structures and tables. Fields of this type must be placed at the end in tables and have a preceding length field of type INT2. When using INSERT or UPDATE in ABAP/4 programs, the preceding length field must be filled with the length which is actually required. LRAW fields cannot be used in WHERE conditions. In new import/export tables, that is, in the INDX-type tables, the type LRAW must be used for the CLUSTD field instead of VARC.
2. Using LCHR
The data type LCHR should be used for character strings of arbitrary length, but with at least 256 characters.
Unlike binary data (LRAW), character data (LCHR) is converted automatically in heterogeneous environments,
providing the database system used supports ASCII-EBCDIC or code page conversion in heterogeneous networks.
Type LCHR is therefore suitable for long texts that are to be stored. Fields of type LCHR can occur
in structures and tables. Fields of this type must be placed at the end in tables and have a preceding
length field of the type INT2. When using INSERT or UPDATE in ABAP/4 programs, the preceding length field must be filled with the length actually required. LCHR fields cannot be used in WHERE conditions.
3. Difference between LCHR and CHAR or between LRAW and RAW
Fields of the type
CHAR or RAW can have any length in structures. In tables, however, the maximum length is only 255. If longer character fields or raw fields are to be used in tables, then the data types LCHR or LRAW must be used.
Damage caused to data by errors
Software/hardware requirements
Installation information
Effects on System Administration
Effects on Customizing
Effect on batch input
Changes to the Interface
Changes in procedure
Affects all customers who have used the data type VARC for their own fields!
Correction for fields with the type VARC:
In Release 3.0, the type VARC is supported for existing
fields, but not for new fields. As of 4.0, it is planned that data type VARC will no longer be supported.
In your own fields, therefore, type VARC should be replaced by LRAW or LCHR depending on application.
If possible, the persons responsible for the affected tables should do this, because the type allocation is application-dependent.
Please note the following points when replacing VARC with LRAW or VARC with LCHR: Data type VARC is to be replaced by LRAW in the field CLUSTD in the import/export tables. The type conversion VARC to LRAW can be carried out by activating the adapted table for transparent tables; thus, no conversion is necessary. However, if the affected fields are used in ABAP/4 programs in statements which involve an automatic ABAP/4 type conversion such as MOVE, COMPARE, and so on, the affected ABAP/4 programs are then incorrect. The type conversion VARC to LCHR leads to conversion in transparent tables; the affected ABAP/4 programs, however, remain correct. For logical pooled or cluster tables, the type conversions VARC to LCHR and VARC to LRAW can be carried out by activating the adapted table. The correction of the data type VARC is correspondingly simpler for structures. For structures and logical pooled or cluster tables, the same rules apply concerning the correctness of ABAP/4 programs which deal with VARC fields as for transparent tables during the VARC correction .
Procedure for removing dataset errors
Dependent functions
Planning
Further notes
ROGBILLS - Synchronize billing plans PERFORM Short Reference
This documentation is copyright by SAP AG.
Length: 4560 Date: 20240603 Time: 093247 sap01-206 ( 116 ms )