|Figure: File Upload/ Download Report Selection|
For F4 help for file path in Application Server, Function module '/SAPDMC/LSM_F4_SERVER_FILE' is used and for creating file on application server, OPEN DATASET statement is used.
For F4 help for file path for Local machine (Desktop), downloading file, methods of standard SAP class CL_GUI_FRONTEND_SERVICES are used. This class offers several functions for front-end. I have discussed some other functions like downloading to a temporary file, printing and deleting (upon completion of printing) from the temporary directory in my blog: Printing DMS Documents.