PARAMETERS: P_FILE LIKE RLGRAP-FILENAME .
PERFORM XLS_TO_SAP
USING P_FILE
'GT_ITAB[]'.
*&---------------------------------------------------------------------*
*& Form XLS_TO_SAP
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_P_FILE text
* -->P_0061 text
*----------------------------------------------------------------------*
FORM XLS_TO_SAP USING P_FILE
P_TABLE.
IF P_FILE IS INITIAL.
MESSAGE 'Dosya seçmediniz!' TYPE 'I' .
ELSE.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
ASSIGN (P_TABLE) TO <TABLE>.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
* I_FIELD_SEPERATOR =
I_LINE_HEADER = 'X'
I_TAB_RAW_DATA = IT_RAW " WORK TABLE
I_FILENAME = P_FILE
TABLES
I_TAB_CONVERTED_DATA = <TABLE> "ACTUAL DATA
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
"Helloo, subrc 0 değilse standart hatanı ver hacı...
ENDIF.
ENDIF.
ENDFORM. " XLS_TO_SAP
Hiç yorum yok:
Yorum Gönder