From Excel to ABAP - Is batch mode possible ?

Showing Answers 1 - 3 of 3 Answers

ROCKY

  • Sep 15th, 2005
 

NO

  Was this answer useful?  Yes

sowmmya

  • Feb 10th, 2006
 

Datas can be transferred from the xls to SAP through Function module alsm_excel_to_internal_table and the file type should be 'wxi'.

  Was this answer useful?  Yes

Tamseel Hashmi

  • Aug 1st, 2006
 

  DATA  w_file TYPE string.
* Convert the file path into string
  w_file = p_input.

* Internal Table should have same field sequence as EXL File.

  CLEAR   t_upload.
  REFRESH t_upload.

* Call function to upload the data into internal table
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                = w_file
      filetype                = 'ASC'
      has_field_separator     = 'X'
    TABLES
      data_tab                = t_upload
    EXCEPTIONS
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      OTHERS                  = 17.
  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.
*   Delete the first row of heading from the uploaded table
    DELETE t_upload INDEX 1.
  ENDIF.       " IF sy-subrc EQ 0.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions