‎2007 Sep 26 8:16 AM
Hi Experts,
The FM SO_SPLIT_FILE_AND_PATH is used to separate a file and directory.
That means if i give full path of a file ,it will separate the directory name and file name in to two return variables.But it is not working in ECC6.0.If i run in SE37 directly it is working.But if i call that i my ABAP pgm it is giving SY-subrc = 0 after exicuting..but it is not showing any data for filename variable.
Can any body tell me any alternative for this in ECC6.0?
Regards
Ravi.
‎2007 Sep 26 8:24 AM
‎2007 Sep 26 8:24 AM
‎2007 Sep 26 8:25 AM
report ztest_hy.
data: file(255), path(100), name(100) .
file = 'c:\desktop\ file.doc'.
CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
EXPORTING
FULL_NAME = file
IMPORTING
STRIPPED_NAME = name
FILE_PATH = path
EXCEPTIONS
X_ERROR = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write:/ name.
This is the test program i have just written. i tested, it is working fine. probably u have give '/' instead of '\'.
‎2015 Jul 08 6:03 AM