2006 Mar 28 7:16 AM
Hello people, recently I was kidnly aided by some of your guys regarding open/transfer/close datasets. For that I am very greatful. Since then I was able to contact my SAP BASIS and give me this path ...
hcantdev\SAPReport where hcantdev is the Hostname to use.
However upon using this I had an error around the part with <b>Transfer ihtml to file</b>. When I accessed Open Dataset the Sy-Subrc eq 8.
HEre are some documentations regarding the error
<b>Unable to open file "
Hcantdev\SAPReport\test.html".</b>
<b>Error analysis
Unable to open file "
Hcantdev\SAPReport\test.html".
Error text: "Permission denied"
Error code: 13
How to correct the error
Probably the only way to eliminate the error is to correct the program.
You may able to find an interim solution to the problem in the
SAP note system. If you have access to the SAP note system yourself,
please use the following search criteria:
"DATASET_CANT_OPEN" "ZCCYT_COOL3 " or "ZCCYT_COOL3 "
"START-OF-SELECTION" </b>
Hope to hear from you people soon, sorry for sounding over bearing. Thanks again.
2006 Mar 28 7:27 AM
hi Chad,
It seems like you are not authorised .
You need to have respective authorization to access any directoyt on Application ser ver say in ur case \Hcantdev\SAPReport\.
I think you should ask for authorizatin and hope it will solve ur problem.
Do try to access the Temp directory which had got the deault authorization and see if still ur not getting this type of error then 100% the problem is with Authorization only.
Cheers
Sunny
Rewrd points, if found helpful
Message was edited by: Sunny
2006 Mar 28 7:27 AM
hi Chad,
It seems like you are not authorised .
You need to have respective authorization to access any directoyt on Application ser ver say in ur case \Hcantdev\SAPReport\.
I think you should ask for authorizatin and hope it will solve ur problem.
Do try to access the Temp directory which had got the deault authorization and see if still ur not getting this type of error then 100% the problem is with Authorization only.
Cheers
Sunny
Rewrd points, if found helpful
Message was edited by: Sunny
2006 Mar 28 7:33 AM
Hi,
The error text clearly states Permission denied.
Check whether the file that you try to open is located in transaction <b>AL11</b> and get the permissions to access the same.
Regards,
Wenceslaus.
2006 Mar 28 7:46 AM
For the questions given above
- Yes, I do athorization, it was given to me by the SAP BASIS
- NO it is not in AL11, would that be an issue?
Thanks guys!!!
2006 Mar 28 7:54 AM
Hi Chad ,
**Yes, I do athorization, it was given to me by the SAP BASIS.
Do check in debugging that where exactly ur getting this error or sy-subrc = 8.
Another way out is try with some other directory as suggested above in my previous reply.
Try to use Open dataset in some local directoty say &temp then see r u getting the same error .
Coz now u need to explore the possibility of the error.
NO it is not in AL11, would that be an issue?
No u need not have to take the authorization for whole AL11, but specific to direcory also will solve ur problem.
Cheers
Sunny
Rewrd points, if found helpful
2006 Mar 28 8:11 AM
"Do check in debugging that where exactly ur getting this error or sy-subrc = 8."
- It comes right after the Open Dataset Statment
"Another way out is try with some other directory as suggested above in my previous reply.
Try to use Open dataset in some local directoty say &temp then see r u getting the same error .
Coz now u need to explore the possibility of the error."
I'll give it shot but when you mean local you mean my PC right, or is there a local file on the application server?
Thanks
2006 Mar 28 8:18 AM
Hi,
**I'll give it shot but when you mean local you mean my PC right, or is there a local file on the application server?
No , Local doesn't mean PC . Local is rather in Application server only.
It is DIR_TEMP in AL11 which is nothing but a local directory for which i think almost everyone has got all the relevant authorization.
Hope you will be clear now.
Cheers
Sunny
Rewrd points, if found helpful
2006 Mar 28 9:29 AM
Hi Chad,
Thanks for the points.
I just want to know whether ur problem is resolved , if yes , then how .
Cheers
Sunny
2006 Mar 28 10:06 AM
I just did what you told me! I used the local directory instead. Funny thing is that i was already given authorization!?! Wierd, do I have to do something in SAP for it to work.
Also I have noticed the program doenst run in ALV Reports. Is there a way to fix this?
Thanks!
2006 Mar 28 10:25 AM
Thanks again for the points chad.
I just did what you told me! I used the local directory instead. Funny thing is that i was already given authorization!?! Wierd, do <b>I have to do something in SAP for it to work</b>.
Didn't understand the line marked in Bold.
In SAP how it works,well just u check again with ur code.is it in line with the sample code.
*--- open UNIX file
open dataset unixfile for input in text mode message w_msg.
if sy-subrc ne 0.
write: / 'Cannot open for reading:', unixfile, w_msg.
exit.
endif.
*--- read UNIX file
do.
read dataset unixfile into it_file.
if sy-subrc = 0. append it_file.
else. exit.
endif.
enddo.
*--- close UNIX file
close dataset unixfile.
And if you want to write on the file.
*--- open UNIX file
open dataset unixfile for output in text mode message w_msg.
if sy-subrc ne 0.
write: / 'Cannot open for writing:', unixfile, w_msg.
exit.
endif.
*--- write UNIX file
loop at it_file.
transfer it_file to unixfile.
endloop.
*--- close UNIX file
close dataset unixfile.
Also I have noticed the program doenst run in ALV Reports. Is there a way to fix this?
what exactly u want to do from that progrm ,is it u want to transfer the contents of the report to application server or something else . Just eloborate ur rqmt from that progr. so that i can understand ur prob.
Do check this thread for more options.
Hope this will help you.
Cheers
Sunny
2006 Mar 28 10:42 AM
<b>"what exactly u want to do from that progrm ,is it u want to transfer the contents of the report to application server or something else . Just eloborate ur rqmt from that progr. so that i can understand ur prob."</b>
Much like the function module WWW_LIST_TO_HTML is supposed to do I want to transport a report to html while its running in background.
So far what you have helped me with it works. I am basically just doing Utilities -> List -> Local File -> HTML format during background w/o any user intervention.
However, if iam to do the same for an ALV Report. I doesnt seem to work and when I press the back button a runtime error occurs. It sez something <b>Exception condition "LIST_INDEX_INVALID" raised.</b>. It seems to occur when WWW_LIST_TO_HTML is being called. I put that function and open dataset after the calling of <b>REUSE_ALV_LIST_DISPLAY</b>.
Thanks for your help Sunny so far its been quite infomrative. Thanks a lot and I will be logging out soon so I'll just check on it tommorow. But I appreciate the help.