Skip to Content
Former Member
Aug 11, 2011 at 07:47 PM

Validate filenames


Hello everyone,

I am creating files with a program that I have created but there is something I can't seem to succeed to fix.

I have a choice of either doing a logical file, a UNIX file or a physical file.

Though, I need to check if the name in the appropriate textbox where the file name is written is something valid. For example... In a physical file, you have to write C:\MyDocuments\SAP\test.csv

But if I write "anything" instead, I would like it to say "Hey! That's not something valid!" Of course, I saw many things that check the existence of files but I don't want to see if the file exists since if it doesn't exist, it will create one. I just want to see if what is written in the textboxs for the logical file name, the UNIX file name and the Physical file name makes sense...

Is there something (or a few things) in SAP that can help me to validate those filenames for the three files types?

Thank you greatly for your help.

Edited by: SBenoit on Aug 11, 2011 9:50 PM