Application Development 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: 

Exception Handling for OPEN DATA SET and CLOSE DATA SET

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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.

former_member1245113
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Kishan,

refer this link

Regards,

Flavay