c
, the addition has no effect.
This addition cannot be used together with the previous conversion
additions.
Latest notes: Note that a program using this addition cannot be
transported between systems where character representations require
different numbers of bytes. This addition designed only for temporary
programs, enabling them to import byte strings stored incorrectly in
fields of the type c and to store them again for the correct
type.
ABAP_ADDITION_6 ... CODE PAGE INTO cp
What does it do? This addition assigns the ID of the code page of the
exported data to the data object cp . This object must have a
character-like data type. The ID of the code page is the content of the
column CPCODEPAGE of the database table
TCP00 .
Latest notes: The code page can be used to edit data objects imported
using CHAR-TO-HEX MODE . Conversions between code pages can be
performed using system classes described in the section
Classes for Conversion of External Data Formats
.
ABAP_ADDITION_7 ... ENDIAN INTO endian
What does it do? This addition assigns the ID of the byte order of the
exported data to the data object ENDIAN , which must have the data
type ABAP_ENDIAN from the type group
ABAP. The ID for big endian is "B" ; the identification for
little endian is "L" .
Latest notes: The byte order can be used to process data objects imported
using CHAR-TO-HEX MODE , since code pages in which a character
takes up more than one byte can be dependent on the byte order.
Example ABAP Coding The target field f2-col2 contains, after the
import, the unconverted, binary content of f1-col2 . The code page
and the byte order in which the data is stored is in cp and
en . Normally, the data in such a case is exported and imported in
another program. Note that this example only works in a system in which
a character is displayed using two bytes, since f2-col2 is double
the length of f1-col2 .
DATA: BEGIN OF f1,
col1 TYPE c LENGTH 10 VALUE '1234567890',
col2 TYPE c LENGTH 10 VALUE '1234567890',
END OF f1.
DATA: BEGIN OF f2,
col1 TYPE c LENGTH 10,
col2 TYPE x LENGTH 20,
END OF f2.
DATA: cp TYPE string,
en TYPE abap_endian.
EXPORT para = f1 TO DATABASE demo_indx_table(hk) ID 'HK'.
...
IMPORT para = f2 FROM DATABASE demo_indx_table(hk) ID 'HK'
IN CHAR-TO-HEX MODE
CODE PAGE INTO cp
ENDIAN INTO en.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved