Uplode file to excel to internal table

CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    
EXPORTING
*     I_FIELD_SEPERATOR          =
     i_line_header              
'X'
      i_tab_raw_data             
lt_type
      i_filename                 
p_file
    
TABLES
      i_tab_converted_data       
it_upload*   EXCEPTIONS
*     CONVERSION_FAILED          = 1
*     OTHERS                     = 2
            
.
  
IF sy-subrc <> 0.
* Implement suitable error handling here
  
ENDIF.

*  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
*    EXPORTING
*      filename    = p_file
*      i_begin_col = '1'
*      i_begin_row = '2'
*      i_end_col   = '17'
*      i_end_row   = '9999'
*    TABLES
*      intern      = it_inter.
*
*
*  IF sy-subrc NE  0.
*    MESSAGE ID sy-msgid
*            TYPE sy-msgty
*            NUMBER sy-msgno
*            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
*  ELSE.
*
*
*    LOOP AT it_inter INTO wa_inter.
*      CLEAR: lv_bldat, lv_budat.
*      CASE wa_inter-col.
*        WHEN '0001'.
*          wa_upload-customer = wa_inter-value.
*        WHEN '0002'.
*          wa_upload-delar_code = wa_inter-value.
*        WHEN '0003'.
*          wa_upload-model = wa_inter-value.
*        WHEN '0004'.
*          wa_upload-qty = wa_inter-value.
*        WHEN '0005'.
*          wa_upload-price_sm = wa_inter-value.
*        WHEN '0006'.
*          wa_upload-total_pm = wa_inter-value.
*        WHEN '0007'.
*          wa_upload-credit_am = wa_inter-value.
*        WHEN '0008'.
*          wa_upload-po_num = wa_inter-value.
*        WHEN '0009'.
*          wa_upload-po_date = wa_inter-value.
*        WHEN '0010'.
*          wa_upload-do_valu = wa_inter-value.
*        WHEN '0011'.
*          wa_upload-cust_name = wa_inter-value.
*        WHEN '0012'.
*          wa_upload-cust_fn = wa_inter-value.
*        WHEN '0013'.
*          wa_upload-phone_num = wa_inter-value.
*      ENDCASE.
*      AT END OF row.
*        APPEND wa_upload TO it_upload.
*        CLEAR wa_upload.
*      ENDAT.
*    ENDLOOP.
*  ENDIF.


Comments

Popular posts from this blog

all user exit mv45afzz (implicit user exit )

How to Give Dropdown in alv report in sap abap programming Language

Long Text in input and output field in module pool