Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BDC using excel sheet

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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.

0 Kudos

hai kishore

i tried it but its not working.

its saying "cant empty the clipboard".

thanks

veni.

0 Kudos

hai kishore,

Thanks for ur reply

my issue has solved

thanks

veni

0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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.