FileNotFoundException when file is present.....

Please read the code below and tell me whats wrong....this cropped up suddenly...
public class Hi {
public Hi() {
public static void main(String[] args) throws Exception {
FileOutputStream fo = new FileOutputStream("trail");
fo.write(10000000);
fo.close();
File f = new File("trial");
System.out.println(f.getAbsolutePath());
System.out.println(f.exists());
FileInputStream fin = new FileInputStream(f);
System.out.println(fin.available());
fin.close();
System.out.print("Hi");
in the first println it prints the absolute path correctly.
in the second println it says false (for f.exists());
in the file input stream a exception is thrown File not found exception...
I'm confused...
Thanks
Sathish

Hi,
give the complete file path say,
FileOutputStream fo = new FileOutputStream("c:\trial.txt");
and also while checking for the existence of the file give the complete path so that it can check for the specified file in the given directory.
File f = new File("c:\trial.txt");
I think this solves the problem :-)

Similar Messages

  • Syn read file adapter throwing exception when file is not present directory

    Hi Team,
    Requirment is to check for a file is present in a soa directory .If present delete the existing and write a new one.
    Syn read file adapter is throwing errors when file is not present in the directory soa local.
    Any paramter we can add to skip this exception.
    any help is appreciated.
    Thanks all
    Swetha H.

    Hi:
    An alternative is that , before u try to read it, u make a list directory, and search for ur file, if it is not in the list, then u don't read; otherwise, u do.
    The list operation is part of the file adapter.
    hope this helps
    best

  • Copy File from Presentation Server to Application Server in Background

    Hi,
    I need to copy Image file from Presentation Server to Application Server.
    The below given code is workking fine in Foreground but whenevr I am trying to execute in Background, the job is cancelled and I am getting a dump.
    data : wa_source      type string,
              wa_destination type string.
    wa_source = 'C:\PARBIND.BMP'.
    wa_destination = 'D:\PARBIND.BMP'.
    start-of-selection.
      call method cl_gui_frontend_services=>file_copy
        exporting
          source               =  wa_source
          destination          = wa_destination
    *    overwrite            = SPACE
    *  EXCEPTIONS
    *    cntl_error           = 1
    *    error_no_gui         = 2
    *    wrong_parameter      = 3
    *    disk_full            = 4
    *    access_denied        = 5
    *    file_not_found       = 6
    *    destination_exists   = 7
    *    unknown_error        = 8
    *    path_not_found       = 9
    *    disk_write_protect   = 10
    *    drive_not_ready      = 11
    *    not_supported_by_gui = 12
    *    others               = 13
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    In backgound Error is....
    Exception condition "CNTL_ERROR" raised.*
    Any solution is appreciated.
    Thanks
    Arbind

    Hi Arbind,
    Just realize... when you run it in foreground, you have a foreground to capture the file location. so it runs fine..
    but when you are running it in background, there is no foreground to check that is no gui present... how can it check where the C:\.... location is??
    no need of reading any oss note... just see.. the name is cl_GUI_FRONTEND_service.. its only for front end..
    u need open dataset, read dataset, close dataset kind of things while running in background. or RFCs to read the file... (search SDN).

  • Read XML file from presentation server

    Hi All,
    I want read XML file from presentation server currently i am using GUI_UPLOAD fm . but it is reading some junk data.
    DATA : BEGIN OF upl OCCURS 0,
              f(255) TYPE c,
           END OF upl.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename = D:\XX.XML'
          filetype = 'BIN'
        TABLES
          data_tab = upl.
    is there any other alternative.
    Thanks
    Swarup,

    Hi Swarup,
    Use method IMPORT_FROM_FILE of class CL_XML_DOCUMENT.
    A sample code snippet :-
    PARAMETERS: p_filnam TYPE localfile OBLIGATORY
    DEFAULT 'C:\Documents and Settings\ssaha\Desktop\test.xml'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filnam.
    DATA: l_v_fieldname TYPE dynfnam.
    l_v_fieldname = p_filnam.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    field_name = l_v_fieldname
    IMPORTING
    file_name = p_filnam.
    START-OF-SELECTION.
    TYPES:
    BEGIN OF ty_tab,
    name TYPE string,
    value TYPE string,
    END OF ty_tab.
    DATA:
    lcl_xml_doc TYPE REF TO cl_xml_document,
    v_subrc TYPE sysubrc,
    v_node TYPE REF TO if_ixml_node,
    v_child_node TYPE REF TO if_ixml_node,
    v_root TYPE REF TO if_ixml_node,
    v_iterator TYPE REF TO if_ixml_node_iterator,
    v_nodemap TYPE REF TO if_ixml_named_node_map,
    v_count TYPE i,
    v_index TYPE i,
    v_attr TYPE REF TO if_ixml_node,
    v_name TYPE string,
    v_prefix TYPE string,
    v_value TYPE string,
    v_char TYPE char2.
    DATA:
    itab TYPE STANDARD TABLE OF ty_tab,
    wa TYPE ty_tab.
    CREATE OBJECT lcl_xml_doc.
    CALL METHOD lcl_xml_doc->import_from_file
    EXPORTING
    filename = p_filnam
    RECEIVING
    retcode = v_subrc.
    CHECK v_subrc = 0.
    v_node = lcl_xml_doc->m_document.
    CHECK NOT v_node IS INITIAL.
    v_iterator = v_node->create_iterator( ).
    v_node = v_iterator->get_next( ).
    WHILE NOT v_node IS INITIAL.
    CASE v_node->get_type( ).
    WHEN if_ixml_node=>co_node_element.
    v_name = v_node->get_name( ).
    v_nodemap = v_node->get_attributes( ).
    IF NOT v_nodemap IS INITIAL
    * attributes
    v_count = v_nodemap->get_length( ).
    DO v_count TIMES.
    v_index = sy-index - 1.
    v_attr = v_nodemap->get_item( v_index ).
    v_name = v_attr->get_name( ).
    v_prefix = v_attr->get_namespace_prefix( ).
    v_value = v_attr->get_value( ).
    ENDDO.
    ENDIF.
    WHEN if_ixml_node=>co_node_text OR
    if_ixml_node=>co_node_cdata_section.
    * text node
    v_value = v_node->get_value( ).
    MOVE v_value TO v_char.
    IF v_char <> cl_abap_char_utilities=>cr_lf.
    wa-name = v_name.
    wa-value = v_value.
    APPEND wa TO itab.
    CLEAR wa.
    ENDIF.
    ENDCASE.
    * advance to next node
    v_node = v_iterator->get_next( ).
    ENDWHILE.
    LOOP AT itab INTO wa.
    ENDLOOP.
    Regards
    Abhii

  • Data1.cab file is present but empty after download for Acrobat Pro XI

    I am trying to upgrade to Acrobat Pro XI and have downloaded the files. The extraction process took quote a few attempts before it worked on my PC and I'm now doing the install. It get to a point where 'Error 1311 Source file not found' appears and asks me to check on the data1.cab file and retry. The file is present but is empty (0kb) so when I hit 'retry' the same message just appears again.I am downloading from Adobe direct, not from a disc and am downloading onto a PC.

    there's only one self-extracting file you need to download.  make sure your dl is complete.
    Downloadable installation files available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 | 12 | 11, 10 | 9, 8, 7 win | 8 mac | 7 mac
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7 win | 8 mac | 7 mac
    Lightroom:  5.7.1| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5.5, 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • Generating tab delimited file on presentation server

    Hi All,
    I have to generate a tab delimited file on presentation server. The file shouldn't have '#' as separator. Instead it should be separated by TAB (when you press TAB button, some spaces will come naa... like that) ' '. Please advice me how to do this...
    Thanks in Advance,
    Regards,
    Phani

    Hi,
    Check this example..
    DATA: BEGIN OF itab OCCURS 0,
    matnr TYPE matnr,
    werks TYPE werks_d,
    END OF itab.
    itab-matnr = 'ABC'.
    itab-werks = 'ASDF'.
    APPEND itab.
    itab-matnr = 'EFG'.
    itab-werks = 'DHIS'.
    APPEND itab.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filename = 'C:\test.txt'
    write_field_separator = 'X'
    TABLES
    data_tab = itab
    EXCEPTIONS
    file_write_error = 1
    no_batch = 2
    gui_refuse_filetransfer = 3
    invalid_type = 4
    no_authority = 5
    unknown_error = 6
    header_not_allowed = 7
    separator_not_allowed = 8
    filesize_not_allowed = 9
    header_too_long = 10
    dp_error_create = 11
    dp_error_send = 12
    dp_error_write = 13
    unknown_dp_error = 14
    access_denied = 15
    dp_out_of_memory = 16
    disk_full = 17
    dp_timeout = 18
    file_not_found = 19
    dataprovider_exception = 20
    control_flush_error = 21
    OTHERS = 22.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    MESSAGE s208(00) WITH 'File downloaded'.
    ENDIF.
    Thanks,
    Naren

  • When importing keynote presentations from ituns to ipad, do they occupy double the space on the ipad?

    When I import presentations from mac to ipad I put them first on ipad thorough itunes when the ipad is connected, then from the keynote app I import the presentations. After can I delete the presentations from itunes? and if i don't will they occupy double the space on my ipad?

    Keynote files are not contained in iTunes
    iTunes is used as an import application for iOS devices
    When transferring files from Mac to iOS devices iTunes, does not hold files, only a link to the file on the Mac
    Do not confuse downloading music to iTunes

  • How to catch java.io.FileNotFoundException when user enters a.jsp which is not a vali

    How to catch java.io.FileNotFoundException when a user enters a bogus jsp page. For example. I have a page called login.jsp. If a user enters log.jsp, the entire path is show and i get java.io.FileNotFoundException. This should not happen. This only happened since I upgraded to 9iAS. I tried send_error=true in zone.properties like i did when i was just using oracle http that came with database and it doesnt work. How are all you guys catching this?? I cant find any documentation. They say send_error=true will work, but IT DOESNT.
    Thanks for your time

    Hi Adam,
    I am also facing the same problem of the java.io.FIleNotFOundException in the browser display when i am giving a wrong file path in the Url. you have mentioned that you have solved it when you were using Orcale 8i Http Server, can you please guide me for that( as we are also using Oracle 8i) I checked with putting send_error=true in zone.properties file but that is not working. What exctly you have done to get rid of that error message. I am using Windows Nt platform.
    Thanks and Regards.
    Arnab

  • Java.io.FilenotFoundException (bad File Discriptor)

    in my project i am facing one exception that is :
    Java.io.FileNotFoundException (Bad File Discriptor)
    when this exception coming tell me briefly

    Either your filesystem has gone awry or you are doing something wrong in your code. I suspect the latter.
    Please post your formatted code using the code tags.

  • Nexus 5548UP Downgrade from 5.1.3.N1.1 to 5.0.3.N2.2b fails -- SRG file not present/cannot be opened

    I am attempting to downgrade from 5.1.3.N1.1 to 5.0.3.N2.2b for standards compliance.
    When following the ISSU steps for validation of the install all command I receive the following error on the following command:
    sh install all impact kickstart bootflash:n5000-uk9-kickstart.5.0.3.N2.2b.bin system bootflash:n5000-uk9.5.0.3.N2.2b.bin
    Verifying image bootflash:/n5000-uk9-kickstart.5.0.3.N2.2b.bin for boot variable "kickstart".
    [####################] 100% -- SUCCESS
    Verifying image bootflash:/n5000-uk9.5.0.3.N2.2b.bin for boot variable "system".
    [####################] 100% -- SUCCESS
    Verifying image type.
    [####################] 100% -- SUCCESS
    Extracting "system" version from image bootflash:/n5000-uk9.5.0.3.N2.2b.bin.
    [#                   ]   0% -- FAIL. Return code 0x404F0003 (SRG file not present/cannot be opened).
    I followed some recommendations from this post https://supportforums.cisco.com/thread/2108814
    reload to clear temp and cache
    show system internal flash
    checked md5sum of image
    I found this information http://www.cisco.com/en/US/docs/switches/datacenter/nexus5000/sw/deferral/Deferral_Advisory_Notice_N5K.html
    I am unsure of how to upgrade when the steps to validate indicate a problem with the upgrade/downgrade.
    I still receive the error.
    Any help would be greatly appreciated.
    Attached are the steps done so far and outputs.

    I had already created a case with our reseller.  The engineer there had me reload the 5ks and attempt the show install all impact again.  When I did it was successful.
    I was able to then downgrade to 5.0.3.N2.2b.  I am currently working to duplicate the issue by going back to 5.1.3.N1.1.
    The engineer also stated that I was probably running into this bug:
    http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCsw25835
    Here is the contents of the sh system internal flash and show system internal dir /var/tmp:
    Mount-on                  1K-blocks      Used   Available   Use%  Filesystem
    /                            409600     72564      337036     18   /dev/root
    /proc                             0         0           0      0   proc
    /post                          2048         4        2044      1   none
    /var                         409600     72564      337036     18   none
    /sys                              0         0           0      0   none
    /isan                       1536000    409628     1126372     27   none
    /var/tmp                     307200        72      307128      1   none
    /var/sysmgr                 1024000         0     1024000      0   none
    /var/sysmgr/ftp              409600        68      409532      1   none
    /var/sysmgr/ftp/cores        102400         0      102400      0   none
    /callhome                     61440         0       61440      0   none
    /dev/shm                     524288    126552      397736     25   none
    /volatile                    153600         0      153600      0   none
    /debug                        20480         0       20480      0   none
    /dev/mqueue                       0         0           0      0   none
    /debugfs                          0         0           0      0   nodev
    /mnt/plog                     49024      1300       47724      3   /dev/mtdblock2
    /mnt/cfg/0                   114909      4274      104702      4   /dev/sda5
    /mnt/cfg/1                   112920      4274      102816      4   /dev/sda6
    /var/sysmgr/startup-cfg      409600      2104      407496      1   none
    /dev/pts                          0         0           0      0   devpts
    /mnt/pss                     114917      5923      103060      6   /dev/sda4
    /bootflash                  1609984    779460      748740     52   /dev/sda3
                                                                    ./         640
                                                                   ../         240
                                                       bootloader_ver            0
                                               util_cli_history_admin           48
                                                                mysrg         1664
                                                        mcm_ascii.log         1019
                                                     m2rib_ascii.3248           68
                                                               arping          101
                                                            stp.log.1         3836
                                                             fwm1.out            0
                                                        cmp_slot_id.1            0
                                                               ntpd_1            0
                                                         ntp_client_1            0
                                                     ntp__libdapi.log            0
                                                     igmp_restart.log            0
                                                     radius_debug.log          232
                                                          cfs_mac.log          166
                                                           climib.log         1416
                                                              lcc.log          694
                                                      security_stderr           77
                                                      security_stdout            0
                                                        aaa_debug.log          519
                                                   security_debug.log          647
                                                            evmc.3005           31
                                                           idehsd.log          602
                                                            mvsh.3000            0
                                                            lockcisco            0
                                                              .flexlm/          60
                                                                 logs@          20
                                                      first_setup.log         2981
                                                      boot_uptime.log           56
                                                                  vsh/          40

  • FileNotFoundException when using DMUtils

    Hello,<br /><br />I am getting a FileNotFoundException when I call DMUtils.getDataBuffer(). I  verified I have the correct permissions on my tmp directory (/tmp/formserver). The tmp directory does contain files and sub-directories created by LiveCycle (ie., XMLFormService and PDFManipulation are 2 of the sub-directories created).<br /><br />The code successfully creates/starts a UserTransaction and DataManager.<br /><br />Here is the stack trace:<br /><br />[10/11/05 10:49:31:494 CDT] 25182e36 SystemErr     R java.io.FileNotFoundException: \tmp\formserver\adobews_gfifsr01_gfifsr01_server1_1976681980\DM5957187462937543782.dir\DM 8437799059940154455.tmp (The system cannot find the path specified)<br />[10/11/05 10:49:31:504 CDT] 25182e36 SystemErr     R      at java.io.FileOutputStream.open(Native Method)<br />[10/11/05 10:49:31:504 CDT] 25182e36 SystemErr     R      at java.io.FileOutputStream.<init>(FileOutputStream.java:201)<br />[10/11/05 10:49:31:504 CDT] 25182e36 SystemErr     R      at java.io.FileOutputStream.<init>(FileOutputStream.java:92)<br />[10/11/05 10:49:31:504 CDT] 25182e36 SystemErr     R      at com.adobe.util.DMUtils.copyFile(DMUtils.java:125)<br />[10/11/05 10:49:31:504 CDT] 25182e36 SystemErr     R      at com.adobe.util.DMUtils.getDataBuffer(DMUtils.java:70)

    I don't know if this would be useful but I am using the network path and works for me. The code is as follows.
    inStream = new FileInputStream(filePath);
    pdfFile = DMUtils.getDataBuffer(dataManager, inStream);
    -Sachin

  • Upload file from Presentation to Application

    Hi Friends,
    I  M uploading EXEL file  from presentation to application server.
    but in the transaction AL11 when i double click the file path ,i can not see the EXEL data. it is appearing the dump data. that way,  i m finding  the dump data in internal table also . what can i do for uploading EXEL file to application server.
    please help me.
    Thanks,
    Rohini

    hai rohini
    To upload excel file to AL11 Please refer to the given below code:
    data : if_intern type  kcde_cells occurs 0 with header line.
      data : vf_index type i.
      data : vf_start_col type i value '1',
             vf_end_col   type i value '256'.
      field-symbols : <fs>.
    * ----------- " Define Internal tables for ABAP.
    data: begin of i_mat OCCURS 10,
          empc(5),
          name(12),
          Age(3),
          end of i_mat.
    * ----------- " Define data variables for ABAP.
    *             " Define data variables for Excel Upload.
    data: p_text type natxt.
    data: dataset(150) type c.:
    * ----------- " Selection-Screen.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
    parameters: p_file2  type rlgrap-filename,
                p_brow2 type i,
                p_erow2 type i.
    SELECTION-SCREEN END OF BLOCK B1.
    * ----------- " At Selection- screen.
    at selection-screen on value-request for p_file2.
      call function 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          program_name = syst-repid
        CHANGING
          file_name    = p_file2.
    * ----------- " Start of ABAP SQL Commands
    START-OF-SELECTION.
    *  dataset = '/tmp/new.xls'.
       dataset = '/tmp/new.xls'.
      if rg1 = 'X'.
       if p_file2 is not initial and
          p_brow2 is not initial and
          p_erow2 is not initial.
    call function 'KCD_EXCEL_OLE_TO_INT_CONVERT'
        EXPORTING
          filename    = p_filename
          i_begin_col = vf_start_col
          i_begin_row = p_brow2
          i_end_col   = vf_end_col
          i_end_row   = p_erow2
        TABLES
          intern      = if_intern.
      if if_intern[] is initial.
        p_text = 'No Data Uploaded'.
      else.
        sort if_intern by row col.
        loop at if_intern.
          move : if_intern-col to vf_index.
          assign component vf_index of structure p_download to <fs>.
          move : if_intern-value to <fs>.
          at end of row.
            append p_download.
            clear p_download.
          endat.
        endloop.
      endif.
    delete dataset dataset.
      open dataset dataset for output in text mode encoding default.
      loop at i_mat.
        if sy-subrc eq 0.
          transfer i_mat to dataset.
        endif.
      endloop.
      close dataset dataset.

  • Q5 - Battery drains when SDcard is present

    Good morning, Today, the battery of my Q5 works well (even better than with OS 10.2),If I plug a empty SD card, the battery keep working well,But if I load some file(s) or music file(s) on this SD card, battery start draining very quickly ?? What can I do to stop this battery drain, to be able to use a SD card with my Q5 ? Thanks in advance, Q5 OS 10.3.1.1565 + Link for Mac 1.2.2 (build 11)

    It all started with Calendar and Synchornization issues. After installing the OS 10.3 upgrade, battery passed from one small day to 3-4 hours. After removing SDcard and resting to factor default (OS 10.3) my Q5 several times (more than 10 times), the issue was solved by a BBM update (a priori issue was linked to BBM and the Android Player). Battery was back like never : today my Q5 can stand 1,5+ day. But as soon as I plug the SDcard with at least one file on it, battery drains in 3-4 hours. (I have repeated 4-5 times the experiment). Drain only happens when file(s) are present on the SDcard ... ? And in addition, Calendar app is still unstable. Any ideas, are more than welcome :-)

  • Getting FileNotFoundException - but file is right there

    hi, I'm getting FileNotFoundException when trying to open a property file.
    The property file wfms.props, is in the same directory as my source code.
    Following is the code snippet I have
    private static String applicationPropertiesFile = "wfms.props";
    private Properties appProps;
    try {
    FileInputStream fin = new FileInputStream(applicationPropertiesFile);
    appProps = new Properties();
    appProps.load(new FileInputStream(applicationPropertiesFile));
    catch (Exception e){e.printStackTrace(System.out);}
    I'm not sure why it can't see the file..kindly help!

    thanks so much warnerja..it worked!! I put the file
    same place as my class files & used
    getClass().getResourceAsStream(filename).This isn't a very good way to read a properties file, since you are basically relying on the class loader to locate the file, forcing you to put the file somewhere in your class path.
    In the context of the servlet you are better off using the servlet calls to get the application directory. I typically use a setting in the web.xml (in the WAR file) to point to where other properties files are located.
    web.xml:
    ?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
    <web-app>
        <!-- Define the Log4jInit servlet, which just sets up where the properties file is -->
        <servlet>
            <servlet-name>DEVOInit</servlet-name>
            <servlet-class>com.cisco.devo.servlet.DEVOInit</servlet-class>
            <init-param>
                <param-name>log4j-init-file</param-name>
                <param-value>WEB-INF/conf/log4j.properties</param-value>
            </init-param>
            <init-param>
                <param-name>devo-properties</param-name>
                <param-value>WEB-INF/conf/devo.properties</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>   
         <taglib>
           <taglib-uri>/taglibs</taglib-uri>
           <taglib-location>/WEB-INF/taglib.tld</taglib-location>
         </taglib>
    </web-app>
    Get the properties file:
        // Get the path that the web application is running in
        String prefix =  getServletContext().getRealPath("/");
        // Dump it to standard out
        System.out.println("DEVOInit.init(): prefix = '" + prefix + "'");
        // Get the pameter from the web.xml 
        log4jProps = getInitParameter("log4j-init-file");
        // Dump what we think the log4j properties file is
        System.out.println("DEVOInit.init(): log4j-init-file = '" + log4jProps + "'");       
        // if the log4j-init-file is not set, then no point in trying
        if(log4jProps != null)
            // tell log4j where the properties file is
            PropertyConfigurator.configure(prefix+log4jProps);
            System.out.println("DEVOInit.init(): Log4J intialized with property file = '"+prefix+log4jProps+"'");
        // Initialize the configuration
        devoProps = getInitParameter("devo-properties");
        System.out.println("DEVOInit.init(): devo-properties = '" + devoProps + "'");
        // Call the initialization routine
        Configuration.initialized(devoProps, prefix);In the above example, the Configuration object is a singleton that reads in properties from a file.

  • How to search file from presentation server

    Hi All,
    In a ABAP program i want to display a dialog box which will help me to find out any file from presentation server.That dialog box should be display after clicking on parameter on selection screen.Parameter is a simple variable,not a field from any internal table. so i can not use function module F4IF_INT_TABLE_VALUE_REQUEST
    Please suggest me any function module which will satisfy my requirement.
    Thank you.

    Hi,
    Check this example..
    DATA: T_FILETABLE TYPE FILETABLE.
    DATA: RC TYPE I.
    DATA: USER_ACTION TYPE I.
    CALL METHOD cl_gui_frontend_services=>file_open_dialog
      CHANGING
        file_table              = T_FILETABLE
        rc                      = RC
        USER_ACTION             = USER_ACTION
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_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.
    Thanks,
    Naren

Maybe you are looking for