‎2006 Sep 28 8:26 PM
I am getting sy-subrc = 0 on the function call but I am still getting a return code of 8 (permission denied) on the open dataset. Here is my code.
HELP!!
call function 'AUTHORITY_CHECK_DATASET'
EXPORTING
program = 'ZBS_PRODUCT_OUTBOUND_INTERFACE'
activity = 'WRITE'
filename = '
saberdev\blacksmith\ftpout\bsproduct.txt'
EXCEPTIONS
no_authority = 1
activity_unknown = 2
others = 3.
check sy-subrc = 0.
data: MSG(100).
pfilename = '
saberdev\blacksmith\ftpout\bsproduct.txt'.
CLEAR MSG.
OPEN DATASET pfilename FOR OUTPUT IN TEXT MODE MESSAGE MSG.
IF SY-SUBRC <> 0.
CONCATENATE 'file error: ' MSG INTO MSG.
MESSAGE E208(00) WITH MSG.
ENDIF.
‎2006 Sep 28 8:38 PM
hi
file name is case sensitive.plz ensure that u have mentioned the correct filename...
Cheers,
Abdul Hakim
‎2006 Sep 28 8:42 PM
The path/filename are correct. I am getting a good return code on the authorization check so I do not think there is a problem with the file name.
‎2006 Sep 28 8:54 PM
Does the file already exist? Do you have authority to delete the file from that folder? You can check with your FM.
‎2006 Sep 28 8:56 PM
Janet - Might be worth it to check the permissions/owner on the directory. You might be able to use function module SUBST_GET_FILE_LIST and trans SE37 to do this.
Regards,
Lawrence Schmit
Message was edited by: Lawrence Schmit
Keep in mind that the authority check only verifies your authorization level --> it doesn't verify that the drive/path/filename is valid. Also, it looks as if you're attempting to write to a network drive (assumed because of the back-slashes "
"). If you're writing to a Unix directory, use forward slashes '/'.
‎2006 Sep 28 8:58 PM
Hi Janet,
Please check OSS Note 356505 perhaps it may help.
Regards,
Ferry Lianto