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

Dataset reopen error

Former Member
0 Likes
2,157

Hi,

I am working for SAP upgrade project (4.6c to ecc6.0)

I had an error saying that DATASET_REOPEN.i.e.,File is already open.Can any one help me out.

I have just declared open dataset ....in text mode encoding default.I dnt do any other changes

5 REPLIES 5
Read only

Former Member
0 Likes
1,157

Hi,

Look for other parts of the code. From the error

it seems the file is ALREADY opened somewhere before

this code.

Maybe some if condition or not closed before.

regards,

amit m.

Read only

bpawanchand
Active Contributor
0 Likes
1,157

Hi

Regards

pavan

Read only

former_member585060
Active Contributor
0 Likes
1,157

If u had opened any file using OPEN DATASET file, before just close that by using CLOSE DATASET file.

or

Try to add and see,

CLOSE DATASET file before the OPEN DATASET file.

Read only

Former Member
0 Likes
1,157

>

> Hi,

> I am working for SAP upgrade project (4.6c to ecc6.0)

> I had an error saying that DATASET_REOPEN.i.e.,File is already open.Can any one help me out.

> I have just declared open dataset ....in text mode encoding default.I dnt do any other changes

Check Prior to that you have any OPEN DATSET on the same file. and Not closing the file using the Close Data set then you have chances of getting the message.

open dataset ...in textmode etc...

open dataset..

in the above case you get the error.

correct that.

open dataset ...in textmode etc...

close dataset <ds>.
open dataset..

close datset <ds>.

Read only

Former Member
0 Likes
1,157

If you have replaced the obsolete statement

OPEN DATASET P_FILE FOR INPUT.

with

OPEN DATASET P_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.

You should not have any problem.Just to recheck with you please dont keep the file already OPEN.

Thanks

Sudharshan