How to know the first placed file in Application server directory

Hi All ,
i want to Know the First plased file in a application server directory . i have tried with
FM EPS_GET_FILE_ATTRIBUTES but it is giving the file size. Can anybody  give some idea to get the file lastmodify property.
Thanks & Regards
Prithvi.

Hi Prithvi!
Use the methods of class CL_GUI_FRONTEND_SERVICES (if your release is at least 620, sorry otherwise).
Method DIRECTORY_LIST_FILES will give you all files of a directory, then you can check with method FILE_GET_ATTRIBUTES for some date info.
But maybe you can agree about a timestamp in the filename - this has to be set by the sender, but is much easier and reliable, too.
Regards,
Christian

Similar Messages

  • How to get the list of file from application server

    Hi Expert.
    I want to get the file list from dicrectory in application server
    best regards.
    Alex

    Hi.
    Yes, You are right, i can get the file list by AL11.
    But i need get the list in ABAP program.
    So i need a function modul to get the list. If you has some sample code, it should be very nice.
    Best.
    Alex

  • How to Provide search Help for files on Application Server

    Hi Guys,
                   Can anyone tell me How to Provide search Help for files on Application Server. I have put a file name on selection screen. I want to give search help for files on application server.
    Thanks & Regards.
    Harish.

    Hi Harish,
    Use the following code,
    tables sxpgcotabe.
    data: lt_execprot LIKE btcxpm OCCURS 0 WITH HEADER LINE,
            w_filepath(60)       TYPE c, --> length depending on your Directory path.
      SELECT SINGLE *
        FROM sxpgcotabe
             WHERE name = 'LIST_DB2DUMP'
               AND opsystem = sy-opsys.
      IF sy-subrc <> 0.
        SELECT SINGLE *
          FROM sxpgcotabe
               WHERE name = 'LIST_DB2DUMP'
                 AND opsystem = 'UNIX'.
        IF sy-subrc <> 0.
          MESSAGE e000 WITH 'External operating system command '
                            'LIST_DB2DUMP not found'.
        ENDIF.
      ENDIF.
      sxpgcotabe-parameters = p_filepath. --> provide the directory path.
      CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
           EXPORTING
                commandname                   = sxpgcotabe-name
                additional_parameters         = sxpgcotabe-parameters
                operatingsystem               = sxpgcotabe-opsystem
           TABLES
                exec_protocol                 = lt_execprot 
           EXCEPTIONS
                no_permission                 = 1
                command_not_found             = 2
                parameters_too_long           = 3
                security_risk                 = 4
                wrong_check_call_interface    = 5
                program_start_error           = 6
                program_termination_error     = 7
                x_error                       = 8
                parameter_expected            = 9
                too_many_parameters           = 10
                illegal_command               = 11
                wrong_asynchronous_parameters = 12
                cant_enq_tbtco_entry          = 13
                jobcount_generation_error     = 14
                OTHERS                        = 15.
      IF sy-subrc <> 0.
        MESSAGE e000 WITH text-e01 p_filepath.  "Directory failed
      ENDIF.
    Loop round the directory list, split each line up into a line table
    and get the last data for each line, should be the filename
    Then build the dirlist.
      REFRESH t_dirlist.
      LOOP AT lt_execprot.
        REFRESH t_dirline.
        SPLIT lt_execprot-message AT space INTO TABLE t_dirline.
        DESCRIBE TABLE t_dirline LINES w_nolines.
        READ TABLE t_dirline INDEX w_nolines.
        MOVE t_dirline-data TO t_dirlist-filename.
        APPEND t_dirlist.
      ENDLOOP.
    Here you will get all the files in the directory mentioned in Application server.
    For displaying them as a Search help use the FM '/BMC/ZPOPUP_GET_VALUE'
    Pass the Internal table to this FM.
    Regards,
    Paul.

  • How to know the complete root of my application

    Hi all i want if someone could help me how to know the root where my application is installed or is running, for example if i have two computers with two partitions each, and in one computer i put my application in the root c:\App1 and in the other computer i put the same application i the d:\AppEx\App1 i want to know the complete root because depending on it i will copy a file which is essential for my application, i wonder if someone could help me with that thanks a lot

    Hi all i want if someone could help me how to know
    the root where my application is installed or is
    running, for example if i have two computers with two
    partitions each, and in one computer i put my
    application in the root c:\App1 and in the other
    computer i put the same application i the
    d:\AppEx\App1 i want to know the complete root
    because depending on it i will copy a file which is
    essential for my application, i wonder if someone
    could help me with that thanks a lotYou almost certainly do NOT need to know this, if you design your app correctly.

  • How to find the number of files in an oracle directory through a storedproc

    hi
    i have an oracle directory or a directory in an ftp server
    is there any way.......through which..
    i can know the number of files in the directory ...?
    and whats the metadatacolumn that will indicate the name of the file?
    and is it possible to loop through each of the entries within oracle
    regards
    raj

    ops$tkyte@8i> GRANT JAVAUSERPRIV to ops$tkyte
      2  /
    Grant succeeded.
    That grant must be given to the owner of the procedure..  Allows them to read
    directories.
    ops$tkyte@8i> create global temporary table DIR_LIST
      2  ( filename varchar2(255) )
      3  on commit delete rows
      4  /
    Table created.
    ops$tkyte@8i> create or replace
      2     and compile java source named "DirList"
      3  as
      4  import java.io.*;
      5  import java.sql.*;
      6 
      7  public class DirList
      8  {
      9  public static void getList(String directory)
    10                     throws SQLException
    11  {
    12      File path = new File( directory );
    13      String[] list = path.list();
    14      String element;
    15 
    16      for(int i = 0; i < list.length; i++)
    17      {
    18          element = list;
    19 #sql { INSERT INTO DIR_LIST (FILENAME)
    20 VALUES (:element) };
    21 }
    22 }
    23
    24 }
    25 /
    Java created.
    ops$tkyte@8i>
    ops$tkyte@8i> create or replace
    2 procedure get_dir_list( p_directory in varchar2 )
    3 as language java
    4 name 'DirList.getList( java.lang.String )';
    5 /
    Procedure created.
    ops$tkyte@8i>
    ops$tkyte@8i> exec get_dir_list( '/tmp' );
    PL/SQL procedure successfully completed.
    ops$tkyte@8i> select * from dir_list where rownum < 5;
    FILENAME
    data.dat
    .rpc_door
    .pcmcia
    ps_data
    http://asktom.oracle.com/pls/asktom/f?p=100:11:4403621974400865::::P11_QUESTION_ID:439619916584
    Edited by: Salim Chelabi on 2009-04-21 10:37

  • How to deploy the project into my weblogic Application Server?

    How do I deploy the project into my weblogic Application Server? Should it be fine if I copy the project folder to the AS root?
    Also, How should i invoke the Context sensitive help from Javascript assuming project  deployed to Weblogic AS.
    I am using Robohelp 10.
    Thanks in advance.

    Hi,
    You generate the help and then you copy the generated output to the server.
    For context sensitivity, which output are you using? Try the following
    pages for more info:
    http://www.grainge.org/pages/authoring/calling_webhelp/calling_webhelp.htm
    http://www.wvanweelden.eu/article-category/context-sensitivity
    Greet,
    Willam

  • How to know the path of file.

    i am facing a problem,i have prepared a jar file of an application, which should have a path-file in it & that path-file contains loaction from where applicatioin starts, and creates some file there. but i dont know loaction when i prepared the jar file.how to solve this problem.

    but it is not in my hand, My jar file will be used by a vendor to code a Servlet which will access the classes in the jar file. it cannot be solved by My jar file.
    My Question was
    I have to deliver a jar file which contains my classes. This jar file will be used by a vendor to code a Servlet which will access the classes in the jar file.
    One of the classes in this jar file is required to simulate a file-system (we call it "Repository"). Essentially, it creates a certain directory and reads-writes files into it.
    My problem is how to specify the path (i.e. directory location) of the "Repository". Following are the possibilities I could see :
    1. Hardcode the path in the java code - This is not desirable since we do not know it while I am preparing my jar-file.
    2. Create a properties file, put Repository.path=... as an entry and package it with the jar-file - The problem is that sine this properties file is packaged in the jar, it is read-only. Hence, it cannot be changed at runtime.
    I want to know what are the general approaches to this?

  • How to know the last reboot date of a server B-series ?

    Hi,
    The question is in the title !
    So, is it possible to know the last reload/reset date or the update time of a server blade B-series ?
    I could not find this piece of information in the GUI (or via a show command)
    Many thanks
    Nicolas.          

    There are also some events in the SEL log that are generated when the operating system loads that you could pull from the CLI:
    scope server 1/1
    show sel | grep "OEM System Boot Event" | last lines 1
    Other things to grep for would be:
    Entity presence MAIN_POWER_PRS #0x5a | Device Present | Asserted
    Entity presence BIOS_POST_CMPLT #0x5d | Device Present | Asserted

  • How System Command can replace a file in Application Server

    Hi Guys,
                  A new system Command is created. When that system command is executed, the client wants to take a file from one directory in application server and put that file into another directory on the application server itself. How this can be achieved?
                 What I know is we can create a function module and place that function module in the system command. But in that function module, I have to change the fielname and put that into another directory. I don't know how to do it.
    Note: I shouldn't read the data from the file using Open Dataset statements..
    Please let me the solution if any one has encountered such a scenario.
    Regards.
    Hari.

    I think you are mixing up things here.
    The program "sapiconv" is for converting files into different codepages, it´s not for copying/moving files to other directories.
    If you want to use the ZSAPICONV to you need to modify it, take out the "sapiconv" and put in the "mv" (move) command to move the file to the other directory.
    I suggest though creating a NEW command. e.g ZMV and give the appropriate parameters.
    Markus

  • How to get correct format in file at Application server

    Hi,
    I am retrieving data MATNR,MAKTX,VENDOR,VENDOR NAME,PRODUCT HIERARCHY,QUANTITY(LABST),BUDAT.
    I am downloading the data into .xls file in both presentation and application server.
    In presentation I am getting correct format.
    Where as in application server I am not getting proper format.
    Quantity(MARD-LABST) is not coming proprely.(###6## instead of 36)
    How to get it in correct forma?I

    symbol means  Space
    Before transfer the data to File..
    condense MARD-LABST and then transfer it.
    I guess you are using charcter field LABST while transferring the data to file.
    Do not use quantity field directly,please move it to charcter field then condense it.
    Thanks
    Seshu

  • Problem with the # in upload file of application server.

    Hi All,
    I have a to upload a unix file which have # after every field.
    i tried  " OPEN DATASET x_file FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS."
    but its  not working
    .would appreciate if you can  reply to this  on immediate basis.
    Thanks in advance

    Chiru,
    You should be ok with somethign like this as long as the # is a true delimiter and not part of the data.
    FORM retrieve_file.
      data: wk_rec(30000)     TYPE c.
      CLEAR t_error.
      OPEN DATASET zfile IN TEXT MODE MESSAGE t_mesg.
      IF sy-subrc NE 0.
        MOVE 'X' TO t_error.
        MESSAGE e100(z0) WITH 'Error opening file:' t_mesg.
        EXIT.
      ENDIF.
      DO.
        READ DATASET zfile INTO wk_rec.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
        SPLIT wk_rec AT '#'      " <== your delimter
          INTO  in_rec-field1
                in_rec-field2
                in_rec-field3
                in_rec-field4
                in_rec-field5.
        APPEND in_rec TO it_input.
      ENDDO.
      CLOSE DATASET zfile.
    Edited by: Paul Chapman on Apr 14, 2008 3:27 PM

  • How to deploy the forms 10g (resides in application server) to internet/web

    Please help.
    i want to deploy my forms (develop by forms10g) to web.
    thank you in advance.

    i already have a webserver running IIS on different server. my problem is that, when i call the link of the forms "http:://servername:7778/forms/frmservlet?config=members" on my .html, when i try to click the link on the web, theres is no display, it wont recognize the link (because the link is for local purposes only). what are the settings to make the link public or deploy to web?
    Thanks

  • FM to get the file from application server to presenatation server automati

    Hi!
    In my upload program I am egtting the error log file onmy application server directly. Is there a function module or a way that in my abap code I can mention to bring the file or transfer the file to the presentation server . As my program is been run in the back ground so I cannot directly get the file on the presenattion server, so I need to bring it back on teh presentation server back to see teh eror log.
    I would like my program to do the transfer in background itself so that I can see the error log on a daily basis from my local file .
    Thanks
    when 'X'.                      "X is application server
    *         TRANSLATE p_err USING '\/'." correct slash for unix
          open dataset p_err2 for output in text mode encoding default.
          if sy-subrc = 0.
            loop at t_err into s_nts.
              transfer s_nts to p_err2.
              if sy-subrc ne 0.
                message i010(ad) with p_err2 'Download Failed'.
              endif.
            endloop.
            close dataset p_err2.
          else.
                message i010(ad) with p_err 'dataset could not be found'.
            sy-subrc = -1.             "Maintain error condition
          endif.
    *        endif.
          when ' '.                      "Blank is presenation server
            translate p_err using '/\'."correct slash Dos file
            call function 'DOWNLOAD'
              EXPORTING
                filename = p_err
                filetype = 'ASC'   "FTYPE set to DAT in DATA seg
              TABLES
                data_tab = t_err.
            if sy-subrc ne 0.
              message i010(ad) with 'File ' p_err 'cannot be located.'.
              sy-subrc = -1.             "Maintain error condition
              exit.
            endif.
        endcase.
      ENDIF.
    Thanks

    SO , after reading all , I assume that there is no way in which when I run the background job and get a errro file on application server can be retrievd on my presenattion serevr during the background job run. I was thinking that theer might be a functionn module which will convert the application server file into presenttion server file during the program run in background and store it in the location provided.
    I was trying to use FM  CALL FUNCTION 'C13Z_APPL_TO_FRONT_END' and  CALL FUNCTION 'ARCHIVFILE_SERVER_TO_SERVER' but using teh first one asks for source file and destination file name during teh program run and as it runs in background it cannot be provided again and again and teh second one dosent seem to work.
    Thanks

  • I want to put header while stroing file in application server

    Hi Guru,
       Can anybody tell how to put header while stroing file in application server.
    in the below pgm data is coming i want to put heading .if we see in al11 transaction the header should come .plese give on eg in the code itself.its urgent
    eg:
    material number
    100
    200
    declarations...................................................
    tables: bkpf.                          " Accounting Document Header
    *"Selection screen elements............................................
    parameters:
      p_burks like bkpf-bukrs.             " Company Code
    select-options:
      s_gjahr for bkpf-gjahr.              " Fiscal year
    Type declaration of the structure to hold Accounting Document Header*
    data:
      begin of fs_bkpf,
        bukrs type bkpf-bukrs,             " Company Code
        belnr type bkpf-belnr,             " Accounting Document Number
        gjahr type bkpf-gjahr,             " Fiscal year
        blart type bkpf-blart,             "        Document type
        bldat type bkpf-bldat,             " Document date in document
      end of fs_bkpf.
    Internal table to hold Accounting Document Header                   *
    data:
      t_bkpf like standard table
               of fs_bkpf.
    Type declaration of the structure to hold file data                 *
    data:
      begin of fs_table,
        str type string,
      end of fs_table.
    Internal table to hold file data                                    *
    data:
      t_table like standard table
                of fs_table.
    field-symbols: <fs>.
    *" Data declarations...................................................
    Work variables                                                      *
    data:
      w_char(50)      type c,
      w_file_name(50) type c value 'YH645_050103'.
    select bukrs                           " Company Code
           belnr                           " Accounting Document Number
           gjahr                           " Fiscal year
           blart                           "        Document type
           bldat                           " Document date in document
      from bkpf
      into table t_bkpf
    where bukrs eq p_burks
       and gjahr in s_gjahr.
    if sy-subrc eq 0.
      loop at t_bkpf into fs_bkpf.
        do.
          assign component sy-index of structure fs_bkpf to <fs>.
          if sy-subrc ne 0.
            exit.
          else.
            move <fs> to w_char.
            if sy-index eq 1.
              fs_table-str = <fs>.
            else.
              concatenate fs_table-str ',' w_char into fs_table-str.
            endif.                         " IF SY-INDEX...
          endif.                           " IF SY-SUBRC...
        enddo.                             " DO...
        append fs_table to t_table.
      endloop.                             " LOOP AT T_KNA1...
    endif.                                 " IF SY-SUBRC...
    open dataset w_file_name for output in text mode encoding default.
    loop at t_table into fs_table.
      transfer fs_table-str to w_file_name.
    endloop.                               " LOOP AT T_TABLE...

    Hi,
    may i know what kind of heading you want to display?
    like date, filename, time etc
    then modify the below code:
    *&      Form  send_statistic
         Create the status Report on application Server
       --->  pv_rlines  - Total No of Records in Internal table          *
       --->  pv_slines  - Total No of Successful records                 *
       --->  pv_elines  - Total No of Errornous  records                 *
       --->  pv_path    - File Path  where the file to be created        *
       --->  pv_flag    - Flag to check for A/c group                    *
    FORM sub_send_statistic USING  pv_rlines  TYPE int4
                                   pv_slines  TYPE int4
                                   pv_elines  TYPE int4
                                   pv_path    TYPE salfile-longname
                                   pv_name    TYPE rlgrap-filename
                                   pv_flag    TYPE char1.
      CLEAR : i_tab,
              wa_tab.
    Convert date to MM/DD/YYYY format
      PERFORM date_convert.
    Convert Time to HH:MM:SS format
      CONCATENATE sy-uzeit+0(2)
                  c_colon
                  sy-uzeit+2(2)
                  c_colon
                  sy-uzeit+4(2)
             INTO v_time1.
    Build the Output File name
      IF   p_sold  = c_x
      AND  pv_flag = c_x.
        CONCATENATE c_objid
                    c_us
                    c_z001
                    c_us
                    sy-datum
                    c_us
                    sy-uzeit
               INTO v_file.
      ENDIF.  " IF   p_sold = c_x
      IF p_cons = c_x.
        CONCATENATE c_objid
                    c_us
                    c_z008
                    c_us
                    sy-datum
                    c_us
                    sy-uzeit
               INTO v_file.
      ELSEIF p_sold = c_x
      AND    pv_flag <> c_x.
        CONCATENATE c_objid
                    c_us
                    sy-datum
                    c_us
                    sy-uzeit
               INTO v_file.
      ENDIF.  " IF p_cons = c_x
    Build the Complete Output File Path
      CONCATENATE pv_path
                  c_slash
                  v_file
             INTO v_outfile.
    Populate the data required for output into an internal table and
    then transfer the table contents to file on application server
    DATA UPLOAD STATISTICS
      wa_tab-rec = text-001.
      APPEND wa_tab TO i_tab.
      CLEAR wa_tab.
    TITLE
      IF   p_sold  = c_x
      AND  pv_flag <> c_x.
        sy-title = text-t17.
      ENDIF.  " IF   p_sold = c_x
      IF  p_sold  = c_x
      AND pv_flag = c_x.
        sy-title  = text-t16.
      ENDIF.  " IF  p_sold = c_x
      IF  p_cons  = c_x
      AND pv_flag = c_x.
        sy-title  = text-t19.
      ENDIF.  " IF  p_cons = c_x
      wa_tab-rec+0(7)   = text-002.
      wa_tab-rec+7(60)  = sy-title.
      APPEND wa_tab TO i_tab.
      CLEAR wa_tab.
    Date & Time
      wa_tab-rec+0(5)   = text-012.
      CONDENSE v_date NO-GAPS.
      wa_tab-rec+6(10)  = v_date.
      wa_tab-rec+60(10) = text-003.
      wa_tab-rec+70(15) = v_time1.
      APPEND wa_tab TO i_tab.
      CLEAR wa_tab.
    Folder Name
      wa_tab-rec+0(18)  = text-005.
      wa_tab-rec+19(72) = pv_path.
      APPEND wa_tab TO i_tab.
      CLEAR wa_tab.
    File Name
      wa_tab-rec+0(18)  = text-006.
    ---Begin of addition -Shivakumar - 09-05-2007--
      wa_tab-rec+19(72) = pv_name.
    ---Begin of addition -Shivakumar - 09-05-2007--
      APPEND wa_tab TO i_tab.
      CLEAR wa_tab.
    Records Read
      CLEAR v_count.
      v_data   = pv_rlines.
      v_count  = STRLEN( v_data ).
      CONDENSE v_data NO-GAPS.
      wa_tab-rec+0(46)  = text-007.
      wa_tab-rec+47(4)  = v_data.
      APPEND wa_tab TO i_tab.
      CLEAR : wa_tab,
              v_data.
    Successfull Records
      CLEAR v_count.
      v_data   = pv_slines.
      v_count  = STRLEN( v_data ).
      CONDENSE v_data NO-GAPS.
      wa_tab-rec+0(46)  = text-008.
      wa_tab-rec+47(4)  = v_data.
      APPEND wa_tab TO i_tab.
      CLEAR : wa_tab,
            v_data.
    Error Records
      CLEAR v_count.
      v_data   = pv_elines.
      v_count  = STRLEN( v_data ).
      CONDENSE v_data NO-GAPS.
      wa_tab-rec+0(46)  = text-009.
      wa_tab-rec+47(4)  = v_data.
      APPEND wa_tab TO i_tab.
      CLEAR : wa_tab,
              v_data.
      v_mesg = text-t04.
      IF   p_sold  = c_x
      AND  pv_flag <> c_x.
        MOVE i_tab  TO i_file.
      ENDIF.  " IF   p_sold = c_x
      IF  p_sold  = c_x
      AND pv_flag = c_x.
        MOVE i_tab  TO i_file1.
      ENDIF.  " IF  p_sold = c_x
      IF NOT i_tab IS INITIAL.
    Open the file on Application server to write the report
        OPEN DATASET v_outfile
                 FOR OUTPUT IN TEXT MODE
            ENCODING DEFAULT MESSAGE v_mesg.
        IF sy-subrc <> 0.
          MESSAGE e000(zconversions) WITH v_mesg.
        ELSE.  " IF sy-subrc <> 0
    Transfer details to the file on application server
          CLEAR wa_tab.
          LOOP AT  i_tab INTO wa_tab.
            TRANSFER wa_tab-rec TO v_outfile.
            CLEAR wa_tab.
          ENDLOOP.  " LOOP AT  i_tab INTO wa_tab
    Close the file
          CLOSE DATASET v_outfile.
        ENDIF.  " IF sy-subrc <> 0
      ENDIF.  " IF NOT i_tab IS INITIAL
    ENDFORM.                    " Create_Report

  • Sending EMail "Text-File" from Application Server!

    Hi Experts,
    how can I sending a Text-File from Application Server via Email?
    Is there existing a Function Modul?
    With Kind regards
    Ersin
    Moderator message: sending emails = FAQ, please search before posting.
    Edited by: Thomas Zloch on Nov 25, 2010 4:23 PM

    STF (Search the forum)!  This type of question has been asked...and answered....many times.

Maybe you are looking for

  • How to include a CSS from another project

    Hi all, I'm developing an AbstractPortalComponent which uses some of my own defined stylesheets. I can include the stylesheet defined in my own project by this: com.sapportals.portal.prt.resource.IResource myStyle = request.getResource("css", "css/my

  • 10.5.8 update corrupted the Volume Structure of my MacBook Pro and iMac

    After installing the 10.5.8 update on my Macbook Pro AND my iMac, BOTH computers refuse to boot up. If I boot from a TechTool Deluxe DVD and run the system scan, It fails both the Directory Scan and the Volume Structure test. The only common applicat

  • Error in certified pdf regarding AI file

    I'm outputting a poster on 80 x 100 cm with only 2 ai-files. One of them is a straightforward logo, the other is an illustration using gradients and blurs. The illustration is used on around 326%. With preflight in Enfocus Pitstop I get an error sayi

  • Temp profile login issue

    HI, When Windows Operating System login don't read particular user profile settings and files properly during the booting process, load with temporary new user profile. again reboot the system profile as same. please help me, Regard's Email-PII Redac

  • Inner join in select statement

    hi, i am using select statement like SELECT ekkoebeln ekkobukrs ekkobstyp ekkobsart ekko~ernam            ekkolifnr ekkozterm ekkozbd1t ekkozbd2t ekko~zbd3t            ekkozbd1p ekkozbd2p ekkoekorg ekkoekgrp ekko~waers            ekkowkurs ekkokufix