‎2006 Dec 16 3:53 PM
data: fname(60).
fname = 'usr/sap/trans' .
OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT itab1 .
TRANSFER itab1 TO FNAME.
ENDLOOP.
CLOSE DATASET FNAME.
this is my code ,
the dump error is the file cannot be accesed , so please me in sloving me the problem
‎2006 Dec 16 3:57 PM
Are you sure you have access to that directory to which you are writing the file ''usr/sap'?
It sounds like, you don't have authorization.
You probably can check the value of SY-SUBRC after OPEN DATASET in the debug mode.
Regards,
Ravi
Note - Please mark all the helpful answers
‎2006 Dec 16 3:57 PM
Are you sure you have access to that directory to which you are writing the file ''usr/sap'?
It sounds like, you don't have authorization.
You probably can check the value of SY-SUBRC after OPEN DATASET in the debug mode.
Regards,
Ravi
Note - Please mark all the helpful answers
‎2006 Dec 16 4:04 PM
Hi,
Correct your code, do not forget to check sy-subrc value after 'open dataset...'
OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC EQ 0.
LOOP AT itab1 .
TRANSFER itab1 TO FNAME.
ENDLOOP.
CLOSE DATASET FNAME.
ELSE.
WRITE: 'File can not be accessed'.
ENDIF.