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

Get Directory

Former Member
0 Likes
333

Hello Experts,

I want to get directory name.

For example if the file is <b>/NT/D82_MIG/P06_POOL/RE/messen4.txt</b>

I want <b>/NT/D82_MIG/P06_POOL/RE</b>.

Is there is any Fm to get the output like this.

Thanks & Regards,

Vasanth.M

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
297

Hi vasanth,

1. PC_SPLIT_COMPLETE_FILENAME

2.

DATA : path LIKE pcfile-path.

DATA : extension(5) TYPE c.

path = filename.

CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'

EXPORTING

complete_filename = path

  • CHECK_DOS_FORMAT =

IMPORTING

  • DRIVE =

extension = extension

name = name

  • NAME_WITH_EXT =

  • PATH =

EXCEPTIONS

invalid_drive = 1

invalid_extension = 2

invalid_name = 3

invalid_path = 4

OTHERS = 5

.

regards,

amit m.

1 REPLY 1
Read only

Former Member
0 Likes
298

Hi vasanth,

1. PC_SPLIT_COMPLETE_FILENAME

2.

DATA : path LIKE pcfile-path.

DATA : extension(5) TYPE c.

path = filename.

CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'

EXPORTING

complete_filename = path

  • CHECK_DOS_FORMAT =

IMPORTING

  • DRIVE =

extension = extension

name = name

  • NAME_WITH_EXT =

  • PATH =

EXCEPTIONS

invalid_drive = 1

invalid_extension = 2

invalid_name = 3

invalid_path = 4

OTHERS = 5

.

regards,

amit m.