When getting files from customer DMS we found a problem with extensions. If the file extension is not saved in DMS properties, there is no way how to pinpoint program associated in MS Windows with the ad hoc extension.
There is a way though to determine an extension explicitly from a file.
In SE37 you can find a function module called “CH_SPLIT_FILENAME”, that does the very thing.
CALL FUNCTION 'CH_SPLIT_FILENAME'
EXPORTING
complete_filename = lv_filename
* CHECK_DOS_FORMAT =
IMPORTING
* DRIVE =
extension = lv_doc_type
* NAME =
* NAME_WITH_EXT =
* PATH =
EXCEPTIONS
invalid_drive = 1
invalid_path = 2
OTHERS = 3.
I guess most of SAP developers went through this case. You are remotely connected to SAP system through SAP Logon working on code, when your colleague comes/phone rings/bladder burns. So you interrupt your work for a couple of minutes and … SAP Logon automatically quits the session after some time with error-message saying that it has been closed due to time-out.