cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if a excel file is open or not while uploading

former_member498821
Participant
0 Kudos

Hi.

I want to check before uploading an excel file from local system to the WD application that the file is opened or not.

if file is opened i need to display an error message.

Plz suggest me solution for this.

Thanks,

Venkata

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You can use the FM  'ISHMED_IS_FILE_OPEN' in the 'action' for the button to upload:

DATA: ret TYPE i.

CALL FUNCTION 'ISHMED_IS_FILE_OPEN'  

EXPORTING    

ss_wavfile     = 'BOOK1.XLS'  " File name    

ss_wavfilepath = 'C:\DOCUMENTS AND SETTINGS\AWI1COB\DESKTOP\'    " File path  

IMPORTING     ss_ret         = ret.

IF ret = 1.   

MESSAGE 'File is already opened. Close the file' TYPE 'E' DISPLAY LIKE 'S'.

ENDIF.

ramakrishnappa
Active Contributor
0 Kudos

Hi Venkata,

Unfortunately, we do not have any provision to check if a file is open for editing while uploading file using FILE UPLOAD ui element.

Regards,

Rama