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: 

ALSM_EXCEL_TO_INTERNAL_TABLE clipboard error

Hi,


I am currently facing a problem wherein if using standard function 'ALSM_EXCEL_TO_INTERNAL_TABLE', im getting an information message saying "There is a large amount of information on the clipboard. Do you want to be able to paste this information into another program later?".

Weird thing is that, for some, this error is not being faced but for most users, we are getting this kind of error.

Note: when debugging it and passing this Call Method of range 'Copy'., it will properly give out the output and wont produce a message just like above.

Thanks,

DF

1 ACCEPTED SOLUTION

Hi,

For those who are still looking for answers about the same issue, our security team blocked all copying, sending and importing of data from the local PC. Make sure to make an exception to SAP Logon.exe so that it wont block your uploads to SAP.

KR,

DF

14 REPLIES 14

raymond_giuseppi
Active Contributor
0 Kudos

This pop-up should usually trigger every time more than a hundred cells are in the clopboard.

There is an option in Excel to clear clipboard before closing the sheet : Exit from Cut/Copy mode:


workbook.Application.CutCopyMode = False

that should reduce the frequency of warning, another solution is to copy one single cell before closing sheet


ActiveSheet.Range("A1").Copy

Regards,

Raymond

0 Kudos

Hi Raymond,

Thank you for your answer.

However, I believe thats not the answer that i am looking for. I am trying to upload an excel file to the SAP database. And to do that, I am using SAP Standard function module ALSM_EXCEL_TO_INTERNAL_TABLE. However, when trying to upload it, we are being blocked by that error/info message.

KR,

DF

Tomas_Buryanek
Active Contributor

You might have some older version of function (which is by the way not released).

Check if there is cl_gui_frontend_services=>clipboard_export (it clears clipboard) after clipboard_import and PERFORM separated_to_intern_convert call.

And if there is. Debug it, which sy-subrc it returns and if it really does clear clipboard.

FM version from 27.01.2003 SAP:


* read clipboard into ABAP

   CALL METHOD cl_gui_frontend_services=>clipboard_import

     IMPORTING

       data                 = excel_tab

     EXCEPTIONS

       cntl_error           = 1

*      ERROR_NO_GUI         = 2

*      NOT_SUPPORTED_BY_GUI = 3

       OTHERS               = 4

           .

   IF sy-subrc <> 0.

      MESSAGE a037(alsmex).

   ENDIF.

   PERFORM separated_to_intern_convert TABLES excel_tab intern

                                       USING  ld_separator.

* 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

           .

-- Tomas --

0 Kudos

Hi Tomas,

Thanks! However, the FM version I have has clipboard_export method.

KR,

DF

0 Kudos

As I see in your first post. You cannot reproduce this message when debugging function? It appears only if you run it without debug?

Try reproduce it with and without opened excel file.

How many cells are selected to clipboard, when this problem happens?

-- Tomas --

0 Kudos

Hi Tomas,

Only the cells with value are being copied.

0 Kudos

Hi,

Still havent solved this issue yet. anyone who has experienced same error before? can you share the solution you did? I believe that this is already an excel issue.

KR

0 Kudos

Hi. Does anybody have a resolution for the above problem? I am getting exactly the same issue. If I debug and step over the line CALL METHOD OF range 'COPY' in the function module ALSM_EXCEL_TO_INTERNAL_TABLE, then the function works and populates the internal table. Otherwise it pops up with the message about data on the clipboard and thendoesn't fill the internal table. My colleague does not seem to have this issue so there must be some settng within excel or the sap gui perhaps?

Can somebody help?

Hi,

For those who are still looking for answers about the same issue, our security team blocked all copying, sending and importing of data from the local PC. Make sure to make an exception to SAP Logon.exe so that it wont block your uploads to SAP.

KR,

DF

0 Kudos

I have the same problem, anybody have a solution?

Thanks.

Regards.

0 Kudos

Hi,
I also have similar issue.
I only found a quite useless SAP note 2905085 that did not help me in any way...

Regards,
Bartosz

oguzhans
Explorer
0 Kudos

I had the same issue. Seems there is not any fm or method for clearing the clipboard properly.

I wrote the code below to try several times. it worked for me.

  "Clear Clipboard
DO 10 TIMES.
CLEAR excel_tab.
cl_gui_frontend_services=>clipboard_export( IMPORTING data = excel_tab CHANGING rc = ld_rc ) .

CLEAR excel_tab.
cl_gui_frontend_services=>clipboard_import( IMPORTING data = excel_tab ). "read clipboard

IF excel_tab IS INITIAL.
EXIT .
ENDIF.
WAIT UP TO 1 SECONDS.
ENDDO.

0 Kudos

I solved it the same way

sufiasoh
Discoverer
0 Kudos

Solved after new user profile created in my nb.

Before that, I tried create Z FM and add a waiting time after copy -> depending on your data volume

I dont really get the logic of adding that, but it does work for me.

* copy marked area (whole spread sheet) into Clippboard
CALL METHOD OF range 'COPY'.
WAIT UP TO 10 SECONDS.
m_message.