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

Error with OPEN DATASET Statement

Former Member
0 Likes
907

Hi All,

I have a an executable program which downloads data into applcation server using OPEN DATASET statement.

Following is my code:

OPEN DATASET w_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc NE 0

MESSAGE e111 WITH text-003.

ENDIF.

Text 003 is 'Error Opening File'.

sy-subrc becomes non-zero if file cannot be opened for writing.

Daily I am running this program in a background job. I am getting this error on and off. Some times I am able to create the file in application server and sometimes this error comes up by cancelling the job. The message shown for the cancelled job along with text-003 is 'Job cancelled after system exception ERROR_MESSAGE'. This has no dump analysis.

Even When I run this program online I am facing the same issue.

Some users never faced this issue while others have this problem. I think it is not an authorization problem as I am able to create flat file in application server most of the times.

Can you please suggest what could have went wrong?

And kindly propse me a solution.

Thanks & Regards,

Paddu.

5 REPLIES 5
Read only

Former Member
0 Likes
827

Hi Paddu,

I am not sure exactly but i would go as far as saying that the reason you may be having that error is because your server has a limited amount of space and that your program is not working due to that limitation.

Is that file that you have created being picked up by another application. If so then i would advise you to check the limitation of the server size.

Also, is your file name different all the time? if u r trying to write an already existing file name it will give u an error.

Edited by: Kevin Ck on Mar 9, 2009 10:19 AM

Read only

Former Member
0 Likes
827

Hi,

How do u populate the w_file filename? it is quite a possibility that the file already exists and is not able to open because of this.

Revert.

Read only

Former Member
0 Likes
827

Hi Dude,

Some times you dont have access to download the data into application server, that means permissions denied by the Basis people...

Please contct Basis consulatant...

Regards

Ramakrishna Pathi

Read only

former_member203501
Active Contributor
0 Likes
827

hi ,

i think this is due to the existance of the file wth the same name or else it is authorisation problem.

tell me one thing ...where date is included on the file name or not. please check whether the file is there or not in the application server if the error comes on. if you run the program one day per one, if you are trying the same on the day you may face the problem.

Read only

Former Member
0 Likes
827

Hi,

This problem might be with Spooler in SAP. when you receive this issue again check the the Tcode SM50 and check whether spool have in error state or normal state.

if your spool is in error state then you have to restart your server.