SAP OPEN DATASET ERROR HANDLING ABAP Statements
Get Example source ABAP code based on a different SAP table
OPEN DATASET -
ABAP Syntax
ABAP Addition
1
2
3
What does it do? :These additions allow the system to receive operating system
• MESSAGE OPEN DATASET
ABAP Addition
What does it do? :If an error occurs when a file is opened, the corresponding operating system message is assigned to the data object
Example ABAP Coding
:Operating system message issued after an attempt to open a file with an empty name. DATA mess TYPE string.
OPEN DATASET `` FOR INPUT IN BINARY MODE MESSAGE mess.
IF sy-subrc = 8.
MESSAGE mess TYPE 'I'.
ENDIF.
• IGNORING CONVERSION ERRORS OPEN DATASET
ABAP Addition
What does it do? :This addition can be used to suppress a treatable exception defined by the class
This addition is possible when opening
Latest notes:
RESET M2 Each unconvertible character is replaced during conversion either by the character
This setting can be changed in an opened file using the statement
• REPLACEMENT CHARACTER OPEN DATASET
ABAP Addition
What does it do? :If a conversion between
This addition is possible when opening
Latest notes:
RESET M2 If at least one character is replaced by a replacement character during reading or writing, after conversion, the exception defined in the class
The replacement character of an opened file can be changed using the statement
Return to menu