2008 Jun 11 6:48 PM
I am using the following to open a file:
OPEN DATASET p_file FOR INPUT IN LEGACY TEXT MODE.and no matter what file I try to open it fails. I also tried using:
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.but I have the same issues. I have verified that p_file contains the filename that I am retrieving. I am getting the filename by using the following on help request for the file:
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
CHANGING
file_name = p_file
EXCEPTIONS
mask_too_long = 1
OTHERS = 2.Do you have any ideas?
Regards,
Aaron
2008 Jun 11 6:49 PM
It could be a Authorisation Issue. Does the user have authorization to open that file. U can check thru AL11 also.
I am using the following to open a file:
OPEN DATASET p_file FOR INPUT IN LEGACY TEXT MODE.and no matter what file I try to open it fails. I also tried using:
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.but I have the same issues. I have verified that p_file contains the filename that I am retrieving. I am getting the filename by using the following on help request for the file:
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
CHANGING
file_name = p_file
EXCEPTIONS
mask_too_long = 1
OTHERS = 2.Do you have any ideas?
Regards,
Aaron
2008 Jun 11 6:49 PM
It could be a Authorisation Issue. Does the user have authorization to open that file. U can check thru AL11 also.
2008 Jun 11 6:51 PM
Aparna, I was thinking the same but I am the author of the files and my SAP username has SAP_ALL.
2008 Jun 11 6:52 PM
Hi file path and the file name are case sensitive.. check that..
2008 Jun 11 6:53 PM
The authorization checked in this case is at the Directory (OS level). You SAP authorization doesnt matter. THe directory you are accessing should have the security setting to allow you to write/read files.
2008 Jun 11 6:54 PM
Jackandjay, I am not doing anything with the filename so it has to be in the correct case.
It is possible to use this command to open a file that is not on the application server correct? If not then that is the issue. All of these files are on my laptop.
Regards,
Aaron
2008 Jun 11 6:55 PM
OK, I looked and the directory I am pulling this from isn't in the list. I suppose that is my issue?
Aaron
2008 Jun 11 6:56 PM
sy-subrc Description
0 File was opened.
8 Operating system could not open file
2008 Jun 11 6:57 PM
"All of these files are on my laptop."
Use FM GUI_UPLOAD
OPEN/READ/etc are for application server.
Edited by: Paul Chapman on Jun 11, 2008 1:57 PM
2008 Jun 11 6:49 PM
Hi Aaron,
What is the SY-SUBRC value after the OPen dataset statement?
Regards,
Ravi Kanth Talagana
2008 Jun 11 6:50 PM
2008 Jun 11 6:54 PM
2008 Jun 11 7:08 PM
'KD_GET_FILENAME_ON_F4' is used to get file names which are on desktop where as OPEN DATASET is used to open the files on Application server.
As you are mentioning your files on your laptop, then you need to use GUI_UPLOAD..
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |