‎2008 Apr 30 7:22 AM
Hi Experts,
Please put some light on how to program for a BDC upload from an Excel file using session method and also to capture error records.
Thanks,
Rahul.
‎2008 Apr 30 7:29 AM
Dear Rahul,
for uploading data from excel file use fm 'ALSM_EXCEL_TO_INTERNAL_TABLE'
you will get data into internal table,
error messages will be automatically made in SM35 where you process your session.
reward if it helps,
regards,
Talwinder
‎2008 Apr 30 7:29 AM
Upload file from excel to abap prg using 'TEXT_CONVERT_XLS_TO_SAP' this FM
TYPE-POOLS: truxs.
DATA: it_raw TYPE truxs_t_text_data.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
Upload Excel file
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_raw
i_filename = p_file
TABLES
i_tab_converted_data = i_XCEL[]
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.
and create session using bdc_open_group, bdc_insert, bdc_close_group.
in sm35 u can run the session and u can analyse the error log,
other wise by using RSBDCSUB u can schedule background run also
Regards
Madhavi
‎2008 Apr 30 7:30 AM
Hi ,
Use the FM :ALSM_EXCEL_TO_INTERNAL_TABLE to get the data into internal table from excel. You will get the error log in session log, through program you can not display the errors.
Rajesh.