2008 Sep 10 2:04 PM
Hi ,
I created path in application server to upload data.
but path is not creating.
parameters: filename(128) default '/usr/tmp/testfile.dat'
lower case.
open dataset filename for output in text mode encoding default.
if sy-subrc ne 0.
write: 'File cannot be opened. '.
exit.
endif.
loop at gstring into wastr.
transfer wastr-fstring to filename.
endloop.
close dataset filename. " Closing the file
Thanks,
Asha
2008 Sep 10 3:09 PM
What i understood from your question is...your open dataset returns sy-subrc as 4. If yes, declare parameters as below and try:
PARAMETERS: FILENAME TYPE PATHEXTERN
default '/usr/tmp/testfile.dat'
Thanks,
SKJ
Hi ,
I created path in application server to upload data.
but path is not creating.
parameters: filename(128) default '/usr/tmp/testfile.dat'
lower case.
open dataset filename for output in text mode encoding default.
if sy-subrc ne 0.
write: 'File cannot be opened. '.
exit.
endif.
loop at gstring into wastr.
transfer wastr-fstring to filename.
endloop.
close dataset filename. " Closing the file
Thanks,
Asha
2008 Sep 10 2:08 PM
Dear Asha,
To upload data/ down load data application server use below transactions.
CG3Y
CG3Z
Regards
2008 Sep 10 2:09 PM
Asha
Try to upload a file using Transaction CG3Z with the same file path on Application Server... By doing so you may find the cause...
Thanks
Amol Lohade
2008 Sep 10 2:10 PM
Try this code
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_asfile TYPE rlgrap-filename DEFAULT '/usr/tmp/testfile.dat'.
.
SELECTION-SCREEN END OF BLOCK b1.
OPEN DATASET p_asfile FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc <> 0.
EXIT.
ENDIF.
LOOP AT it_emp INTO wa_emp.
TRANSFER wa_emp TO p_asfile.
ENDLOOP.
CLOSE DATASET p_asfile.
2008 Sep 10 2:14 PM
To set up the path permanently ..basis help is needed..
Also check if there are proper authorization to save the file in application server and to open the dataset
2008 Sep 10 3:09 PM
What i understood from your question is...your open dataset returns sy-subrc as 4. If yes, declare parameters as below and try:
PARAMETERS: FILENAME TYPE PATHEXTERN
default '/usr/tmp/testfile.dat'
Thanks,
SKJ
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |