<(>
hex_container . To achieve the same result, the structure wa
could be passed directly. The recommended procedure however is to
use the field symbol, because it explicitly passes a binary data type to
a binary file. This type of storage is only recommended for short-term
storage within the same system, because the byte-like content depends on
the byte order and the current system code page. For long-term storage
or for exchanging between systems, the data should be converted to
character-like containers and stored as a text file.
DATA: file TYPE string VALUE `flights.dat`,
wa TYPE spfli.
FIELD-SYMBOLS <(><<)>hex_container> TYPE x.
OPEN DATASET file FOR OUTPUT IN BINARY MODE.
SELECT *
FROM spfli
INTO wa.
ASSIGN wa TO <(><<)>hex_container> CASTING.
TRANSFER <(><<)>hex_container> TO file.
ENDSELECT.
CLOSE DATASET file.
Runtime Exceptions
Catchable Exceptions
CX_SY_CODEPAGE_CONVERTER_INIT
Reason for error: The desired conversion is not supported. (For example,
because a language not supported by the conversion was specified using
SET LOCALE LANGUAGE .)
Runtime error: CONVT_CODEPAGE_INIT
CX_SY_CONVERSION_CODEPAGE
Reason for error: Conversion is not possible.
Runtime error: CONVT_CODEPAGE
CX_SY_FILE_AUTHORITY
Reason for error: No authorization to access the file.
Runtime error: OPEN_DATASET_NO_AUTHORITY
CX_SY_FILE_IO
Reason for error: Error when writing to the file.
Runtime error: DATASET_WRITE_ERROR
CX_SY_FILE_OPEN
Reason for error: File cannot be opened.
Runtime error: DATASET_CANT_OPEN
CX_SY_FILE_OPEN_MODE
Reason for error: The file is not open.
Runtime error: DATASET_NOT_OPEN
Reason for error: The file was opened in a Unicode program using
OPEN
DATASET ... FOR INPUT and cannot be written to.
Runtime error: DATASET_READ_ONLY
CX_SY_PIPE_REOPEN
Reason for error: The file was opened using the addition FILTER and
since then a switch of the work process took place.
Runtime error: DATASET_PIPE_CLOSED
CX_SY_TOO_MANY_FILES
Reason for error: Maximum number of open files exceeded.
Runtime error: DATASET_TOO_MANY_FILES
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved