Google Search - Blog...........

ABAP - How To Split The Pathname & Filename.

REPORT ZVENKATTEST.


parameters:p_file like rlgrap-filename .

data: PATHNAME type char50 ,
FILENAME type char50 .

at selection-screen on value-request for p_file .

CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_FILE'
IMPORTING
FILE_NAME = p_file
.
start-of-selection .

CALL FUNCTION '/SAPDMC/LSM_PATH_FILE_SPLIT'
EXPORTING
PATHFILE = p_file
IMPORTING
PATHNAME = PATHNAME
FILENAME = FILENAME
.

write:/ 'PATHNAME IS : ' ,PATHNAME .
write:/ 'FILENAME IS : ' ,FILENAME .

2 comments:

  1. Just what i was looking for .
    Thanks for taking the effort to post this .
    Ali.

    ReplyDelete