FM to get file name on app server

Hello experts,
I'm trying to use a FM to get the filename of a file on  the application server. The FM I am using is F4_FILENAME_SERVER, but it doesn't seem to work.
Does anyone have an alternative? Or maybe someone knows common problems with this FM?
Thanks in advance!
Best regards,
Danny

Try the function modules
F4_DXFILENAME
F4_DXFILENAME_4_DYNP      
F4_DXFILENAME_TOPRECURSION
F4_FILENAME        
F4_FILENAME_SERVER 
Reward Points if useful.

Similar Messages

  • How to check file name in APP server

    Hi,
    Iam writing some files to APP server .Iam unable to check those files by using AL11. How to check those files in APP server?

    Hi,
    You can use this FM EPS_GET_DIRECTORY_LISTING.
    Also please try this FM /SAPDMC/LSM_F4_SERVER_FILE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_apath.
    * Open the Browse Dialog Box on the Application Server
    CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
      IMPORTING
        serverfile = p_apath
      EXCEPTIONS
        canceled_by_user = 1
        OTHERS           = 2.
    IF sy-subrc <> 0.
    * No need to check for sy-subrc
    ENDIF.
    Regards,
    Ferry Lianto

  • CL_GUI_PDFVIEWER and files from the App server

    Hi,
    I would liek to use the class CL_GUI_PDFVIEWER  to read files from the app server (transaction AL11) and then to present them.
    it is easy to use the local machine files.
    how can I use the method open_document with a file from there?
    Thanks,
    Itay

    Thanks for the help.
    I tried what you suggested but I get a dump for some reason.
    Can you help?
    This is the dump:
    Exception condition "SYSTEM_FAILURE" raised.
         Program                                      SAPLOLEA                    
         Include                                      LOLEAU10                    
         Row                                          358                         
         Module type                                  (FUNCTION)                  
         Module Name                                  AC_FLUSH_CALL_INTERNAL      
    This is the program:
    REPORT zpdftest .
    DATA: g_html_viewer     TYPE REF TO cl_gui_html_viewer,
          my_main_container TYPE REF TO cl_gui_custom_container,
          entry1(100) TYPE c,
          entry2(100) TYPE c.
    DATA: okcode TYPE sy-ucomm,
          gt_pdf TYPE STANDARD TABLE OF string,
          wa_pdf TYPE string,
          g_url(2048)  TYPE c
    START-OF-SELECTION.
      SET SCREEN 100.
    *&      Module  pbo_0100  OUTPUT
    MODULE pbo_0100 OUTPUT.
      SET PF-STATUS 'STATUS100'.
      SET TITLEBAR  'TITLE100'.
      IF my_main_container IS INITIAL.
        CREATE OBJECT my_main_container
          EXPORTING
            container_name = 'CUSTOM_CNTL'
          EXCEPTIONS
            cntl_error     = 1
            OTHERS         = 2.
        CHECK sy-subrc IS INITIAL.
        CREATE OBJECT g_html_viewer
          EXPORTING
            parent             = my_main_container
          EXCEPTIONS
            cntl_error         = 1
            cntl_install_error = 2
            dp_install_error   = 3
            dp_error           = 4
            OTHERS             = 5
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        DATA: lv_filename TYPE rlgrap-filename.
        lv_filename = '/PBMGUS/UXA/ABAP/TEST.PDF'.
        OPEN DATASET lv_filename FOR INPUT
                     IN BINARY MODE
        WHILE sy-subrc IS INITIAL.
          READ DATASET  lv_filename  INTO wa_pdf.
          IF NOT sy-subrc IS INITIAL.
            EXIT.
          ENDIF.
          APPEND wa_pdf TO gt_pdf.
        ENDWHILE.
        CLOSE DATASET lv_filename.
        CALL METHOD g_html_viewer->load_data
          EXPORTING
            type                 = 'application'
            subtype              = 'pdf'
          IMPORTING
            assigned_url         = g_url
          CHANGING
            data_table           = gt_pdf
          EXCEPTIONS
            dp_invalid_parameter = 1
            dp_error_general     = 2
            cntl_error           = 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.
        CALL METHOD g_html_viewer->show_url
          EXPORTING
            url                    = g_url
          EXCEPTIONS
            cntl_error             = 1
            cnht_error_not_allowed = 2
            cnht_error_parameter   = 3
            dp_error_general       = 4
            OTHERS                 = 5
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " pbo_0100  OUTPUT
    *&      Module  pai_0100  INPUT
    MODULE pai_0100 INPUT.
      CASE okcode.
        WHEN 'BACK'.
          LEAVE to screen 0.
        WHEN OTHERS.
          CALL METHOD cl_gui_cfw=>dispatch.
      ENDCASE.
      CLEAR okcode.
    ENDMODULE.                 " pai_0100  INPUT

  • GET FILE NAME C:\temp\ADIBO.txt

    Hi,
    How to get file name?
    I used Get_File_NAME, but I'am getting an error.
    lv_lfilename is not the type LOGICAL_FILENAME
    C:\temp\ADIBO.txt
    I need to get  ADIBO ??
    tnh, Adibo..:)
    I am using this code to download file and after that I need to get FILE_NAME:
    DATA:  lv_lfilename TYPE string.
    PARAMETERS:
      pa_lfile TYPE zlocalfile
               DEFAULT 'C:temp'.
        CONCATENATE pa_lfile ''INTO lv_lfilename.
        CALL FUNCTION 'GUI_DOWNLOAD'
             EXPORTING
                  filename = lv_lfilename
                  filetype = 'ASC'
             TABLES
                  data_tab = it_billit_down.
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.

    Hii..
    You have to Maintain the Logical filenames and their Physical Paths in Tcode FILE.
    Then create a program like this..
    REPORT  ZSEL_FILES1.
    DATA : V_LOGFILE TYPE STRING.
    DATA :V_PHYFILE TYPE STRING.
    DATA : ITAB TYPE TABLE OF SCARR.
    START-OF-SELECTION.
    SELECT * FROM SCARR INTO TABLE ITAB.
    **To get the Physical file based on the Logical file names - Maintained in Tcode FILE
    CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
       CLIENT                        = SY-MANDT
        LOGICAL_FILENAME              = VlOGFILE
      OPERATING_SYSTEM              = SY-OPSYS
      PARAMETER_1                   = ' '
      PARAMETER_2                   = ' '
      PARAMETER_3                   = ' '
      USE_PRESENTATION_SERVER       = ' '
      WITH_FILE_EXTENSION           = ' '
      USE_BUFFER                    = ' '
      ELEMINATE_BLANKS              = 'X'
    IMPORTING
      EMERGENCY_FLAG                =
      FILE_FORMAT                   =
       FILE_NAME                     = V_PHYFILE
    EXCEPTIONS
      FILE_NOT_FOUND                = 1
      OTHERS                        = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    **To download the file to PC.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = V_PHYFILE
       FILETYPE                        = 'ASC'
      APPEND                          = ' '
       WRITE_FIELD_SEPARATOR           = 'X'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = ITAB
      FIELDNAMES                      =
    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.
    ENDIF.
    <b>reward if helpful</b>

  • Error in reciever file adapter , where i am getting file name dynamically

    hi all,
    error in reciever file adapter , where i am getting file name dynamically, please help me in this isssue , i am trying for a long time
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:MT_eINVOICE_RECV' found in document', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:MT_eINVOICE_RECV' found in document', probably configuration error in file adapter (XML parser error)'

    i am getting new error
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
    this is my strcuture
    and i have changed my structure
    <HEADER>
    <ADDRESS1/>
    <ADDRESS2/>
    <ADDRESS3/>
    <ADDRESS4/>
    </HEADER>
    <HEADER_GST>
    <TAX1/>
    <TAX2/>
    <TAX3/>
    </HEADER_GST>
    <LINE>
    <QTY/>
    <UOM/>
    <UNIT_AMT/>
    <CHARGE_TO_DT/>
    </LINE>
    <FILENAME>
         <FILENAME/>
    </FILENAME>
    i have given the recordset structure as
    HEADER,HEADER_GST,LINE,FILE

  • How to get file name of the form attachment?

    Hi,
    is there anybody who is able to help me with the following problem???
    I started my process from Workspace ES and as a first step I attached one locale file (IMG.JPG or IMG.TIF e.g.) as a form attachment. I used "Attachments" bookmark in the Workspace ES.
    I need to get file name of attached file in the process!!!
    I tried to use "getTaskAttachments" component to get file name of form attachment but without success. This component successfully obtained attached file an stored it in the variable (type list, subtype document) but didn't produce all file attribute informations such as basename or Content Type:
    Is there some possibility to obtain file name (including file extension) by using "standard" tools and components of ALC?
    Thanks for your suggestions.

    Hi LekomDev,
    I faced the same situation some time back and this is what I know.
    Based on the file type few of the attributes will or will not be populated. (This is what the official documentation says about Document attributes)
    The file name that you are looking for would mostly be in 'name' attribute of Document object. The 'wsfilename' attribute is the atrribute which gets used to show the file name into Attachments tab of the workspace.
    So, if you are just interested in knowing the filenames then 'name' attribute is the place that you are looking for.
    But if you are trying to solve an issue in which Attachments against a Task isn't showing the filenames properly then you would need to copy the 'name' attribute value into 'wsfilename' attribute and then the Attachmetns against a Task would have the correct names.
    Tip: Use the Record and Playback option of the workbench to inspect the Document variable and you would see all of the values for a Document variable at desired step in your orchestration.
    hope this helps,
    cheers,
    Parth Pandya
    Blog: http://livecyclekarma.wordpress.com

  • Emdedding a pdf file generated on app server in a peoplesoft page

    All,
    I have a requirement to embed a pdf file on the app server in a peoplesoft page.
    I am planning to do a push the file to the webserver using put attachment and then add a reference to the image in an html area on the page.
    However, I need to position the pdf document when the page is displayed as the html area is smaller than the pdf document such that the middle part of the document is shown to the user. This is required so that the user does not have to sroll to that position.
    Is there a way to do this ?

    What is the PeopleTools version and application version you are using.
    Jayaprakash Tedla

  • Need to get file name and directory back from file adapter - WRITE

    I am using the file adapter to write a file. I want to log the file name of the file we just created. Since we use a precise timestamp in the file name, I can't accurately guess.
    I have an invoke in my BPEL process to the file adapter. My first try was to assign the jca.file.FileName property to a variable, but it never comes back. I looked around and saw plenty of ways to SET the file name for a write and GET the file name for a read, but no GET file name for WRITE.
    Anyone have a solution?
    Thanks in advance!

    I think I got your point... You can tell FileAdapter the filename to write, but if you don't then FileAdapter can not tell you the filename that it wrote... I think it is pretty possible Oracle didn't implement the latter, as the write operation is probably asynchronous and the filename is calculated later on...
    If what you want is just log, you may achieve your requirement by increasing verbosity on Adapter logs... Have a look at the link bellow...
    http://docs.oracle.com/cd/E15586_01/integration.1111/e10226/ad_mon.htm#CJHHBBID
    Otherwise, the solution for you will be to calculate filename yourself, and that will be a little bit of reinventing the wheel... But at least you will know the filename...
    Cheers,
    Vlad

  • PLSQL sample for searching a file name in the server

    Hello All,
    what plsql package i need to use or any plsql sample code available for searching a file name in the server.
    For example If I provide any text "XX%", the plsql code should provide me the list of file names in a specific folder in server.
    If any one worked on this kind of requirement, please provide me the sample code.
    Thanks & Regards
    Aboothahir

    Hello,
    https://sourceforge.net/projects/oracle-jutils/
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584#1565062600346635117
    {message:id=4070746}
    Regards
    Marcus

  • Get File Names & Creation Time of the files of a directory in App. Server

    Dear all,
                  My requirement is to fetch all the file names of a paritucular direcory in the application server. After going through SDN i got some FM's like
        1. EPS_GET_DIRECTORY_LISTING
        2. EPS_GET_FILE_ATTRIBUTES
        3. SUBST_GET_FILE_LIST
        Here EPS_GET_DIRECTORY_LISTING looks perfect for my requirement. But while I tried to test the FM from SE37 its giving exception READ_DIRECTORY_FAILED for the required Directory. But the same FM is returning file names for the root directory.
    Please look a above 2 scenario...
    ie. if I give Export parameter as
         DIR_NAME                         = '/'
         FILE_MASK                       = '*'
         The FM works fine.
    But . if I give Export parameter as
         DIR_NAME                         = '/XYZ'                      
         FILE_MASK                       = '*'
        The FM returns exception READ_DIRECTORY_FAILED .
    But the directory  /XYZ exists and there are files in it..Am I missing something with respect to the path am specifying.
    Regards,
    Antony

    Hi, see if this peace of code helps you.
    CONSTANTS DAYS1980 TYPE I VALUE 3652.
    DATA: DLIST LIKE EPSFILI OCCURS 0 WITH HEADER LINE, DPATH LIKE EPSF-EPSDIRNAM, MDATE LIKE SY-DATUM, MTIME LIKE SY-UZEIT, POINT_IN_TIME TYPE I.
    DATA: BEGIN OF FATTR OCCURS 0, FILE_NAME LIKE EPSF-EPSFILNAM, FILE_SIZE LIKE EPSF-EPSFILSIZ, FILE_OWNER LIKE EPSF-EPSFILOWN, FILE_MODE LIKE EPSF-EPSFILMOD, FILE_TYPE LIKE EPSF-EPSFILTYP, FILE_MTIME(12), END OF FATTR.
    PARAMETER P_PATH(50) TYPE C DEFAULT '/TMP' LOWER CASE.
    DPATH = P_PATH.
    CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
    EXPORTING
      DIR_NAME = DPATH
    TABLES
      DIR_LIST = DLIST
    EXCEPTIONS
      INVALID_EPS_SUBDIR = 1
      SAPGPARAM_FAILED = 2
      BUILD_DIRECTORY_FAILED = 3
      NO_AUTHORIZATION = 4
      READ_DIRECTORY_FAILED = 5
      TOO_MANY_READ_ERRORS = 6
      EMPTY_DIRECTORY_LIST = 7
      OTHERS = 8.
      IF SY-SUBRC EQ 0.
      LOOP AT DLIST.
    CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'
    EXPORTING
      FILE_NAME = DLIST-NAME
      DIR_NAME = DPATH IMPORTING
      FILE_SIZE = FATTR-FILE_SIZE
      FILE_OWNER = FATTR-FILE_OWNER
      FILE_MODE = FATTR-FILE_MODE
      FILE_TYPE = FATTR-FILE_TYPE
      FILE_MTIME = FATTR-FILE_MTIME.
      FATTR-FILE_NAME = DLIST-NAME.
      APPEND FATTR.
        ENDLOOP.
      ENDIF.
      SORT FATTR BY FILE_NAME.
      LOOP AT FATTR.
      POINT_IN_TIME = FATTR-FILE_MTIME.
      CALL FUNCTION 'POINT_IN_TIME_CONVERT'
      EXPORTING
      POINT_IN_TIME = POINT_IN_TIME
      IMPORTING
      DATE = MDATE
      TIME = MTIME
      EXCEPTIONS OTHERS = 1.
      SUBTRACT DAYS1980 FROM MDATE.
      WRITE: / FATTR-FILE_NAME, FATTR-FILE_SIZE, MDATE, MTIME.
      ENDLOOP.

  • Deploying a WAR file to Sun App Server 8.1 PE

    So I thought that if I downloaded Sun App Server PE 8.1 and put it on my soon-to-be production machine, it should be pretty easy right?
    Nope. So I have JSC update 6 (which includes Sun Application Server 8.0) (God how I wish there was a catchy name like Tomcat or something)
    And I have a machine running a good copy, installed and everything, of Sun Application Server 8.1 Platform Edition (another catchy name) up on the production target.
    I create a WAR file in JSC, scp it up.
    Then try to deploy it - so I get bit by the no DB connection thing.
    Ok, but when I copy each of my connection's attributes (the driver (which I did copy up to the lib directory) is MySQL's Connector/J)
    I copy the username, password, URL and DriverClass attributes to the connection pool.
    I still get a
    "Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Class name is wrong or classpath is not set for : com.sun.sql.datasource.DriverAdapter"
    when I try to Ping the ConnectionPool
    I have javax.sql.DataSource as the resource type... (same as 8.0 uses)
    what JAR file is DriverAdapter in? anyone know?
    cheers,
    Kris

    Okay. mysql folks - this works......
    here's what happened, on the production server, different from the dev machine....
    mysql 4.1.9
    sun application server platform edition PE 8.1
    connector/j - latest
    and on the dev machine: JSC Update 6 and the app works fine on the dev machine.
    first, there is a JAR file in ~whatever/Create/SunAppServer/lib/ named
    driveradaptor.jar
    and it it comtains
    com.sun.sql.datasource.DriverAdapter
    which 8.1 ain't got
    and should be copied up to
    /installdir/SunAppServer/domains/domain1/lib/ext/driveradapter.jar
    (domain1 is your app svr domain that runs your app.)
    your Connector/J JAR needs to go here too. I used:
    mysql-connector-java-3.2.0-alpha-bin.jar
    downloaded from mysql.com.
    and then there is the whole thing about Added Properties in the Connection Pool page inside the 8.1 Admin Console (which is nice work guys). Gawd, I added a bunch of properties and am, frankly, not sure which ones actually work (for the Ping, for the initial connection creation and the eventual successful connection all seem to use different combinations...)
    and I found this in the domain's domain.xml once all the admin console page filling was done - but you'll need to add each one as a Property in the connection pool:
    <jdbc-connection-pool connection-validation-method="auto-commit" datasource-classname="com.sun.sql.datasource.DriverAdapter" fail-all-connections="false" [blah...]
    <property name="Username" value="root"/>
    <property name="Password" value="secret"/>
    <property name="ValidationQuery" value="SELECT 1"/>
    <property name="DriverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="LoginTimeout" value="0"/>
    <property name="Url" value="jdbc:mysql://localhost/databasename?autoReconnect=true"/>
    <property name="User" value="root"/>
    <property name="password" value="secret"/>
    <property name="PasswordCredential" value="secret"/>
    </jdbc-connection-pool>
    (and you see how User and Username and username are all the same thing? well, different parts of 8.1 seem to use different attributes...)
    Just keep Adding Properties in the connection pool until you get them all....
    Oh and, the two key class references for the pool are:
    datasource class: com.sun.sql.datasource.DriverAdapter
    resource type: javax.sql.ConnectionPoolDataSource
    Finally: in the /installdir/SunAppServer/domains/domain1/applications/j2ee-modules/YourAppName/WEB-INF/
    your 'sun-web.xml' (don't delete it, like some have advocated, I think that wrong) needs to look like:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd">
    <sun-web-app xmlns="http://java.sun.com/xml/ns/j2ee">
    <context-root>/yourcontext</context-root>
    <resource-ref>
    <res-ref-name>jdbc/Yourname</res-ref-name>
    <jndi-name>jdbc/Yourname</jndi-name>
    <default-resource-principal>
    <name>root</name>
    <password>secret</password>
    </default-resource-principal>
    </resource-ref>
    </sun-web-app>
    and I think that's all of it. the only Bug I would I would say is that the sun-web.xml should have the right res-ref-name, but then I think the Creator Team knows this and will fix it sometime soon.
    cheers,
    and Roger Federer lost in the Aussie Open. (I think he lost tomorrow too, that whole time zone thing being so damn Einsteinian...)
    -Kristofer

  • Background Job spool / output file in different app server

    We are working with 2 ECC app servers, A and B.
    I've defined in app server A a background job to run an abap report and this report creates and submit 4 other background jobs.
    Each of these 4 jobs is regarding an abap report which outputs a text file in the server.
    The question is, why are the jobs generating the files in different app servers randomically?
    The same file, in the 1st execution was generated in app server A, and without any change was generated in app server B, in the job 2nd execution?
    Thank you!

    Hi,
    You can specify server name whille creating a batch job , so that it gets executed to that server only.
    there is one field (in SM36 during creation or SM37 while modifying batch job) called "Exec Target " , where you can specify server name.
    Hence you can plan to run your some batch jobs on server A or B.
    Regards,
    Rupali

  • Get file name

    Hello world,
    Am writing a small server application that can accept files and save them locally. Now, the server is working, but am finding it very hard to get the name of the file that's been sent so that I can save the file with that name and its extension.
    e.g. I want if I sent a hello.java file, then, the server will save it as hello.java. But at the moment, its not saving it like that because there is no way can get the name of the file from the client.
    Here is my code:
    import java.io.*;
    import java.net.*;
    class Server {
        static final String ToSave = "C:\\";
        static final int PORT               = 2391;
        public static void main(String args[]) {
            while ( true ) {
                try {
                    ServerSocket socketServer = new ServerSocket(PORT);
                    Socket socket = socketServer.accept();
                    //Assuming we have a file name (FILENAME)from client
                    FileOutputStream fos = new FileOutputStream(ToSave + FILENAME);//<--HERE IS WERE i WANT THE FILENAME
                    BufferedOutputStream out = new BufferedOutputStream(fos);
                    BufferedInputStream in = new BufferedInputStream( socket.getInputStream() );
                    int i;
                    while ((i = in.read()) != -1) {
                        out.write(i);  
                    out.flush();
                    in.close();
                    out.close();
                    socket.close();
                    socketServer.close();
                    System.out.println("Transfer complete.");
                catch(Exception e) {
                    System.out.print(  e  );
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException ie) {
                    System.err.println("Interrupted");
    }

    You have to define a protocol which enables the
    client to tell the server the file name.
    BTW creating server sockets inside a loop is not a
    good idea.
    Thank you very much :)
    I've got the idea on how to implement it now. All I have to do is:
    first connect to the server and send a message containing the name of the file and then, at the server end, I will receive the name and use it to save to incoming file.
    Thanks again.

  • How can I get file name using JSTL ?

    Hi,
    I'm now using <c:out value="${pageContext.request.requestURI}"/>
    this return servlet path
    How can I get just file name
    or user path (in location bar) ?
    thanks in advance

    The original uri (before forwarding) is available in a request scoped attribute.
    These attributes are given the values obtained by calling the related method on the original request received by the container.
    javax.servlet.forward.request_uri
    javax.servlet.forward.context_path
    javax.servlet.forward.servlet_path
    javax.servlet.forward.path_info
    javax.servlet.forward.query_stringSo if those two above don't work for you these might.
    <c:out value="${requestScope['javax.servlet.forward.request_uri']}"/>
    <c:out value="${requestScope['javax.servlet.forward.servlet_path']}"/>If these values are null, then the value in the request object is the correct one.
    You mentioned the value in the address bar being a .html file. Do you perchance use framesets? If so the value in the address bar is always the url used to load the frameset, and doesn't change no matter where you travel within those frames. That won't be available to the server, because it has nothing to do with the current request.
    Cheers,
    evnafets

  • Getting File Name (Sender File Adapter )

    Hi EveryBody,
    I need to capture only the the FileName in to the outbound xml that is present in the filepath of XI server.
    I checked:
    Adapter Specific Message Attributes:
    Checked box on --> 1)Set Adapter Specific Message Attributes
                                 2) File Name
    And my dt IS OF TYPE :
    <?xml version="1.0" encoding="UTF-8"?>
    <MT_DMS_FINAL>
       <Header>
          <FileName/>
       </Header>
    </MT_DMS_FINAL>
    Now i put the File into the path , i donot need any content of file in XML , only needed the file name.
    i tried above config and it says mapping error, but i test it"s running good with the test tab.
    i guess file picked up by Sender file Adapter is not matching witj the outbound interface ?? is it so ?
    advice. i see in the sxmb_moni that only the content not in xml structure is displayed.
    srini

    Refer to the blog that i asked you to go thru. It has no input fields. It accesses the file name through the Dynamic Configuration. Provides the same as output. Its just a java function without any input parameter. Create an UDF and deleted all the arguments(even "a").
    Code:-
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Oops sorry, i guess i forgot to provide the blog link. Anyway its here:
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Regadrs,
    Sanjeev.
    Edited by: Sanjeev Shekhar Singh on May 30, 2008 2:12 PM

Maybe you are looking for

  • Can't remove system immutable files from external hard drive

    Hi, I have encountered the Error code -36 when trying to empty my trash. I went around the web to look for solutions, and went through the third party software and unix command line process outlines at OSXFAQ. Alas, the problem is a bit particular: I

  • After using the right mouseclick safari doesn't respond to any mouseclick

    Hi since updating to safari 5.1.1 after using the right mouse click safari doesn't respond to any mouseclick anymore. I can use the keyboard and select menus but that is it. Reinstalled Safari, resetted safari and removed all preferences, caches and

  • Speed of file sharing (firewire) to copy music files?

    Hi All! Just got a new MacBook and am attempting to copy an extensive iTunes library from an old iBook to the new MacBook. Thanks to these boards, I've successfully managed to enable fire sharing and can access the old computer as a separate server f

  • Using ATMI and tuxedo to institue distributed transactions across multiple DBs

    I am creating the framework for a given application that needs to ensure that data integrity is maintained spanning multiple databases not necessarily within an instance of weblogic. In other words, I need to basically have 2 phase commit "internet t

  • Output Determination in Delivery and billing

    Hi Gurus, Can anybody tell me how to maintain output determination for delivery. i have maintained Condition record for LDOO but when in delivery i goto Extras-output-header it taked me back to the same setting of LDOO. How do i see the output for de