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

How to create open file dialog for choosing file in application server?

I would like to have the same functionality as

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'NAVIGATION_FILENAME_HELP'

EXPORTING

DEFAULT_PATH = '.'

MODE = 'O'

IMPORTING

RETURNCODE = return_code

SELECTED_FILENAME = p_file.

But the above code, only allow me to choose files from local computer. How to do the same thing with the file location becomes the application server?

Thanks!

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 08:08 AM

    Hi!

    DATA:

    c_fnh_mask TYPE dxfields-filemask VALUE '*',

    searched_dir TYPE dxfields-longpath,

    file_path LIKE dxfields-longpath.

    searched_dir = 'directory on application server'.

    TRANSLATE searched_dir TO LOWER CASE .

    CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'

    EXPORTING

    i_location_flag = 'A'

    i_server = ' '

    i_path = searched_dir

    filemask = c_fnh_mask

    • FILEOPERATION = 'R'

    IMPORTING

    • O_LOCATION_FLAG =

    • O_SERVER =

    o_path = file_path

    • ABEND_FLAG =

    EXCEPTIONS

    rfc_error = 1

    OTHERS = 2.

    Regards,

    Maxim.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 08:55 AM

    Hi,

    Check the code for ur query.

    PARAMETERS : A_APPL RADIOBUTTON GROUP RAD1 DEFAULT 'X' USER-COMMAND RAD.

    "Appl Srvr

    PARAMETERS: A_FILE LIKE RLGRAP-FILENAME,

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR A_FILE.

    • F4 help for the flat file path

    PERFORM F4_FILEPATH USING 'A_FILE' A_FILE.

    FORM F4_FILEPATH USING P_APPLFILE P_PRESFILE.

    IF A_APPL = 'X'.

    • F4 help for Application Server

    CALL FUNCTION 'F4_DXFILENAME_4_DYNP'

    EXPORTING

    DYNPFIELD_FILENAME = P_APPLFILE

    DYNAME = SY-CPROG

    DYNUMB = SY-DYNNR

    FILETYPE = 'P'

    LOCATION = 'A'

    SERVER = ''.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 14, 2005 at 08:05 AM

    Hi,

    i think there's no standard fm .

    you can program your own f4-help with fm's

    EPS_GET_DIRECTORY_LISTING and F4IF_INT_TABLE_VALUE_REQUEST

    Andreas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 10:01 AM

    Hi Gundam,

    Hope you have checked out:

    RZL_READ_DIR_LOCAL Read a directory on the Application Server.

    F4IF_INT_TABLE_VALUE_REQUEST.

    Best Regards,

    Anjali

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 10:28 AM

    hi,

    i am also trying the same kind of stuff. but i too did not get succeed. i had used the following fm

    'F4_FILENAME_SERVER'. i was able to see the files and select them but not able to retrieve the path...if you ur succed plz let me know and if i get succeed i will let u know...thanx

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi, Ateeq K,

      I also used 'F4_FILENAME_SERVER' and experienced the same problem as you...can't return the path to selection screen.

      Try the solution provided by Maxim Polonevich. It works fine.

      Thanks!

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.