Skip to Content
0
Mar 09, 2009 at 08:17 AM

Error with OPEN DATASET Statement

47 Views

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.