Skip to Content
author's profile photo Former Member
Former Member

How to scan Application ser. directory/ How to archive appl.server file

Hi All,

How to scan a source directory,??

I need a scan a source directory if there is no file exist I need give error message..

How to scan a application directory.. and how to archive a file??

Thanks in advance....

Points will be rewarded for helpful answers...

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 04:32 AM

    Hi Ravi ,

    There is a class <b>'CL_GUI_FRONTEND_SERVICES'</b> which provides a number of front end services .

    For your specific requirement there is a method called <b>'DIRECTORY_LIST_FILES'</b> which gives the list of files in the directory.

    Regards

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 04:33 AM

    Have a look at below link. It may be useful to you.

    http://www.sapdevelopment.co.uk/file/file_disall.htm

    I hope it helps.

    Best Regards,

    Vibha

    *Please mark all the helpful answers

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 06:20 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 04:27 AM

    Hi Ravi

    THe transaction AL11 gives u the list of all directories in application server. In order to scan a source directory, plz use the following fuction module in your program:

    RZL_READ_DIR_LOCAL

    CALL FUNCTION 'RZL_READ_DIR_LOCAL'

    EXPORTING

    name = <specify variable of type salfile-longname & pass it here and assign it before using this FM to pathname of type rlgrap-filename>

    TABLES

    file_tbl = <specify variable of TYPE TABLE OF salfldir & pass it here>

    EXCEPTIONS

    argument_error = 1

    not_found = 2

    OTHERS = 3.

    IF sy-subrc <> 0.

    MESSAGE e100(z_msg2) WITH text-008. <put ur error msg here>

    ENDIF.

    This should solve your problem.

    PLZ REWARD POINTS

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.