2005 Dec 28 5:22 AM
hi folks i am going to upload journal info from text file to sap but it gives error like 'unable to open dataset' my statement follows
'/usr/sap/SPE/DVEBMGS00/work/ZPSPAR35_PERS_UP.TXT' FOR OUTPUT
IN TEXT MODE
ENCODING DEFAULT.
plz clarify
chiya
Check with the path whether the spelling is correct or not. because for application server, you should give the path as it is(check where u have upper casse and lower case.)
Cheers,
2005 Dec 28 5:25 AM
data: P_file like rlgrap-fielname.
p_file = '/usr/sap/SPE/DVEBMGS00/work/ZPSPAR35_PERS_UP.TXT'.
open dataset p_file for output in text mode encoding default.try this...
2005 Dec 28 5:26 AM
Check with the path whether the spelling is correct or not. because for application server, you should give the path as it is(check where u have upper casse and lower case.)
Cheers,
2005 Dec 28 5:26 AM
Here is a sample that works for me.
report zrich_0001.
Parameters: d1 type localfile default '/usr/sap/TST/SYS/Data1.txt'.
data: begin of itab occurs 0,
rec(200) type c,
end of itab.
data: wa(200) type c.
start-of-selection.
open dataset d1 for <b>input</b> in text mode.
if sy-subrc = 0.
do.
read dataset d1 into wa.
if sy-subrc <> 0.
exit.
endif.
itab-rec = wa.
append itab.
enddo.
endif.
close dataset d1.
Regards,
Rich Heilman
2005 Dec 28 5:31 AM
Hi chiya,
1. In unix/aix OS,
the file names with directory paths,
are CASE SENSITIVE.
Hence, checkout on that.
2. What is the value of sy-subrc
just immediate after open dataset.
Possibly it cannot find the file
(because of upper case / lower case)
regards,
amit m.
Message was edited by: Amit Mittal
2005 Dec 28 5:34 AM
Hi use this one.
PARAMETERS: P_FILE LIKE RLGRAP-FILENAME.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = P_FILE
.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |