Hi friend,
Below code will help you to upload .xlsx file to your p
PARAMETERS : pa_file TYPE ibipparms-path.
DATA : it_raw TYPE truxs_t_text_data.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_file.
* FM Getting F4 help
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = 'PA_FILE'
IMPORTING
file_name = pa_file.
*----------------------------------------------------------------------*
* START-OF-SELECTION *
*----------------------------------------------------------------------*
START-OF-SELECTION.
* Getting F4 TO copy XL file to Internal table
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
* I_FIELD_SEPERATOR =
* I_LINE_HEADER =
i_tab_raw_data = it_raw
i_filename = pa_file
TABLES
i_tab_converted_data = git_table
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
*Check if any records in Excel sheet
CHECK git_table IS NOT INITIAL.
**----------------------------------------------------------------------*
** END-OF-SELECTION *
**----------------------------------------------------------------------*
END-OF-SELECTION.
IF git_table IS NOT INITIAL.
**you will get whole data from the xl file into git table.you can process the data here.
ENDIF.
Regards
Ashwin k v