‎2007 Apr 17 7:38 AM
Hi All,
We have a typical problem currently, When we used OPEN DATASET to write a file in the local C: drive in a particular folder the file is not gettting created into that folder.
Below we have pasted the sample code used to write the file in the particular folder.
DATA : filein(128) TYPE C.
CONCATENATE 'c:\temp' 'XYZ.xml' INTO filein.
OPEN DATASET filein FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
LOOP AT IT_XML_OUT INTO WA_XML_TABLE.
TRANSFER WA_XML_TABLE TO filein.
CLEAR WA_XML_TABLE.
ENDLOOP.
CLOSE DATASET filein.
ELSE.
MESSAGE E008(Z01).
ENDIF.
We are not getting any error message while processing the loop, but the file is not created in that specific folder.
Is this due to any Unicode Problem or any other problem.
The requirement is to 1st write the file in C drive and then write this same file into the application server into a specific folder.
Help and Suggestions will be much Appreciated.
Regards.
Ramesh.
‎2007 Apr 17 7:44 AM
Hi..
try this..it will be useful in app server only..
CONCATENATE 'c:\temp' <b>'\XYZ.xml'</b> INTO filein.
path = c:\temp\xyz.xml.
‎2007 Apr 17 7:44 AM
Hi..
try this..it will be useful in app server only..
CONCATENATE 'c:\temp' <b>'\XYZ.xml'</b> INTO filein.
path = c:\temp\xyz.xml.
‎2007 Apr 17 7:45 AM
Hi ramesh,
1. OPEN Dataset
is for working with files on APPLICATION SERVER
(AND NOT FRONT-END MACHINE)
2. For local machine,
use
GUI_DOWNLOAD FM.
reagrds,
amit m.
‎2007 Apr 17 7:52 AM
Hi Amit Mittal,
The scenario is we have to create the file in the local folder and after that 1ly we have to upolad that copy into the application server.
And moreover this report is to be run in background, and if we use GUI DOWNLOAD we cant schedule this report in background.
Please correct me if i am wrong.
Is there any other possible way to overcome this issue.
Regards.
Ramesh.
‎2007 Apr 17 8:24 AM
Hi again,
1. If the program is supposed to run in background,
then i don't see much possibility of putting a file
on front-end machine.
(Bcos in background, there is no front-end machine linked to session)
regards,
amit m.
‎2007 Apr 17 7:47 AM
Hi,
To download to presentation server use GUI_DOWNLOAD. and then use the OPEN DATASET and then it will get uploaded in to the application server...
Cheers,
Simha.
Reward all the helpful answers,.
‎2007 Apr 17 7:51 AM
Hi,
u cannot save files to ur local drives using open n close dataset use gui_download instead.
open n close dataset places the data in application layer n not presentation layer.
regards,
kiran kumar k
‎2007 Apr 17 7:54 AM
hiii...
Open dataset is used to enable files to be processed on the application server using ABAP statements. i think it will not work on local files.
regards,
veeresh
‎2007 Apr 17 8:14 AM
Hi All,
Can we use GUI Download before Open Dataset in a report program and still can that report be scheduled in a background job.
Or is there any alternative method of downloading the file to local and then copy that file to application server and this tht 2 in a background job.
Help and Suggestions will be much appreciated.
Reagrds.
Ramesh.