04-30-2007 5:33 AM
Hi,
I am uploading data using this FM but I want to know the maximum number of records it will take?Actuallty I have 100 records in the Excel file,but when I have uploaded using this FM into 1 internal table it is taking only 37 records?
Kindly solve this issue!
Points Rewarded !
04-30-2007 5:43 AM
Hi,
u can upload this much rows from excel. there will be some problem in ur program.
Check wherther in exporting parameter u have given the end row as 100.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = p_file
I_BEGIN_COL = 1
I_BEGIN_ROW = 2
I_END_COL = 10
<b>I_END_ROW = p_lineno</b>
TABLES
INTERN = asset_excel
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
Regards,
Sonika
04-30-2007 5:36 AM
The number of rows read depends on the following parameters
i_begin_col = 1
i_begin_row = 1
i_end_col = n
i_end_row = 65535
Check whether the parameter I_END_ROW is set to something like 37 in your program.
Regards
Wenceslaus
04-30-2007 5:51 AM
I hope u r right ,but i_end_col = n this parameter should be changed..Any way u r right!
04-30-2007 5:43 AM
Hi,
u can upload this much rows from excel. there will be some problem in ur program.
Check wherther in exporting parameter u have given the end row as 100.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = p_file
I_BEGIN_COL = 1
I_BEGIN_ROW = 2
I_END_COL = 10
<b>I_END_ROW = p_lineno</b>
TABLES
INTERN = asset_excel
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
Regards,
Sonika
04-30-2007 5:56 AM
Thanks for ur response ...I gave points to all..one more thing this FM is consuming lot of time why?Did anyone knows the reason !
04-30-2007 6:00 AM
Hi,
i don;t think there should be any problem with this FM, check that u have given the right parameters.
Regards,
Sonika
04-30-2007 5:49 AM
hi,
give row positions like this.
DATA : c1 TYPE I VALUE 1,
r1 TYPE I VALUE 1,"first row
ce TYPE I VALUE 10,
re TYPE I VALUE 100."end of row
INCLUDE BDCRECX1.
START-OF-SELECTION.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = 'C:\xl1.XLS'
I_BEGIN_COL = c1
I_BEGIN_ROW = r1
I_END_COL = ce
I_END_ROW = re
TABLES
INTERN = ITAB1
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
04-30-2007 6:22 AM
Hi Shankar,
U can use the another function module it is very use ful. it can upload the from directly excel sheet to sap. use this function module.
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
i_filename = p_file1
TABLES
i_tab_converted_data = it_itab
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.
If u want i will send program also.
*****Rewards points for useful aswers.
Rgds,
P.Naganjana Reddy