2008 Mar 21 5:17 AM
hi~~~I'm having some trouble about abap, I defined a method as follows:
&----
*& Form download
&----
text
----
FORM DOWNLOAD.
DATA: FILENAME type string.
CONCATENATE '
192.168.0.28\sap\HuaFu project\14 Report\SD\ZSDR05_' SY-DATUM '.XLS' INTO FILENAME.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = FILENAME
FILETYPE = 'DAT'
TABLES
DATA_TAB = gdt_header.
EXCEPTIONS
INVALID_FILESIZE = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3.
IF SY-SUBRC = 0.
WRITE: '文件已成功下载到',FILENAME.
ELSE.
WRITE: '下载失败'.
ENDIF.
ENDFORM. "download
Now this method runs successful in my own OS(windows),but it is fail when I define it in the Linux Server,Useing T-CODE SM37 to see , the state show it was canceled. What's wrong with my code,and how to defined the path in linux server,
help,thx.
2008 Mar 21 8:23 AM
hi ,
this is about the logical path and the physical path..
you can go to the tcode file for the logical path for the unix server and give it ...there
regards,
venkat.
Dear K.P.N,
I try it .but failure. Can not find error message.
2008 Mar 21 5:30 AM
Hi wu,
WS_DOWNLOAD,GUI_DOWNLOAD,DOWNLOAD,UPLOAD,
WS_UPLOAD,GUI_UPLOAD function modules will not work in background mode. Use open dataset ... transfer.. close dataset.. instead.
Reward points if helpful.
Regrads,
Sankar.
2008 Mar 21 5:36 AM
2008 Mar 21 5:45 AM
Wu,
Try using some other statemnts like OPEN DATASET, CLOSE DATASET, to upload or download ur file from the application server. And make it a point to translate ur variable containing the file path to lower case.
Hope this helps u out.
Reward ponts if useful.
2008 Mar 21 5:46 AM
Hi,
All GUI function modules will not work in back ground. U told it was worked for u in ur system. It might be because u ran it in foreground. Try running this in back ground it will not work even in ur system.
Solusion for ur problem will be first transfer the data into application server and later u have to download it using transaction CG3Y.
Check below the syntax to download data to application server.
OPEN DATASET l_file FOR OUTPUT IN TEXT MODE.
IF sy-subrc IS INITIAL.
LOOP AT gdt_header.
TRANSFER gdt_header TO l_file.
ENDLOOP.
CLOSE DATASET l_file.
ELSE.
MESSAGE ...
ENDIF.
Thanks,
Vinod.
Edited by: Vinod Kumar Vemuru on Mar 21, 2008 11:18 AM
2008 Mar 21 7:30 AM
Dear all,
Thanks for your replaies.
But the OPEN DATASET...TRANSFER...CLOSE DATASET function is download a exist file from Application server to the front .
Now, I hope to resolve how to create a file to application server, the file content is that I get the results.
Appreciate to get your help. Thanks
2008 Mar 21 7:43 AM
2008 Mar 21 8:06 AM
Dear K.P.N,
I try it .but failure. Can not find error message.
2008 Mar 21 8:23 AM
hi ,
this is about the logical path and the physical path..
you can go to the tcode file for the logical path for the unix server and give it ...there
regards,
venkat.
2008 Mar 21 9:18 AM
Dear venkat,
Your mean is replace the file path '
192.168.0.28\...\....xls' to '/tmp/....xls'? I have tested this method, but failure. Could you give a example? thanks.
2008 Mar 25 2:13 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |