Get Example source ABAP code based on a different SAP table
• BIG ENDIAN OPEN DATASET • LITTLE ENDIAN OPEN DATASET
OPEN DATASET>, endian> Short Reference >
ABAP_SYNTAX ... ${BIG$|LITTLE$} ENDIAN ...>
What does it do? This addition specifies that, when a legacy file> is opened, numeric data objects of the type i>, int8>, decfloat16>, decfloat34>, f>, or s> are stored in the file in the byte order> Big Endian or Little Endian. When a data object of these types is written or read, a conversion between these orders and the byte order of the current platform is performed, if necessary. If the addition is not specified, the byte order of the host computer> of the current ABAP_ASINSTANCE > is used.
Latest notes:
The statement SET DATASET>> can be used to specify a different byte order for an opened legacy file.
The addition ${BIG$|LITTLE$} ENDIAN> replaces the use of the obsolete statement TRANSLATE NUMBER FORMAT>> in the case of file accesses. ABAP_HINT_END
Example ABAP Coding
Opens a legacy binary file with different byte orders for writing. In each case, the integer 111 is written to the file and the content is read in binary format to a byte string. The results are 0000006F> and 6F000000>, that is, 111 in binary format in Big Endian and Little Endian. ABEXA 00468 ABAP_EXAMPLE_END