‎2010 Oct 15 7:21 PM
Hello Experts,
I'm trying to use the following FM to check the Application Server Path but always get error 'No Path Found'. Can you please somebody have a quick look at the following code tell me my mistake.
Data: File_path(100),
File(100),
FileName(50),
FileNameWithPath(255) TYPE C.
File_path = '/usr/sap/EC1/DVEBMGS00/work'.
FileName = 'ZZAD_DS_MATERIAL_UPLOAD'.
CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
EXPORTING
CLIENT = SY-MANDT
LOGICAL_PATH = File_path
OPERATING_SYSTEM = SY-OPSYS
PARAMETER_1 = ' '
PARAMETER_2 = ' '
PARAMETER_3 = ' '
USE_BUFFER = ' '
FILE_NAME = FileName
USE_PRESENTATION_SERVER = ' '
ELEMINATE_BLANKS = 'X'
IMPORTING
FILE_NAME_WITH_PATH = FileNameWithPath
EXCEPTIONS
PATH_NOT_FOUND = 1
MISSING_PARAMETER = 2
OPERATING_SYSTEM_NOT_FOUND = 3
FILE_SYSTEM_NOT_FOUND = 4
OTHERS = 5
.
IF SY-SUBRC <> 0.
message e000 with SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
exit.
ENDIF.
open dataset FileNameWithPath for appending in text mode encoding default.
Thanks a lot in advance.
‎2010 Oct 15 7:27 PM
Well your logical file looks more like a physical one. In any event, the documentation for th eFM saus that "The file name must be in upper case letters, since the logical file names are stored in upper case in the Customizing tables for the platform-independent file names."
Maybe you should be filling in the parameter FILE_NAME_WITH_PATH instead.
Rob
Edited by: Rob Burbank on Oct 15, 2010 2:28 PM