Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SO_SPLIT_FILE_AND_PATH

Former Member
0 Likes
2,953

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.

1 ACCEPTED SOLUTION
Read only

former_member404244
Active Contributor
0 Likes
1,648

Hi,

try this FM TRINT_SPLIT_FILE_AND_PATH

Regards,

Nagaraj

3 REPLIES 3
Read only

former_member404244
Active Contributor
0 Likes
1,649

Hi,

try this FM TRINT_SPLIT_FILE_AND_PATH

Regards,

Nagaraj

Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,648

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 '\'.

Read only

Former Member
0 Likes
1,648

Instead try Function Module "TRINT_SPLIT_FILE_AND_PATH"