Create a function module Z_FILENAME_EXIT_YOURNAME as a copy of function module FILENAME_EXIT_EXAMPLE. There you can create a string as you please.
After that and after activating your new function module (not before, otherwise the customizing will dump) use Parameter <Z=YOURNAME> in your logical filename to get that string of the function module you created.
Be careful: The length of a filename is limited. The length depends on your system. It is 50 at our system. To know the exact length your system provides, set a breakpoint at function module FILE_GET_NAME_AND_LOGICAL_PATH and debug your archive write job.
Regards,
Christopher
Sources: How to Define Logical and Physical File and Path Names for Archiving - Basis Corner - SCN Wiki