Hi,
Use FM ALSM_EXCEL_TO_INTERNAL_TABLE to read data from excel sheet to internal table and then use describe statement to count the records from internal table.
Regards,
Prashant
Hi Naseer,
Use sy-index or sy-dbcnt in loop processing after read from excel sheet.
Hi,
Try this code...
REPORT zreport. PARAMETER p_infile LIKE rlgrap-filename DEFAULT 'C:TEMPZMPR.xls'. DATA : lin TYPE i. DATA: itab LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE. START-OF-SELECTION. CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE' EXPORTING filename = p_infile i_begin_col = '1' i_begin_row = '1' i_end_col = '1' i_end_row = '28000' TABLES intern = itab EXCEPTIONS inconsistent_parameters = 1 upload_ole = 2 OTHERS = 3. IF sy-subrc <> 0. MESSAGE text-009 TYPE 'S'. "Problem uploading Excel Spreadsheet EXIT. ENDIF. DESCRIBE TABLE itab LINES lin. WRITE :/ 'Number of lines: ', lin.
Add a comment