‎2007 Dec 15 5:30 AM
hi experts,
how to transfer the data which is in EXCEL sheet using BDC session method.
if it is with DAT file i can able to transfer.
explaine me with example.
thanks in advance.
‎2007 Dec 15 6:14 AM
Hi Surendra,
TRY this FM to do: TEXT_CONVERT_XLS_TO_SAP.
Example:
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR = 'X'
I_LINE_HEADER = 'X'
i_tab_raw_data = itab
i_filename = 'C:\My Docs\Testing Files\demo.xls'
tables
i_tab_converted_data = it_student
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.
ENDIF.
LOOP AT it_student into it_student_wa.
Write: / it_student_wa-ID, it_student_wa-Name,
it_student_wa-ADDRESS,it_student_wa-STATE,
it_student_wa-CITY.
ENDLOOP.
<b>Kindly Reward points if you found this reply helpful</b>,
Cheers,
Chaitanya.
‎2007 Dec 15 5:53 AM
‎2007 Dec 15 6:08 AM
‎2007 Dec 15 6:14 AM
Hi Surendra,
TRY this FM to do: TEXT_CONVERT_XLS_TO_SAP.
Example:
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR = 'X'
I_LINE_HEADER = 'X'
i_tab_raw_data = itab
i_filename = 'C:\My Docs\Testing Files\demo.xls'
tables
i_tab_converted_data = it_student
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.
ENDIF.
LOOP AT it_student into it_student_wa.
Write: / it_student_wa-ID, it_student_wa-Name,
it_student_wa-ADDRESS,it_student_wa-STATE,
it_student_wa-CITY.
ENDLOOP.
<b>Kindly Reward points if you found this reply helpful</b>,
Cheers,
Chaitanya.
‎2007 Dec 15 6:39 AM
‎2007 Dec 16 5:25 AM