Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading Excel file using 'ALSM_EXCEL_TO_INTERNAL_TABLE'

Former Member
0 Kudos

Hi,

I am uploading excel file into an internal table using 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM.

but I'm getting a popup with the message

'There is a large amount of the information on the clipboard. Do you want to be able to paste this information into another programme later.' and there are three buttons in the popup 'YES', 'CANCEL' and 'NO'. but for any choice there is no data in the internal table.

the progrsm is working in other systems but giving problem in customer laptop, can you please tell me is there any settings need to set for EXCEL or SAP.

system details are as below

OS: windows 7

MS-Office - 2007

SAP : ECC06

5 REPLIES 5

Former Member
0 Kudos

Moderator message - When closing old threads, there is no need to add a comment. Adding a pasted answer like "Closed" only brings old threads to the top of the forum list and pushes current ones down. If you do add a comment, please indicate just how the problem was resolved.

0 Kudos

Hi,

I am facing the same problem ,is there any solution after one year ?

0 Kudos

Looks like there was an intention to clear the clipboard in the code, but this does not seem to work.

I copied the function module to my own version and added the following code, which seems to work :

* clear clipboard
  refresh excel_tab.
  call method cl_gui_frontend_services=>clipboard_export
     importing
        data                 = excel_tab
     changing
        rc                   = ld_rc
     exceptions
        cntl_error           = 1
*       ERROR_NO_GUI         = 2
*       NOT_SUPPORTED_BY_GUI = 3
        others               = 4
          .

* Copy only one cell to prevent the clipboard data message.
  call method of worksheet 'Cells' = h_cell
      exporting #1 = 1 #2 = 1.
  m_message.
  call method of worksheet 'Cells' = h_cell1
      exporting #1 = 1 #2 = 1.
  m_message.

  call method  of worksheet 'RANGE' = range
                 exporting #1 = h_cell #2 = h_cell1.
  m_message.
  call method of range 'SELECT'.
  m_message.

* copy marked area (whole spread sheet) into Clippboard
  call method of range 'COPY'.
  m_message.

* quit Excel and free ABAP Object - unfortunately, this does not kill
* the Excel process
  call method of application 'QUIT'.
  m_message.

Former Member
0 Kudos

This message was moderated.

Senthil_S
Explorer
0 Kudos

I have the same problem, anybody have a solution?