‎2005 Nov 08 11:32 AM
I want to create a file in my desktop through ABAP program.. how do i do it ??
the code give below does not work ... even if i give the full path ...
<i>
DATA: file TYPE string VALUE `c:test.dat`.
OPEN DATASET file FOR OUTPUT IN TEXT MODE
ENCODING DEFAULT.</i>
Regards
Sivakumar
‎2005 Nov 08 11:35 AM
Hi,
the open dataset does only work for files created on a server. For creating a file on your workstation try the method cl_gui_frontend_services->gui_download.
regards
Siggi
‎2005 Nov 08 11:38 AM
Hi, the command you detailed relates to creating a file on the application server...e.g. unix path. The command cannot be used to create a file on your local drive.
Use function modules WS_DOWNLOAD/DOWNLOAD or class CL_GUI_FRONTEND_SERVICES depending on your SAP release. WS_DOWNLOAD/DOWNLOAD are used on earlier releases of SAP.
Thanks, Inde
‎2005 Nov 08 11:39 AM
Hi siva,
The open Dataset command is used to open a file in Application server not on the desktop.
To create a file on desktop, use function module "f4_filename".
Don't forget to give points if ur problem is solved.
Thanks.
‎2005 Nov 08 11:45 AM
Hi,
In order to create a file in your desktop (presentation server)you can use the function module GUI_DOWNLOAD .
Thanks,
Pani
‎2005 Nov 08 12:14 PM
Siva,
If u are familiar with the ABAP Objects, then try using a method GUI_DOWNLOAD present in the Class CL_GUI_FRONTEND_SERVICES.
CODE could look like:
<b>data: objGuiFile type ref to cl_gui_frontend_services.
create object objGuiFile.
objGuiFile->gui_download</b>
Thanks
Kam
Message was edited by: Kam
‎2005 Nov 08 12:17 PM
Hi,
While creating files in application server, we use OPEN DATASET.
For creating files on desktop, we use
GUI_DOWNLOAD
WS_DOWNLOAD(Obsolete).
Regards,
Sailaja.