2013 Jun 30 8:57 AM
Hi Guys,
please i need help.
I am using this command:
OPEN DATASET db FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
and I always get
sy-subrc = 8
db is the directory where the file should be written. I have already put file in this directory in others transation but not manually.
What should I check here.
I have already read others disccusions but I didnt find any help. Thanks.
2013 Jun 30 10:55 AM
Hi Maria,
This may happen if the file path is not correct.
It may also happen if you do not have write authorization in this folder.
Try giving some other path, eg a file in desktop where you are sure you have read/write authorization.
You need to have write authorization for each directory in your file path parameter.
The file name is case sensitve. so confirm that too.
2013 Jun 30 10:18 AM
Hi Maria,
You can see the exact error message following this thread http://scn.sap.com/thread/607618.
BR.
2013 Jun 30 10:28 AM
Instead of giving directory name "db", specify name of file like:.
DATA: e_file like rlgrap-filename value '/db/file.txt'.
then use e_file in your open data set statement.
This way,file will be created in specified directory. Make sure that name and path of directory is correct.
Regards
2013 Jun 30 10:55 AM
Hi Maria,
This may happen if the file path is not correct.
It may also happen if you do not have write authorization in this folder.
Try giving some other path, eg a file in desktop where you are sure you have read/write authorization.
You need to have write authorization for each directory in your file path parameter.
The file name is case sensitve. so confirm that too.
2013 Jun 30 11:39 AM
HI,
data:name type string.
name = 'TEST'.
Use the syntax, OPEN DATASET name FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
Here <name> is the dataset name which will be created in AL11 transaction.
So instead of db use this.