Skip to Content

ALSM_EXCEL_TO_INTERNAL_TABLE not stable

Hi,

We have used this FM in almost all our interface programs to upload excel document into SAP system.

The issue now, it is not stable... sometimes no excel data been populated.

As a workaround, we have advise user to close their Ms Outlook before they start run the interface program and yes, it work!!

I tried to trace the FM until I come to class CL_GUI_FRONTEND_SERVICES. The funny is, everytime I put breakpoint at certain line, it works... the FM returns the excel data. but when i remove the breakpoint, no excel data populated.

So I wonder, is there any way to set "trigger for a while" to this class --> line 85 in method CLIPBOARD_IMPORT .

Please don't ask me to upgrade the system version, it is totally beyond my control.

I also try not to change the excel doc's properties and the interface programs. There are alot and involve many parties..

Thanks

p/s: our Ms Office is 2010 version in 32bit. Our ECC system version is release 700 with level 14

class.jpg (134.5 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Aug 19, 2016 at 01:14 AM

    my last workaround, i add "do.. enddo" to the FM. the excel successfully been uploaded after 21 times looping.. with my outlook still open. 🤪 but second round testing, it reduce to 17 times... hmm, really not stable!! but at least the excel populated. so my user got 2 choices either to close their outlook (as current practice) or wait for additional 5-6 seconds for the program to upload and process the file.

    do.

    add 1 to l_time.

    refresh ta_excel_data.

    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'

    exporting

    filename = pa_file

    i_begin_col = 1

    i_begin_row = 2

    i_end_col = 100

    i_end_row = 9000

    tables

    intern = ta_excel_data

    exceptions

    inconsistent_parameters = 1

    upload_ole = 2

    others = 3.

    if ta_excel_data[] is not initial.

    exit.

    endif.

    enddo.

    write: / l_time.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 18, 2016 at 08:06 AM

    Hi,

    Use TEXT_CONVERT_XLS_TO_SAP , give I_FIELD_SEPERATOR = 'X'

    Ashish

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 18, 2016 at 10:19 AM

    Sumaiya,

    Is it like the User will download the excel file from their mail,save it on the desktop and then run the interface program to upload that excel file ?

    As a crosscheck,check in the task manager if the excel application is still running during the cases when the data is not getting uploaded.If that is the case,the you can try killing the excel application from task manager before you run the interface program.Not a robust solution but a workaround.

    Wondering how is this linked to Mail box open/close.

    K.Kiran.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.