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

Application Server Directory Validation Problem

vishnu_pallamreddy
Contributor
0 Likes
496

Hi All,

Our requirement is validate the Application Server Directory.

for that we are using "RZL_READ_DIR_LOCAL" this fm.

when i pass the  wrong name of the directory its go to dump.

now how can i validate the Application Server Directory?

We use another fm "FILE_VALIDATE_NAME" to validate the Application Server Directory.

in this fm we pass the either correct or wrong Directory it shows the "Directory does not Exist".

We are using "windows 7" os.

What was the problem/

Thankyou,

Vishnu p.

1 ACCEPTED SOLUTION
Read only

former_member189779
Active Contributor
0 Likes
396

Pass exceptions to FM. IF the directorary is not there it does not dump.In this case sy-subrc will be 2.

PARAMETER: p_fdir            type pfeflnamel DEFAULT '/usr/sap/tmp'.

data: begin of it_filedir occurs 10.
        include structure salfldir.
data: end of it_filedir.

CALL FUNCTION 'RZL_READ_DIR_LOCAL'

  EXPORTING

    name           = p_fdir

  TABLES

    file_tbl       = it_filedir

  EXCEPTIONS

    argument_error = 1

    not_found      = 2

    OTHERS         = 3.

1 REPLY 1
Read only

former_member189779
Active Contributor
0 Likes
397

Pass exceptions to FM. IF the directorary is not there it does not dump.In this case sy-subrc will be 2.

PARAMETER: p_fdir            type pfeflnamel DEFAULT '/usr/sap/tmp'.

data: begin of it_filedir occurs 10.
        include structure salfldir.
data: end of it_filedir.

CALL FUNCTION 'RZL_READ_DIR_LOCAL'

  EXPORTING

    name           = p_fdir

  TABLES

    file_tbl       = it_filedir

  EXCEPTIONS

    argument_error = 1

    not_found      = 2

    OTHERS         = 3.