05-25-2011 5:37 AM
Hai All,
iam trying to upload the data using excel sheet in bdc.
i converted the data into the internal table from the excel sheet using the FM alsm_excel_to_internal_table its reading only few columns.
iam having 18 columns and 50 rows in my excel sheet,
Thanks in advance
veni
05-25-2011 7:17 AM
hi
You need to specify the starting column no. , ending column no, start row no,end row no.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = l_filename
i_begin_col = l_begin_col " 1
i_begin_row = l_begin_row "1
i_end_col = l_end_col " 18
i_end_row = l_end_row " 50
TABLES
intern = t_intern
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2.
You read to need all the columns data.
LOOP AT IT_TAB into wa_tab .
CASE wa_tab-COL.
WHEN '0001'.
Joseph-Name1 = wa_tab-VALUE.
WHEN '0002'.
Joseph-Num1 = wa_tab-VALUE.
WHEN '0003'.
Joseph-Num2 = wa_tab-VALUE.
.
.
..
.
.. when '0018'
.
ENDCASE.
AT END OF ROW.
APPEND ITAB2
ENDAT.
ENDLOOP.
05-25-2011 11:41 AM
hai kishore
i tried it but its not working.
its saying "cant empty the clipboard".
thanks
veni.
05-25-2011 1:19 PM
06-02-2011 6:34 AM
hi Aliveni23
how di d you solve this?
where as i am using same function module, but am getting error like " ERROR DURING CONVERSION - FILE TYPE CONFLICT ( SEE LONG TEXT ).
Regards
Srinivas
06-06-2011 11:19 AM
hai srinivas,
i would like to know the details like,wht are the parameters u r passing to the function module ALSM_EXCEL_TO_INTERNAL_TABLE.
veni
05-25-2011 8:15 AM
Maybe you can try this :
TYPE-POOLS: truxs.
DATA: it_raw TYPE truxs_t_text_data.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_raw " WORK TABLE
i_filename = p_file "path file name.
TABLES
i_tab_converted_data = it_datatab[] "Your Itab is here.
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.
Thank You.