Skip to Content
author's profile photo Former Member
Former Member

Can not upload an excel file if it is opening.

I found I can not upload an excel file if it is opening(using) at same time. My questions are:

(1)How can I still upload an excel file even it is opening at same time? Or

(2)How to check the file which is opening(using) or not and give a pop-up message?

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Nov 30, 2007 at 02:29 PM

    1. I think it is not possible to upload the file while it is open.

    2. You can use the same FM. If your FM gives you the error message.. give the information message sayaing "Close if file is open"

    If you are using the FM GUI_UPLOAD then the exception ACCESS_DENIED will be triggered when file is open.

    Regards,

    Naimesh Patel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 02:29 PM

    Hi Michael,

    (1) NO you can't.

    (2) Yes you can check testing sy-subrc of "OPEN DATASET" or "GUI_UPLOAD"

    CALL FUNCTION 'GUI_UPLOAD'                   
           EXPORTING                             
             filename                = x_file    
             has_field_separator     = '#'       
             filetype                = l_filetype
           TABLES                                
             data_tab                = file_y    
           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.       
    

    Hope this helps,

    Erwan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 02:30 PM

    Hi

    The fm should raise an exception if it can't open the file, so u can check the sy-subrc value in order to make a decision or show a message to the user.

    Max

    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.