Validate File Path
I am on version 3.1I and trying to find a function that will validate if a path exists. In my selection screen I have a field that asks for the path and with this entry I will WS_DOWNLOAD a file to this path but before I do I would like to know if this path is valid. Can anybody help me on this.
Thanks!
I can't remember whether WS_QUERY existed then, but if it does, you can use that.
seven_of_nine, thank you for your reply. I've tried the function but I can't get in to work. Could you please give me an example of how to call it? Let's say that the path is C:\TEMP. How would I call the function to see if the path is valid.
Thanks for your help!
DATA: g_return.
CALL FUNCTION 'WS_QUERY'
EXPORTING
* ENVIRONMENT =
filename = 'C:\temp'
query = 'DE'
* WINID =
IMPORTING
return = g_return
EXCEPTIONS
inv_query = 1
no_batch = 2
frontend_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
***some error message
ENDIF.
CASE g_return.
WHEN '0'.
**does not exist
WHEN '1'.
*exists
ENDCASE.
[/code]