Regarding Application server file path browsing

Hi All,
I have a issue regarding Application Server File Path browsing.
Actually in my selection-screen i will declare a parameter as <b>Application Server File Path</b> now when i press F4 in that field it should be able to browse through <b>Application Server Path's</b>.
Just like <b>F4_FILENAME</b> in the case of <b>Presentation Server File Path</b> Browsing.
Can anybody solve my issue.
Thanks in advance.
Thanks & Regards,
Rayeez.

Hi Shaik,
Just copy and paste:
Here is the code for retrieving list of files contained within specific Application server directory(SAP).
PARAMETER: p_fdir type pfeflnamel DEFAULT '/usr/sap/tmp'.
data: begin of it_filedir occurs 10.
include structure salfldir.
data: end of it_filedir.
START-OF-SELECTION.
Get Current Directory Listing for OUT Dir
call function 'RZL_READ_DIR_LOCAL'
exporting
name = p_fdir
tables
file_tbl = it_filedir.
List of files are contained within table it_filedir
loop at it_filedir.
write: / it_filedir-NAME.
endloop.
Hope this will help you.
Let me know incase of any concerns.
EDIT:
There are few FM for ur refernce :
RZL_READ_DIR_LOCAL
SUBST_GET_FILE_LIST Return table with file list for the given directory (pattern allowed)
F4_DXFILENAME_TOPRECURSION Popup to select one file from the given application server directory
TH_SERVER_LIST Returns list of application servers.
EPS_GET_DIRECTORY_LISTING – Lists filenames from the application server .
Cheers
Sunny
Rewrd points, if found helpful
Message was edited by: Sunny

Similar Messages

  • Regarding Application server file path

    Hi All,
    please explain the process how to create logical file path in FILE t-code.

    Hi,
    logical file path
    The (platform-independent) logical file path is evaluated at runtime to get the (platform-dependent) physical path (see Assignment of Physical Paths to Logical Path).
    Two examples of this are:
    · Logical file path: BW_OLAP_CACHE
    Name: BW OLAP Cache
    · Logical file path: BW_OLAP_CACHE_SPAN
    Name: BW OLAP cache cross-application server
    Assignment of Physical Paths to Logical Path
    At runtime, the physical path assigned for the corresponding operating system platform is generated from the logical file path.
    Since the physical path is platform-dependent, the customer must set it her/himself. The closer the file is to the application server or, with the cross-application server cache mode, to the application server, the faster it can be found and read.
    Log(ical) path: BW_OLAP_CACHE
    Name: BW OLAP Cache
    Syntax group: UNIX (all Unix platforms)
    Phys(ical) path: /usr/ (Syntax group WINDOWS NT)
    In a heterogeneous system landscape (such as UNIX and Windows NT servers) all system-specific syntax groups must be maintained. Ensure that the definitions for the various syntax groups point to the same directory.
    5. Save your entries
    for detailed information
    Have a look at this links... i guess it explains what you are looking for...
    http://help.sap.com/saphelp_47x200/helpdata/en/8d/3e4ec2462a11d189000000e8323d3a/content.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/25/ab3a57df3b11d189fc0000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_sm40/helpdata/EN/8d/3e4ec2462a11d189000000e8323d3a/frameset.htm
    Regards,
    Raj.

  • Application server file path vaidation

    I have written the code for application server file path validation.
      DATA : l_fname TYPE filename-fileintern." type c.
      DATA : l_filpath TYPE filename-fileintern,
             l_filname(40) TYPE c.
    PARAMETER : p_sucfil LIKE rfpdo-rfbifile OBLIGATORY. " rlgrap-filename
    AT SELECTION-SCREEN ON p_sucfil.
    l_fname = p_sucfil.
    CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
      CLIENT                        = SY-MANDT
        logical_filename              = l_fname
       OPERATING_SYSTEM              = SY-OPSYS
      PARAMETER_1                   = ' '
      PARAMETER_2                   = ' '
      PARAMETER_3                   = ' '
      USE_PRESENTATION_SERVER       = ' '
       WITH_FILE_EXTENSION           = 'X'
      USE_BUFFER                    = ' '
      ELEMINATE_BLANKS              = 'X'
    IMPORTING
      EMERGENCY_FLAG                =
      FILE_FORMAT                   =
       FILE_NAME                     = l_filpath
    EXCEPTIONS
       FILE_NOT_FOUND                = 1
       OTHERS                        = 2
    IF sy-subrc <> 0.
      message 'Invalid file name' type 'E'.
    ENDIF.
    But always i will get Invalid file name.
    Y is it so.
    pls help me.

    Praveen,
    I have checked ur code and I found that if i give a logical file name from
    tran. FILE under folder 'Logical file name definition, cross client' then ur code works. Pl. check.
    Regards,
    Joy.
    DATA : l_fname TYPE filename-fileintern." type c.
    DATA : l_filpath TYPE filename-fileintern,
    l_filname(40) TYPE c.
    PARAMETER : p_sucfil LIKE rfpdo-rfbifile OBLIGATORY. " rlgrap-filename
    AT SELECTION-SCREEN ON p_sucfil.
      l_fname = p_sucfil.
      CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
      logical_filename = l_fname
    operating_system = sy-opsys
      with_file_extension = 'X'
      IMPORTING
      file_name = l_filpath
      EXCEPTIONS
      file_not_found = 1
      OTHERS = 2
      IF sy-subrc <> 0.
        MESSAGE 'Invalid file name' TYPE 'E'.
      ENDIF.

  • How to give the application server file path in the module pool programming

    Hi,
         Could somebody help me how to provide the application server file path in module pool programming once the logo is uploaded to sap system.
      For eg I have imported a logo name ‘owens’ into sap system by using transaction ‘se78’; now I need to call the path in the below url,
    if container2 is initial.
    CREATE OBJECT CONTAINER2
      EXPORTING
        CONTAINER_NAME              = 'PICTURE_CONTAINER2'.
    CREATE OBJECT PICTURE2
      EXPORTING
        PARENT = CONTAINER2.
    CALL METHOD PICTURE2->SET_DISPLAY_MODE
      EXPORTING
        DISPLAY_MODE = CL_GUI_PICTURE=>display_mode_fit_center
      EXCEPTIONS
        ERROR        = 1.
    CALL METHOD PICTURE2->LOAD_PICTURE_FROM_URL
      EXPORTING
        URL    = " ? "
      EXCEPTIONS
        ERROR  = 1
        Others = 2.
    endif.
    Thanks in advance
    Deepu

    hi Deepu,
    Use FM '/SAPDMC/LSM_F4_FRONTEND_FILE' for fetching the data from the application server path/presentation server path
    Regards,
    Santosh

  • Validation and F4 help on an application server file path parameter

    Hi
    I have a field on a selection screen called File Path and it is for a download program where the user needs to specify the path for the download (NOT THE ACTUAL FILENAME).
    I am trying to find a function or method that allows a user to use F4 help to browse for a directory rather than a specific file. There are lots of posts out there asking this question but all of the answers point to functions that allow you to browse for a particular file rather than just the file path/directory.
    Does anyone know of a function that provides F4 help to browse for a file path on the Server (NOT PC). I would want the user to just be able to select the directory or path and have the path returned. They should not need to pick a specific file.
    F4_DXFILENAME_TOPRECURSION is a very good function but unfortunately it makes the user pick a file rather than just a directory.
    In addition to this, does anyone know of a function or method that allows you to then validate the path\directory that is entered?
    Thanks for your help
    Nicole

    Hi,
      You can try with the FM 'EPS_GET_DIRECTORY_LISTING'. With this Fm module you will get you the list of files of a particular path in an internal table. Then you can populate this internal table in F4 help.
    Hope this solves your problem. If any difficulty, come back to me about that.
    Below are some other FM related to application server directory. Hope these Helps.
    EPS_GET_DIRECTORY_LISTING
    EPS_GET_DIRECTORY_PATH
    EPS_GET_FILE_ATTRIBUTES
    EPS_GET_FTP_SYSTEM_INFO
    Regards,
    Shailesh Jadhav

  • Equalent of F4_filename function module for application server file path

    hi experts,
            i am using  cl_gui_frontend_services=>file_open_dialog
           for bring file path dynamically for user, in front end.
          same feature i want to give when i am trying upload file from application server.
      kindly provide me function module or class method, which will do it.
    thanks in advance
    regards,
    pavan

    Hi,
    Use FM F4_DXFILENAME_TOPRECURSION
    Sample code here
    report ztest.
    data : filename like DXFIELDS-LONGPATH.
    data : begin of itab occurs 0,
    a(200) type c,
    end of itab.
    CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
    EXPORTING
    I_LOCATION_FLAG = 'A'
    *I_SERVER = '?'
    *I_PATH =
    FILEMASK = '.*'
    *FILEOPERATION = 'R'
    IMPORTING
    *O_LOCATION_FLAG =
    *O_SERVER =
    O_PATH = filename
    *ABEND_FLAG =
    EXCEPTIONS
    RFC_ERROR = 1
    ERROR_WITH_GUI = 2
    OTHERS = 3
    break-point.
    open dataset filename for input in binary mode.
    while sy-subrc = 0.
    clear itab .
    read dataset filename into itab.
    append itab.
    endwhile.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    FILENAME = 'd:\abc.txt'
    FILETYPE = 'BIN'
    TABLES
    DATA_TAB = itab
    Regards,
    Satish

  • Application server file path name separated by apace

    Hi All,
    I am writing files on application server. Below is my fie path.
    parameters: p_o_file  like rlgrap-filename default   '/xxx/tmp/app/outbound/1~lcxxxx~ACTUAL~periodfyyear~RR.txt'.
    data : mnthyear(12) type c,
             year(6) type c.
    case p_rpmax.
    when '010'.
    p_ryear = p_ryear - 1.
    concatenate 'FY' p_ryear into year.
    concatenate 'OCT' '-' year into mnthyear separated by space.
    replace 'periodfyyear' with mnthyear into p_o_file.
    In the report output I am getting the file name correctly.
    Output File: /dev/tmp/app/outbound/1~LC1000~ACTUAL~OCT - FY2013~RR.txt
    When checked in AL11, it is showing me the below file name
    1~LC1000~ACTUAL~OCT
    my file name is truncated after space.
    Can we create a file name with spaces? Awaiting your replies.
    Thanks,
    Haritha

    Pl find snipet..
    FORM save_file.
       DATA: lv_data TYPE string.
    *Move complete path to filename
       gv_file = '1~LC1000~ACTUAL~OCT - FY2013~RR.txt'.
    * Open the file in output mode
       OPEN DATASET gv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
       IF sy-subrc NE 0.
         MESSAGE 'Unable to create file' TYPE 'I'.
         EXIT.
       ENDIF.
       LOOP AT gt_spfli INTO gwa_spfli.
         CONCATENATE gwa_spfli-carrid
                     gwa_spfli-connid
                     gwa_spfli-countryfr
                     gwa_spfli-cityfrom
                     gwa_spfli-airpfrom
                     gwa_spfli-countryto
                     gwa_spfli-cityto
                     gwa_spfli-airpto
                     gwa_spfli-arrtime
          INTO lv_data
          SEPARATED BY ','.
    *TRANSFER moves the above fields from workarea to file  with comma
    *delimited format
         TRANSFER lv_data TO gv_file.
         CLEAR: gwa_spfli.
       ENDLOOP.
    * close the file
       CLOSE DATASET gv_file.
    ENDFORM.

  • APPLICATION SERVER FILE PATH

    Friends to surf the flat file
      function module
    what we use is
    'KDGET_FILENAME_ON_F4'_
    like this what is the fuction module for application server?????

    Try:
    F4_DXFILENAME_TOPRECURSION
    PARAMETERS: f_app(128).
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR f_app.
    PERFORM get_fname_app.
    FORM get_fname_app.
    DATA: c_fnh_mask TYPE dxfields-filemask VALUE '.',
    search_dir TYPE dxfields-longpath VALUE '/sapglobal/users',
    file_path LIKE dxfields-longpath.
    CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
    EXPORTING
    i_location_flag = 'A'
    i_server = ' '
    i_path = search_dir
    filemask = c_fnh_mask
    fileoperation = 'R'
    IMPORTING
    o_path = file_path
    EXCEPTIONS
    rfc_error = 1
    OTHERS = 2.
    IF sy-subrc EQ 0.
    f_app = file_path.
    ENDIF.
    ENDFORM. "get_fname_app[/code]
    OR
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_apath.
    CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
    IMPORTING
    serverfile = p_apath
    EXCEPTIONS
    canceled_by_user = 1
    OTHERS = 2.

  • Validate  application server file

    Hi,
      I have to validate the application server file path on selection screen.
    I am using following code :
    form VALID_APP_FILEPATH   using    p_filpath TYPE FILENAME-FILEINTERN.
      data : l_fname(60).
      CALL FUNCTION 'FILE_GET_NAME'
        EXPORTING
          LOGICAL_FILENAME = p_filpath
          OPERATING_SYSTEM = SY-OPSYS
        IMPORTING
          FILE_NAME        = L_FNAME
        EXCEPTIONS
          FILE_NOT_FOUND   = 1
          OTHERS           = 2.
      IF SY-SUBRC ne 0.
          MESSAGE 'Enter the valid file path'(e01) TYPE 'E'.
      ENDIF.
    endform.                    " VALID_APP_FILEPATH
    but if i choose correct file path from F4 help also.
    It displays error message.
    Sy-subrc always equals 1.
    Help me out

    Hi,
    I have implemented the code mentioned by you and am not having any problems even when I use F4 to get the fle name.
    Pls recheck and get back if the error persists.
    Reward if found helpful.
    Warm Regards,
    R Adarsh

  • Application Server file Validity

    Hi Experts,
    I have one query. I wanted to check the validity of file in application server. The scenerio is like in my selection screen I will provide application server file name.
    I wanted to validate whether that file is existing or not. If file is not existing then I need to display an error message.
    Can anybody will suggest me how I can achieve this requirement?
    Thanks,
    Neha

    Hi Neha,
    To access the files on Application server we use DATASET operationsd like open, read, close etc.
    Now in your case use opendataset as:
      open dataset   ds_name for output in text mode encoding default.
      IF sy-subrc NE 0.
         //write your message here.
      ENDIF.
      CLOSE DATASET ds_name.
    Where ds_name = logical path name of your file, or if you want to check for just one file, hard code the path.
    Better practice is to use logical path name.
    Also declare ds_name as
    DATA: ds_name          LIKE rfpdo-rfbifile.   
    Close dataset is used in case file exists you need to close it.
    Revert back if you wantto know abt logical file name.
    Regards,
    Sana.

  • Wut 118 application server file abc.prn does not exist or is of zero length

    dear members,
    I am printing a character mode report which gives the following error:
    "wut 118 application server file c:\abc.prn does not exist or is of zero length"
    my code on when-button-pressed is here:
              declare
                   repid REPORT_OBJECT;
                   v_rep VARCHAR2(200);
                   rep_status VARCHAR2(50);
                   report_name varchar2(100);
                   v_path varchar2(200);
                   rep_server varchar2(50);
              BEGIN
                   select parameter into rep_server from mis where parameter_type = 'REPORT_SERVER';
                   report_name := 'C:\TEMP\abc.prn';
                   repid := find_report_object('reports');
                   SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,:global.report_path||'abc123.rdf');
                   SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
                   SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
                   SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,FILE);
                   SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,:global.report_path||'dflt.prt');
                   SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,report_name);
                   SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,REP_SERVER);
    PF_FGOWGPNO='||:FG_DISPATCH_M.FGOWGPNO||' PF_FISCAL_YEAR='||:FG_DISPATCH_M.XFISCAL_YEAR||:FG_DISPATCH_M.XFISCAL_YEAR||' P_USERNAME='||:DUMMY.USER);
    PF_FGOWGPNO='||:FG_DISPATCH_M.FGOWGPNO||' PF_FISCAL_YEAR='||:FG_DISPATCH_M.XFISCAL_YEAR);
                   SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no PF_FGOWGPNO='||:FG_WH_INTERCHANGE.FG_TRANSIT_ID||' PF_FISCAL_YEAR='||:FG_WH_INTERCHANGE.XFISCAL_YEAR||' PRINT_IT='||:DUMMY.PRINT_IT);
                   v_rep := RUN_REPORT_OBJECT(repid);
                   rep_status := REPORT_OBJECT_STATUS(v_rep);
                   WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
                        rep_status := report_object_status(v_rep);
                   END LOOP;
                   IF rep_status = 'FINISHED' THEN
                        --WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repsrv10g','_blank');
                        NULL;
                   ELSE
                        message('Error when running report');
                   END IF;
                   exception
                        when others then
                        message(sqlerrm);
                        raise form_trigger_failure;
                   END;
                   declare
                        a boolean;
                   begin
                        a := webutil_file_transfer.as_to_client('c:\temp\abc.prn','c:\temp\abc.prn');
                   end;               
                   begin
                        client_host('cmd start /c type c:\temp\abc.prn > prn');
                   exception
                        when others then null;
                   end;Regards:

    Disregard my last. I see what you are doing. You are using file transfer to move the file to the local machine. It was confusing because the paths are the same.
    I would suggest adding a SYNCHRONIZE after the file transfer and before the attempt to print. It might even be a good idea to add some error handling code to verify that the file has been copied and can be found. This will allow you to better deal with situations where the file doesn't get written for some reason. WebUtil offers some functions to check for file existence and size.
    Also, if you are using Java 7U21, this may cause some issues with your CLIENT_HOST call.

  • How do I add a selection screen parameter to get a application server file

    Hi All..
    Can you please suggest how can we add a selection screen parameter to get a application server file ?
    Thanx in Advance...
    Regards,
    Deepak

    <b>Parameter def :</b>
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 02(30) text-005 FOR FIELD p_xlfil.
    PARAMETERS: p_xlfil LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    <b>Browse</b>
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_xlfil.
      PERFORM ws_get_filename USING p_xlfil.
    FORM ws_get_filename USING p_xlfil.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                def_path         = 'C:'
                mask             = ',Excel,*.xls,All,*.*.'(100)
                mode             = 'O'
                title            = 'Title'(101)
           IMPORTING
                filename         = p_xlfil
           EXCEPTIONS
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                OTHERS           = 5.
      IF sy-subrc NE 0.
        CLEAR p_xlfil.
      ENDIF.
    ENDFORM. " WS_GET_FILENAME
    Regards
    <b>Oops i did not read "application server"</b>
    Use FM F4_FILENAME_SERVER and not F4_FILENAME/WS_GET_FILENAME.
    Message was edited by:
            Raymond Giuseppi

  • Problem in accessing application server file using open dataset

    Hi All,
    I am trying to access application server file using open dataset command, its working fine for normal path which imention. But when i am giving path of XI server file, its not working. How to access XI server file using open dataset. Please let me know.
    Thanks in advance.
    Regards,
    Vishal

    Hi Vishal,
    You need to verify if the location where you are trying to save the file is in the same server of SAP. In case that the location is in other server you need to map that directy into the same server of SAP.
    You need to point always to a location in the same server of SAP, in order that the open dataset could work.
    Regards,
    Eric

  • Error  while accessing the application server file

    Hello,
    When I try to load the data from CSV file to PSA , I am getting following error message
    "Error  while accessing the application server file"
    "Errors in source system"
    I gave the right file path
    I am not sure about this error message.
    Thanks,

    Hi ram,
    if you have more than one application server running in your BI system (see at transaction SM51) be aware that your infopackage will be executed on the right one. Each application server has its own file system and your job need to run on the server your file is stored on.
    Also check if the os user of the SAP system itself (<sid>adm on Unix) has rights to read that file.
    Bye
    Frank

  • Application server file formats.

    Hi,
    I have one query regarding the application server file formats, when we are creating a file we give some extension (.txt, .dat),what is the use of different extensions.
    When we are downloading the file from appl server using CG3Y we have two options(ASC and BIN ) what is the use of these options.
    Thanks in advance.

    Hi,
    A text file is a kind of computer file that is structured as a sequence of lines.
    A .dat  file is a computer file which stores data for use by a computer application or system.
    A character encoding consists of a code that pairs a sequence of characters from a given character set (sometimes referred to as code page) with something else, such as a sequence of natural numbers, octets or electrical pulses, in order to facilitate the storage of text in computers and the transmission of text through telecommunication networks.
    ASCII and BINARY codes are used for internal representation of data.
    The major difference between ASCII and BINARY is that when ASCII mode is used then the READ DATASET stmt starts at new line each time and in case of BINARY it reads character by character ( or some characters).
    Thanks and regards.

Maybe you are looking for

  • Showing Errors in Report Output

    Hi some of users getting this error .printer issue is working fine but they are geting this error PP-FND-00500: AFPPRN received a return code of failure from routine FDUPRN. Cannot read file E:\APPS2K\applprod\common\BPOD\out\o1212988.out Cause: Appl

  • My ipod wont sync with my computer after i have reset it all?

    I have reset my iPod touch and it wont sync with my iTunes at all and also my iTunes store wont work, a message is showing up saying connect with internet when my internet is already connected?

  • How can I make the LabVIEW CGI write to the same client window twice?

    I'm building a CGI VI using LabVIEW 6i and the Internet Dev. Toolkit. I would like this VI to write to the same client browser window twice. The first reply will just be a confirmation that the form has been submitted, and the second reply will be th

  • What is the parallel command to setActionCommand in Timer class?

    if I want to get imformation from the timer that got to 0 (if I have several of timers) how do I get it. I mean, how do I know that Timer no. 2 got to 0 and not timer no.8?? Thank you

  • Help needed to transfer contacts

    Hello,  I own a BB Curve 9220 and an iPhone. I have iPhone's contacts backup in vcf and csv formats. I need to copy those contacts to my BlackBerry, which i am unable to find a way to do. Please help me to do it. And yea, i dont have a Windows PC, i