Hello all,
I am fetching data from the excel file and putting into internal table. But I have problem there around 280 records in excel bit I am getting only 100 records in internal table y ?
Every time I run I am getting different number of entries in the internal table some times 0 entries in the table.
I have written below code to get data from excel :
PARAMETERS p_file TYPE rlgrap-filename OBLIGATORY.
DATA : it_zhpsm TYPE TABLE OF ty_z070_hpsm,
wa_zhpsm TYPE ty_z070_hpsm,
it_type TYPE truxs_t_text_data.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
START-OF-SELECTION.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
* I_FIELD_SEPEDDRATOR =
* I_LINE_HEADER =
i_tab_raw_data = it_type
i_filename = p_file
TABLES
i_tab_converted_data = it_zhpsm
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.
Is there any bug in the above code ? I don’t think so then what is the problem why I am getting different number entries in the internal table every time.
My file contains following records in below attached file