Application Development and Automation 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: 
Read only

file checking

Former Member
0 Likes
265

Hi,

I am uploading a file in module pool..I customized a creen..In tht i am designed a browse button to get a file..after getting tht file i need to check whether the entered file is word document..

help me whether any function module or class there..(Code)

1 REPLY 1
Read only

George_Lioumis
Active Participant
0 Likes
249

Hi.

You can use the function module PC_SPLIT_COMPLETE_FILENAME as follows:

in the COMPLETE_FILENAME pass the variable with your file's path and name (for exmample: c:\temp\test.doc)

after the function module has run, the exporting parameter EXTENSION will have the file's extension (in this case, .doc)

so, if EXTENSION = 'DOC' or 'DOCX', it is an MS Word document.

Please reward points if it helps.

Regards,

George