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: 

open dataset input error

Former Member
0 Kudos

Hi guys

i am trying to open more than 100 files using open dataset input but i am getting below error

program is abending reading after 50files..

Program failing in open data set error can u help me please?

143

144 * Each file is getting into an internal table

>>> OPEN DATASET w_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.

146 IF sy-subrc <> 0.

147 CONTINUE.

148 ELSE.

149 DO.

150 READ DATASET w_file INTO s700_delta.

What command I should give here

Error analysis

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_TOO_MANY_FILES', was not

caught and

therefore caused a runtime error.

The reason for the exception is:

The maximum number of open files (100) has been exceeded.

please let me know what should makes changes to avoid this abend?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Standard programming problem, should be rather trivial to find with a quick search. Basically there's always a limit of how many open file handles you can have at a time.

Please try to consult the ABAP help next time before posting (or search on SCN). A quick check for [open dataset|http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET.htm] would've told you the following:

You can open up to 100 files per internal session. The actual maximum number of simultaneously open files may be less, depending on the platform.

Most likely you actually don't want to have all those files open at the same time and you simply forgot to use a [close dataset|http://help.sap.com/abapdocu_70/en/ABAPCLOSE_DATASET.htm] after reading each file.

1 REPLY 1

Former Member
0 Kudos

Standard programming problem, should be rather trivial to find with a quick search. Basically there's always a limit of how many open file handles you can have at a time.

Please try to consult the ABAP help next time before posting (or search on SCN). A quick check for [open dataset|http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET.htm] would've told you the following:

You can open up to 100 files per internal session. The actual maximum number of simultaneously open files may be less, depending on the platform.

Most likely you actually don't want to have all those files open at the same time and you simply forgot to use a [close dataset|http://help.sap.com/abapdocu_70/en/ABAPCLOSE_DATASET.htm] after reading each file.