‎2008 Apr 01 11:12 AM
Hi experts,
I have:
OPEN DATASET path FOR OUTPUT
IN TEXT MODE ENCODING DEFAULT .
IF sy-subrc <> 0.
MESSAGE e415(oa) WITH path space.
ENDIF.
LOOP AT itab2.
TRANSFER itab2 TO path.
ENDLOOP.
CLOSE DATASET path.
where path :
PARAMETER : path LIKE sapb-sappfad DEFAULT 'C:\Transport.txt'.
the problem is that the file is not being generated. Any idea? thanks
‎2008 Apr 01 11:25 AM
Yot cannot create files on your PC if your report is running in background.
When a program is running in background it is not connected to presentation server.
You can create application server files only in background
‎2008 Apr 01 11:20 AM
Hi Marc,
do you get any error message after starting the report? Also check if you have the permission on the application server to create a file "C:\Transport.txt" -- note that it's not created on your client.
Kind regards, Matthias
‎2008 Apr 01 11:22 AM
I want to save the file in my PC.
I used GUI_DOWNLOAD but it doesnt work if i execute in the background, but the file is created in my PC.
I have permisions.
‎2008 Apr 01 11:25 AM
Yot cannot create files on your PC if your report is running in background.
When a program is running in background it is not connected to presentation server.
You can create application server files only in background
‎2008 Apr 01 11:26 AM
‎2008 Apr 01 11:28 AM
OPEN DATASET path FOR OUTPUT
PARAMETER : path LIKE sapb-sappfad DEFAULT 'C:\Transport.txt'.This will attempt to open the file transport.txt on the APPLICATION server, not your PC, which is the PRESENTATION server.
If your app server is running unix, then the path isn't even valid.
So, create your dataset on a valid path for your app server, then use FTP, or NFS or such like to get the file onto your PC.
matt
‎2008 Apr 01 11:30 AM
Hi Marc,
DATASETS are files accessed by the application server of your SAP system. This is not your desktop. The desktop (also konown as client) can be accessed from SAP only by means of SAPGUI.
A path like 'C:\' will exist on your desktop. The SAP server may have a path 'C:\' only if SAP is running on WINDOWS server. And then your user must be autorized to use path 'C:\'.
You'd rather use function 'GUI_DOWLOAD' for you purposes.
search here for 'GUI_DOWLOAD' and find ample solutions for use.
Regards,
Clemens