‎2007 Jul 30 3:09 PM
Hi All,
I want to add FILE NAME option in import parametsr in function module. I want to download the RFC FM interface Output in excel format.
Please give any sample programs.
regards,
Ajay reddy
‎2007 Jul 30 3:25 PM
use function module to download file in XLS format..
<b>SAP_CONVERT_TO_XLS_FORMAT</b>
Reward points if useful
Regards
Prax
‎2007 Jul 30 3:16 PM
‎2007 Jul 30 3:23 PM
to download to excel format. use FM <b>gui_download</b>
regards,
srinivas
<b>*reward for useful answers*</b>
‎2007 Jul 30 3:25 PM
use function module to download file in XLS format..
<b>SAP_CONVERT_TO_XLS_FORMAT</b>
Reward points if useful
Regards
Prax
‎2007 Jul 30 3:31 PM
‎2007 Jul 30 5:20 PM
PROGRAM ZSV_TEST.
Data : IT type table of kna1 initial size 0.
Select * from kna1 into table IT up to 10 rows.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER = 'X'
I_FILENAME = 'C:\TEST.XLS'
I_APPL_KEEP = 'X'
TABLES
I_TAB_SAP_DATA = IT
CHANGING
I_TAB_CONVERTED_DATA =
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
The Headings wont be downloaded. if needed then declare a internal table with character fields append the titles and then the values and call this function.
Reward if it helpful
Thanks & Regards
Senthilvel Murugesan