2006 Oct 12 4:03 PM
Hello All,
I am just trying to open the file and read from file.
While opening with OPEN DATASET statement, it is giving the error. The error code is: sy-subrc=8. The file location is my local drive. Can you help?
The following is the code:
DATA:
g_dsn(30) VALUE 'C:\SI1061003'.
The open statement is:
OPEN DATASET g_dsn FOR INPUT IN TEXT MODE.
Thanks for the help,
Sobhan.
2006 Oct 12 4:06 PM
Hi,
Does the file store in PC?
If your file is stored in PC, please use FM GUI_UPLOAD instead.
If it is stored in application server then you can use OPEN DATASET statement.
Regards,
Ferry Lianto
OPEN DATASET is used when file is in application server
pls use GUI_UPLOAD or GUI_DOWNLOAd if the file is in ur PC
2006 Oct 12 4:06 PM
Hi,
Does the file store in PC?
If your file is stored in PC, please use FM GUI_UPLOAD instead.
If it is stored in application server then you can use OPEN DATASET statement.
Regards,
Ferry Lianto
2006 Oct 12 4:06 PM
Hi,
Use GUI_UPLOAD function module for getting the data from a local file..
Thanks,
Naren
2006 Oct 12 4:07 PM
Hello Sobhan Annepu
Open dataset concept is to open a file on the application server and not on your local drive.
Instead use GUI_UPLOAD FM.
Thanks vj
2006 Oct 12 4:07 PM
OPEN DATASET is used when file is in application server
pls use GUI_UPLOAD or GUI_DOWNLOAd if the file is in ur PC
2006 Oct 12 5:00 PM
2007 Aug 14 3:07 PM
hello ,
while storing files in application server, u could n't predict operating system, so don't mention the path..
try this piece of code...
PARAMETERS:
P_FNAME(20) TYPE C DEFAULT 'MYFILE.TXT'.
OPEN DATASET P_FNAME
FOR OUTPUT
IN TEXT MODE
ENCODEING DEFAUT.
IF SY-SUBRC EQ 0.
WRITE 'FILE OPENED'.
TRANSFER SY-UNAME TO P_FNAME.
ENDIF.
CLOSE DATASET P_FNAME.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |