Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Exception Handling for OPEN DATA SET and CLOSE DATA SET

Former Member
0 Likes
1,677

Hi ppl,

Can you please let me know what are the exceptions that can be handled for open, read, transfer and close data set ?

Many Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,000

HI,

try this way....

DO.

TRY.

READ DATASET filename INTO datatab.

CATCH cx_sy_conversion_codepage cx_sy_codepage_converter_init

cx_sy_file_authority cx_sy_file_io cx_sy_file_open .

ENDTRY.

  • READ DATASET filename INTO datatab.

  • End of changes CHRK941728

IF sy-subrc NE 0.

EXIT.

ELSE.

APPEND datatab.

ENDIF.

ENDDO.

Hi ppl,

Can you please let me know what are the exceptions that can be handled for open, read, transfer and close data set ?

Many Thanks.

3 REPLIES 3
Read only

Former Member
0 Likes
1,001

HI,

try this way....

DO.

TRY.

READ DATASET filename INTO datatab.

CATCH cx_sy_conversion_codepage cx_sy_codepage_converter_init

cx_sy_file_authority cx_sy_file_io cx_sy_file_open .

ENDTRY.

  • READ DATASET filename INTO datatab.

  • End of changes CHRK941728

IF sy-subrc NE 0.

EXIT.

ELSE.

APPEND datatab.

ENDIF.

ENDDO.

Read only

Former Member
0 Likes
1,000

HI Kishan,

Please take the F1 help on KEY word OPEN DATASET

All exceptions are listed and how to handle them also given there

There you find the Perfect Answer

Regards

Ramchander Rao.K

Edited by: ramchander krishnamraju on Dec 18, 2008 8:11 AM

Read only

Former Member
0 Likes
1,000

Hi Kishan,

refer this link

Regards,

Flavay