2013 Apr 11 7:36 AM
Hi All,
Actualy i want to download the internal table data into excel file onto presentation server by using this function module SAP_CONVERT_TO_XLS_FORMAT. But i got runtime error like - type conflict when calling function module . ND m using to p_file path name nd itab within dis fun module
plz let me know how to solve .
thanks
2013 Apr 11 7:55 AM
Hi Suraj,
Check filepath type.I think there have mismatch between fiel path type in FM and ur Parameter for file path.
Thanks
tarak
2013 Apr 11 7:55 AM
Hi Suraj,
Check filepath type.I think there have mismatch between fiel path type in FM and ur Parameter for file path.
Thanks
tarak
2013 Apr 11 7:55 AM
2013 Apr 11 8:14 AM
Actuly i define
p file type rlgrap-filename
lvfile type string
call function 'f4_filename'
exporting
program name = SYST-cprog
filed name = p_file.
call function sap convert to xls format
export
i field srperator = lvfile
table
i tab sap data = it mata
2013 Apr 11 7:58 AM
check below code.
DATA : BEGIN OF t_header OCCURS 0,
name(40) TYPE c,
END OF t_header.
CLEAR t_header.
t_header-name = 'Client'.
APPEND t_header.
t_header-name = 'Plant Code'.
APPEND t_header.
t_header-name = 'Product Code'.
APPEND t_header.
t_header-name = 'Product Description'.
APPEND t_header.
t_header-name = 'Base UM'.
APPEND t_header.
t_header-name = 'Inner Pack'.
APPEND t_header.
t_header-name = 'Outer Pack'.
APPEND t_header.
t_header-name = 'Ship Pack'.
APPEND t_header.
t_header-name = 'Lst Upd Dt'.
APPEND t_header.
t_header-name = 'Lst Upd By'.
APPEND t_header.
t_header-name = 'Ext date'.
APPEND t_header.
t_header-name = 'Ext Time'.
APPEND t_header.
t_header-name = 'Ext By'.
APPEND t_header.
t_header-name = 'File Name'.
APPEND t_header.
loop at it_material.
CONCATENATE '''' it_material-matnr into it_material-matnr.
modify it_material.
*clear it_material.
endloop.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = 'X'
* I_LINE_HEADER = t_header
i_filename = p_pcfile
* I_APPL_KEEP = ' '
tables
i_tab_sap_data = it_material
* 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.
Thanks
Tarak