i m using ALSM_EXCEL_TO_INTERNAL_TABLE for uploading data frm excel sheet to database.I m using Office XP (excel sheet) for uploading data & its working fine.But when i try to upload data from Office 2000(excel sheet)....it is not uploading properly..........can i know the reason.
hi dheeraj,
try to use this FM.
&----
*& Form F_UPLOAD_DATA_FROM_LOCAL_FILE
&----
GET DATA FROM EXCEL FILE AND CONVERT TO SAP FORMAT
----
-->P_FILE LOCAL FILE NAME
----
FORM f_upload_data_from_local_file USING p_file.
DATA: loc_filename TYPE rlgrap-filename,
int_raw TYPE truxs_t_text_data.
loc_filename = p_file.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
i_line_header = 'X'
i_tab_raw_data = int_raw
i_filename = loc_filename
TABLES
i_tab_converted_data = int_content_lfile
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc NE wl_yes.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR : int_record , int_content_lfile ,int_record[].
LOOP AT int_content_lfile.
Moving the records to the Internal table for process
int_record-adm_area = int_content_lfile-adm_area .
int_record-dsrd_loc = int_content_lfile-dsrd_loc.
int_record-fl_ind = int_content_lfile-fl_ind.
int_record-loc_loc = int_content_lfile-loc_loc.
int_record-loc_desc = int_content_lfile-loc_desc .
APPEND int_record.
CLEAR int_record.
ENDLOOP.
ENDFORM. "F_UPLOAD_DATA_FROM_LOCAL_FILE
rgds
anver
if hlped mark points
Add a comment