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

how to pop up for the local directory?

I need to popup the selection for local directory and my program generates the file and stores into the directory.

how to do this pop up of directory?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 06:15 AM

    Hi Venkat,

    Try using following method

    CALL METHOD cl_gui_frontend_services=>directory_browse

    EXPORTING

    window_title = <title you want to be displayed on the popup> Its optional

    initial_folder = <default directory that is to be displayed> again optional

    CHANGING

    selected_folder = <pass the variable to capture the directory that is selected>

    EXCEPTIONS

    cntl_error = 1

    error_no_gui = 2

    not_supported_by_gui = 3

    others = 4

    .

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 14, 2009 at 03:32 AM

    Hi Venkatabby,

    Use this method cl_gui_frontend_services=>file_open_dialog

    regards,

    Peter

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 03:34 AM

    Hi,

    You can use FM POPUP_TO_DISPLAY_TEXT_LO. Just pass your directory in parameter TEXTLINE1.

    Hope this will be helpful.

    Thanks,

    Amit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 03:45 AM

    hi

    CALL METHOD cl_gui_frontend_services=>file_save_dialog

    EXPORTING

    default_extension = 'text'

    default_file_name = ld_fullpath

    initial_directory = 'c:\temp\'

    CHANGING

    filename = ld_filename

    path = ld_path

    fullpath = ld_fullpath

    user_action = ld_result.

    and call the FM GUI_DOWNLOAD

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 04:20 AM

    Hi,

    Use the below code and FM F4_FILENAME.

    parameters: p_pcfile like rlgrap-filename default 'c:\test.txt'.

    at selection-screen on value-request for p_pcfile.

    call FM F4_FILENAME. " this FM will show the popup for saving in local directory.

    Thanks,

    Srilakshmi.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 14, 2009 at 05:10 AM

    Hello Venkat,

    Please try to use below code:.

    PARAMETERS: p_file type RLGRAP-filename,

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

    CALL FUNCTION 'F4_FILENAME'

    EXPORTING

    PROGRAM_NAME = SYST-CPROG

    DYNPRO_NUMBER = SYST-DYNNR

    IMPORTING

    FILE_NAME = p_file

    .

    Hope it will solve your problem.

    Have a Nice Day.

    regards,

    Sujeet

    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.