Hi Misha,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
FILE_NAME = P_FILE.
IF P_FILE IS NOT INITIAL.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR = 'X'
I_LINE_HEADER = 'X'
I_TAB_RAW_DATA = GT_RAW
I_FILENAME = P_FILE
TABLES
I_TAB_CONVERTED_DATA = GT_BDGT
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2.
IF SY-SUBRC = 1.
MESSAGE 'Kindly upload proper formate' TYPE 'I' DISPLAY LIKE 'E'.
ELSEIF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif..
Regards,
E.Ananthachari.