SAP OPEN DATASET - Reference ABAP Statements

Get Example source ABAP code based on a different SAP table
  


Standard SAP Help for OPEN_DATASET

OPEN DATASET

ABAP Reference
ABAP Code Snippet


ABAP 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].
ABAP Code Snippet

What does it do? Opens the file specified in dset on the application server.

ABAP Addition 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 in cp.
AT POSITION pos
Sets the file pointer to the position specified in pos.
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 in msg.
IGNORING CONVERSION ERRORS
Suppresses an exception if a conversion error occurs.
REPLACEMENT CHARACTER rc
Specifies in rc a replacement character for non-convertible characters. If nothing is specified, '#' is used.

Return to menu