Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

OPEN DATASET p_opath FOR OUTPUT

OPEN DATASET p_opath FOR OUTPUT IN TEXT MODE MESSAGE gv_msg ENCODING DEFAULT.

IF sy-subrc <> 0.

1). How can I error here gv_msg with file path ( p_opath ) here ?

as gv_msg contians ' No such file or directory' in case of above sy-subrc = 8.

2 ). here, is always sy-subrc zero or eight ?

Thanks in adv

Tags:
Former Member replied

> OPEN DATASET p_opath FOR OUTPUT IN TEXT MODE MESSAGE gv_msg ENCODING DEFAULT.

>

> IF sy-subrc <> 0.

> 1). How can I error here gv_msg with file path ( p_opath ) here ?

> as gv_msg contians ' No such file or directory' in case of above sy-subrc = 8.

>

you can give your own meessage also, some meaningful one.

if sy-subrc eq 8.

message e000 with 'your own message'.

endif.

>

> 2 ). here, is always sy-subrc zero or eight ?

yes sy-subrc 0 or 8

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question