ABAP Keyword Documentation → ABAP − Short Reference
OPEN DATASET - Short Reference
Other versions: 7.31 | 7.40 | 7.54
Syntax
OPEN DATASET dset
FOR { INPUT | OUTPUT | APPENDING | UPDATE }
IN { { BINARY MODE }
| { TEXT MODE ENCODING { DEFAULT
| {UTF-8 [SKIPPING|WITH BYTE-ORDER MARK]}
| NON-UNICODE }
[WITH {NATIVE|SMART|UNIX|WINDOWS} LINEFEED] }
| { LEGACY BINARY MODE [{BIG|LITTLE} ENDIAN]
[CODE PAGE cp] }
| { LEGACY TEXT MODE [{BIG|LITTLE} ENDIAN]
[CODE PAGE cp]
[WITH {NATIVE|SMART|UNIX|WINDOWS} LINEFEED] } }
[AT POSITION pos]
[TYPE attr]
[FILTER opcom]
[MESSAGE msg]
[IGNORING CONVERSION ERRORS]
[REPLACEMENT CHARACTER rc].
Effect
Opens the file specified in dset
on the application server.
Additions
-
FOR { INPUT | OUTPUT | APPENDING | UPDATE }
Opens the file for reading, writing, appending, or changing. -
IN [LEGACY] { BINARY | TEXT } MODE
Opens the file in normal binary or text mode, or in legacy binary or text mode. -
ENCODING {DEFAULT|UTF-8|NON-UNICODE}
Determines in which character representation the content of the file is handled:
DEFAULT
- UTF-8 in Unicode systems; no conversion in non-Unicode systems.
UTF-8
- UTF-8.
NON-UNICODE
- Code page in accordance with the non-Unicode text environment in Unicode systems; no conversion in non-Unicode systems. -
WITH {NATIVE|SMART|UNIX|WINDOWS} LINEFEED
Determines the end-of-line selection for text files. -
SKIPPING|WITH BYTE-ORDER MARK
Controls handling of byte order mark in UTF-8 text files. -
{BIG|LITTLE} ENDIAN
Determines in which byte order numerical data objects in the file are handled. -
CODE PAGE cp
Specifies that character-like data objects in the file are handled in accordance with the code page specified incp
. -
AT POSITION pos
Sets the file pointer to the position specified inpos
. -
TYPE attr
Either sets operating-system-specific parameters for the file or controls the end-of-line selection for a text file. -
FILTER opcom
Transfers a statement to the operating system. -
MESSAGE msg
If an error occurs, this returns the corresponding operating system message inmsg
. -
IGNORING CONVERSION ERRORS
Suppresses an exception if a conversion error occurs. -
REPLACEMENT CHARACTER rc
Specifies inrc
a replacement character for non-convertible characters. If nothing is specified, "#" is used.