How to get the trace file name for current running application?

Hi, I want to know if it is possible to get the file name directly for current running application instance which is launched by javaws.
There is a property "deployment.user.logdir" tells the log directory, it would be great if a file name property
is available. something like "instance.trace.file".
Our application wants it because we would like our client send use the application log by clicking a "send error"
button, the codes finds the trace file and compress it and send it by using a smtp server.
In 1.5, we can do it by using a shell program.

I found other asked it before, but I tried to set both properties, but neither works. my sun JRE version :java version "1.6.0_04"
<property
name="deployment.javaws.traceFileName"
value="abcfefsfdsf"/>
<property
name="deployment.javapi.trace.filename"
value="235235235"/>
But it always write to one trace file with name lik javaws63645.trace

Similar Messages

  • How to set the default file name for upload

    Hi All,
    I have the following BSP app for a file upload of a csv file. I want the page when displayed show the default file name to be loaded as c:\db1\currentPM.csv
    What changes do I need to make to get the default file name in the BSP app.
    Thanks
    Karen
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content id               = "content"
                   design           = "classicdesign2002design2003"
                   controlRendering = "sap"
                   rtlAutoSwitch    = "true" >
      <htmlb:page title="File Upload " >
        <htmlb:form method       = "post"
                    encodingType = "multipart/form-data">
              <htmlb:textView text   = "File:"
                              design = "STANDARD" />
              <htmlb:fileUpload id          = "uploadID"
                                onUpload    = "UploadFile"
                                upload_text ="Upload"/>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    On Input Processing
    event handler for checking and processing user input and
    for defining navigation
    DATA: EVENT TYPE REF TO IF_HTMLB_DATA,
          DATA TYPE REF TO CL_HTMLB_FILEUPLOAD,
          LV_OUTPUT_LENGTH TYPE I,
          LV_TEXT_BUFFER TYPE STRING,
          FILE_NAME TYPE STRING,
          FILE_PATH TYPE STRING ,
          INTERN TYPE TABLE OF  ZALSMEX_TABLINE.
    DATA: LT_BINARY_TAB TYPE TABLE OF SDOKCNTBIN .
    TYPES: BEGIN OF TY_TAB,
           FIELD1(2) TYPE C,
           FIELD2(2) TYPE C,
           FIELD3(2) TYPE C,
           FIELD4(2) TYPE C,
           FIELD5(2) TYPE C,
           END OF TY_TAB.
    DATA:  WA_TAB TYPE TY_TAB,
           IT_TAB TYPE TABLE OF TY_TAB.
    TYPES: BEGIN OF TY_LINE,
              LINE(255) TYPE C,
           END OF TY_LINE.
    DATA:  WA_LINE TYPE TY_LINE,
           IT_LINE TYPE TABLE OF TY_LINE.
    EVENT = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
    IF EVENT IS NOT INITIAL AND EVENT->EVENT_NAME = HTMLB_EVENTS=>FILEUPLOAD.
      DATA ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = RUNTIME->SERVER->REQUEST NAME = 'fileUpload' ID = 'uploadID' ).
      FILE_NAME = DATA->FILE_NAME.
      FILE_PATH = FILE_NAME.
      IF DATA IS NOT INITIAL.
        CALL FUNCTION'SCMS_XSTRING_TO_BINARY'
         EXPORTING BUFFER = DATA->FILE_CONTENT
         IMPORTING OUTPUT_LENGTH = LV_OUTPUT_LENGTH
         TABLES BINARY_TAB = LT_BINARY_TAB .
        CALL FUNCTION'SCMS_BINARY_TO_STRING'
        EXPORTING INPUT_LENGTH = LV_OUTPUT_LENGTH
         IMPORTING TEXT_BUFFER = LV_TEXT_BUFFER
         TABLES
         BINARY_TAB = LT_BINARY_TAB.
        IF SY-SUBRC = 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        SPLIT LV_TEXT_BUFFER AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO TABLE IT_LINE.
        IF SY-SUBRC = 0.
          LOOP AT IT_LINE INTO WA_LINE.
           SPLIT WA_LINE AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
            split wa_line at ','
            INTO WA_TAB-FIELD1 WA_TAB-FIELD2 WA_TAB-FIELD3 WA_TAB-FIELD4 WA_TAB-FIELD5.
            append wa_tab to it_tab.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDIF.

    Also, I missed another point.
    In the folder c:\dbdata I have a number of CSV files on the user frontend. I would like the BSP application to get the list of files in the folder and process them one after the other. How can I get the list of files on the folder in the user PC and how to process them one after the other.
    I want the form to display only the default folder and once I press on upload it must process all files and display the status of processing on the same page.
    Please kindly share ideas how I can implement this app.
    Thanks
    Karen

  • How to get the SQL file name in SQL*plus

    hi all,
         I have created two sql file at C drive as "c:\Createtable.sql" and "c:\Deletetable.sql"
    afterwards i open
    C:\>sqlplus
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jan 30 11:37:10 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Enter user-name: scott/tiger
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> @C:\Createtable.sql'
    Table created.
    SQL> @'C:\Deletetable.sql'
    Table dropped.
    SQL>My problem is to get the name of the file as "c:\createtable.sql" and "C:\Deletetable.sql" in sql*plus enviornment.
    Thanks & Regards
    Singh

    Dear Damorgan,
         >>your version number to three decimal places
         My Oracle DB Version i have already stated in my previous post is 10.2.0.1.0
    Actually my problem is to get the sql files name we run in sqlplus enviornment with @ symbol. like
    i have created one sql file in c drive as
    "C:\Createtable.sql"
    afterwords i have connected to sqlplus as
    sql> conn scott/tiger
    sql>@c:\createtable.sql
    Now i want some query to get the name of the file which is run.
    In actual my problem is as
    i have suppose 10 or more SQL files in some folder ( sql1.sql, sql2.sql, sql3.sql ....).
    i created one file to call all the 10 sql files (main.sql)
    i have also one track_table which will keep track that which sql file is runned.
    I want some automated script which will insert the record in that track_table....... for that i need the name of sql file which is runned.
    Hope this will help you.
    Thanks & Regards
    Singh

  • How to get the Output File Name as One of the Field Value From Payload

    Hi All,
    I want to get the Output file name as one of the Field value from payload.
    Example:
    Source XML
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_TEST xmlns:ns0="http://sample.com">
    - <Header>
      <NAME>Bopanna</NAME>
      </Header>
      </ns0:MT_TEST>
    I want to get the Output file name as " Bopanna.xml"
    Please suggest me on this.
    Regards
    Bopanna

    Hi,
    There are couple of links already available for this. Just for info see the below details,
    The Output file name could be used from the field value of payload. For this you need to use the UDF DynamicFile name with below code,
    //       Description: Function to create dynamic Filename
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    With this udf map it with the MessageType as
    (File Name field from Payload) > DynamicFileConfiguration>MTReceiver
    Thanks
    Swarup

  • How to get the right file name in an attachment

    I have design a program to get the attach file from an attachment. But when I click the link to save the file, the default name of the file is 'attach' whenever I get different files. Who know what is the problem, please tell me the truth.
    Here are some codes of the program.
    download.jsp
    <%="test.doc"%>
    web.xml
    <servlet-mapping>
    <servlet-name>AttachmentServlet</servlet-name>
    <url-pattern>attachment</url-pattern>
    </servlet-mapping>
    AttachmentServlet.java
    public void doGet
    Message msg = folder.getMessage(msgNum);
    // the message I get is right and the name of the file in
    // the attach in this message is right too.(I have printed)
    Multipart multipart = (Multipart)msg.getContent();
    Part part = multipart.getBodyPart(partNum);
    ContentType ct = new ContentType(sct);
    response.setContentType(ct.getBaseType());
    InputStream is = part.getInputStream();
    int i;
    while ((i = is.read()) != -1) {
    out.write(i);
    out.flush();
    out.close();

    The trick that I used is to append the URL with the name of the file. So if your url is "http://domain.com/attach", use "http://domain.com/attach/filename.doc". IE and Netscape parse the URL to determine what the filename is, so by placing this text at the end, you essentially let the browsers know what the filename is. :)
    I have design a program to get the attach file from an
    attachment. But when I click the link to save the
    file, the default name of the file is 'attach'
    whenever I get different files. Who know what is the
    problem, please tell me the truth.
    Here are some codes of the program.<< snip >>

  • How to change the excel file name which is in Application server...

    hi friends,
    my requirement is getting failed, when i'm trying to change the file name which is in Application server using the FM: SXPG_COMMAND_EXECUTE.
    when i execute above FM, i can see all my required details in SM69 like:
    COMMAND NAME: ZSPOOL_TEST1      
    OS: Windows NT
    TYPE: Customer 
    OS COMMAND: cmd rename Y:\OBRZ.PDF OBRZ38582.PDF
    once the above FM is executed, i'm getting SY-SUBRC = 2 (exception: COMMAND_NOT_FOUND).
    so, can any one guide me how to resolve this issue or is there any other way to rename the file which is in AS?
    thanks in advance...

    Hi ,
    First you can tranfer the AS server file to a new application server file.
    Then you delete the original file .
    To do that you can write code as follows --
    DATA : w_file(8) TYPE c VALUE 'FILE_NAM', " your present AS file name
           w_new(8) TYPE c VALUE 'NEW_FILE',
           fs_itab(255) TYPE c,
           t_itab LIKE TABLE OF fs_itab.
    OPEN DATASET w_file FOR OUTPUT IN BINARY MODE.
    DO.
      READ DATASET w_file INTO fs_itab. " Reading value from the AS file to field string
      IF sy-subrc NE 0.
        EXIT.
      ELSE.
        APPEND fs_itab TO t_itab. " Populating internal table form the file value
      ENDIF.
    ENDDO.
    OPEN DATASET w_new FOR INPUT IN BINARY MODE. " creating a new file if that does not exist
    LOOP AT t_itab INTO fs_itab.
      TRANSFER fs_itab TO  w_new. " Transfering to file
    ENDLOOP.
    CLOSE DATASET w_file..
    DELETE DATASET w_file. " Dleting the old file
    CLOSE DATASET w_new.  " Closing the final file
    Regards
    Pinaki

  • How do I get the library file name for a linked icon?

    Hello,
    Using AW 7.02
    I have a couple of library files, one contains graphics, the
    other audio. I am using a dive routine to run through the icons in
    the a7p file and if it is a sound icon that is "linked", I want to
    make sure that it is linked to the audio library file.
    What I am having a problem with is obtaining the linked
    filename.
    Is there an icon property that contains the linked info? I
    believe that there is, as when I right click on a sound icon which
    is linked to a library file, I noticed that I could select Library
    Links... from the pop up menu, and I found the following data:
    Library Link Name:1.3.1s
    Linked To:1.3.1s
    In Library:lessonAudio.a7l <<<----This is what I am
    interested in getting (if it is lessonGraphics.a7l then I want to
    warn the developer)
    A little test that I did with one audio icon in the flow line
    just prior to the calc contents below:
    T_Str := GetIconContents(IconPrev(IconID)) --
    produced:[[#type:#linkedIcon, #iconID:262168]]
    if T_Str[1, #type] = #linkedIcon then
    T_Str1 := GetIconContents(T_Str[1,#iconID]) --
    produced:[[#type:#sound, #filename:"", #storage:#internal,
    #format:"MP3"]]
    else
    T_Str1 := "Otherwise, something else."
    end if
    #filename above appears not to be the place to look as it may
    contain the actual pathname to the mp3 file, IF that info is still
    available.
    FYI, The audio in the library file is NOT linked externally.
    Thanks
    Mike

    You can figure this out mathematically. ((Library number + 1)
    * 65536) + 7
    will be the first icon number in the library. You can also
    use
    GetLibraryInfo which gives you information on the libraries
    including the
    root icon of each. So your icon 262168 will be in the 3rd
    library returned
    from GetLibraryInfo()
    Mike
    ====================
    Mike Baker
    Adobe Community Expert
    mike-baker at cox dot net
    "MN_Mike" <[email protected]> wrote in
    message
    news:g9s2tg$8a$[email protected]..
    > Hello,
    >
    > Using AW 7.02
    >
    > I have a couple of library files, one contains graphics,
    the other audio.
    I
    > am using a dive routine to run through the icons in the
    a7p file and if it
    is a
    > sound icon that is "linked", I want to make sure that it
    is linked to the
    audio
    > library file.
    What I am having a problem with is obtaining the linked
    > filename.
    >
    > Is there an icon property that contains the linked info?
    I believe that
    there
    > is, as when I right click on a sound icon which is
    linked to a library
    file, I
    > noticed that I could select Library Links... from the
    pop up menu, and I
    found
    > the following data:
    >
    > Library Link Name:1.3.1s
    > Linked To:1.3.1s
    >
    In Library:lessonAudio.a7l <<<----This is what I am
    interested in
    getting
    > (if it is lessonGraphics.a7l then I want to warn the
    developer)
    >
    >
    > A little test that I did with one audio icon in the flow
    line just prior
    to
    > the calc contents below:
    >
    > T_Str := GetIconContents(IconPrev(IconID)) --
    > produced:[[#type:#linkedIcon, #iconID:262168]]
    > if T_Str[1, #type] = #linkedIcon then
    > T_Str1 := GetIconContents(T_Str[1,#iconID]) --
    produced:[[#type:#sound,
    > #filename:"", #storage:#internal, #format:"MP3"]]
    > else
    > T_Str1 := "Otherwise, something else."
    > end if
    >
    > #filename above appears not to be the place to look as
    it may contain the
    > actual pathname to the mp3 file, IF that info is still
    available.
    >
    > FYI, The audio in the library file is NOT linked
    externally.
    >
    >
    > Thanks
    >
    > Mike
    >

  • How to get the long file name from an 8.3 name in Windows.

    Because of a legacy string limitation, I have a list of files in 8.3 format. The actual files are saved with long names. How can I get the long name from the short name?
    In JavaScript, I would get a file system object and get the file object from there with the short name. Then it's no problem to get the full name. But I don't see anything in Java that matches that. ???
    Ideas?
    Frank Perry, MSEE

    Here is what I did.
    String displayName = "somefi~1.txt";
    File fO = new File("c:\\"); // I have a more involved path but that's not important here.
    String stPath = fO.getPath() + displayName;
    File fD = new File(stPath); // get the file using the short name.
    File fDc = new File(fD.getCanonicalPath()); // get another file using the cononical name
    String FulldisplayName = fDc.getName(); // get the long name from there.
    It's roundabout but it works. Since getName() on the file read with the short name only returns the name used to get the file, I open it twice. The alternative is to parse the cononical name for the file name but that's clumbsy too.
    Frank

  • How to get the original file name in chinese with upload component?

    It is inconvenience for user to upload file with name only in english. When upload a file with chinese file name, the file name gotten from "fileUpload1.getUploadedFile().getOriginalName()" is just like "&#32515;&#25120;&#31926;&#37733;&#65533;.jpg". Do somebody have a good idea?

    I spoke to the component engineers regarding this issue
    First please check if the s page encoding is set correctly, as browsers tend to default to use the encoding that was used for the page when submitting the request.
    (Because of how the JSF response writer is written, multibyte characters can be written correctly even if the encoding is not set correctly so the fact that form correctly rendered chinese characters is not proof that the encoding was set correctly).
    If you established that the page encoding is correct, then there is a
    bug in the FileUpload. The method that gets the name is a straight
    shot through to an Apache FileUpload library method. Technically this
    ought to be resolved by that method checking the request body
    character set before parsing the parameters.
    - Winston
    http://blogs.sun.com/roller/page/winston?catname=Creator

  • How to get the target file name from an URL?

    Hi there,
    I am trying to download data from an URL and save the content in a file that have the same name as the file on the server. In some way, what I want to do is pretty similar to what you can do when you do a right click on a link in Internet Explorer (or any other web browser) and choose "save target as".
    If the URL is a direct link to the file (for example: http://java.sun.com/images/e8_java_logo_red.jpg ), I do not have any problem:
    URL url = new URL("http://java.sun.com/images/e8_java_logo_red.jpg");
    System.out.println("Opening connection to " + url + "...");
    // Copy resource to local file                   
    InputStream is = url.openStream();
    FileOutputStream fos=null;
    String fileName = null;
    StringTokenizer st=new StringTokenizer(url.getFile(), "/");
    while (st.hasMoreTokens())
                    fileName=st.nextToken();
    System.out.println("The file name will be: " + fileName);
    File localFile= new File(System.getProperty("user.dir"), fileName);
    fos = new FileOutputStream(localFile);
    try {
        byte[] buf = new byte[1024];
        int i = 0;
        while ((i = is.read(buf)) != -1) {
            fos.write(buf, 0, i);
    } catch (Throwable e) {
        e.printStackTrace();
    } finally {
        if (is != null)
            is.close();
        if (fos != null)
            fos.close();
    }Everything is fine, the file name I get is "e8_java_logo_red.jpg", which is what I expect to get.
    However, if the URL is an indirect link to the file (for example: http://javadl.sun.com/webapps/download/AutoDL?BundleId=37719 , which link to a file named JavaSetup6u18-rv.exe ), the similar code return AutoDL?BundleId=37719 as file name, when I would like to have JavaSetup6u18-rv.exe .
    URL url = new URL("http://javadl.sun.com/webapps/download/AutoDL?BundleId=37719");
    System.out.println("Opening connection to " + url + "...");
    // Copy resource to local file                   
    InputStream is = url.openStream();
    FileOutputStream fos=null;
    String fileName = null;
    StringTokenizer st=new StringTokenizer(url.getFile(), "/");
    while (st.hasMoreTokens())
                    fileName=st.nextToken();
    System.out.println("The file name will be: " + fileName);
    File localFile= new File(System.getProperty("user.dir"), fileName);
    fos = new FileOutputStream(localFile);
    try {
        byte[] buf = new byte[1024];
        int i = 0;
        while ((i = is.read(buf)) != -1) {
            fos.write(buf, 0, i);
    } catch (Throwable e) {
        e.printStackTrace();
    } finally {
        if (is != null)
            is.close();
        if (fos != null)
            fos.close();
    }Do you know how I can do that.
    Thanks for your help
    // JB
    Edited by: jb-from-sydney on Feb 9, 2010 10:37 PM

    Thanks for your answer.
    By following your idea, I found out that one of the header ( content-disposition ) can contain the name to be used if the file is downloaded. Here is the full code that allow you to download locally a file on the Internet:
          * Download locally a file from a given URL.
          * @param url - the url.
          * @param destinationFolder - The destination folder.
          * @return the file
          * @throws IOException Signals that an I/O exception has occurred.
         public static final File downloadFile(URL url, File destinationFolder) throws IOException {
              URLConnection urlC = url.openConnection();
              InputStream is = urlC.getInputStream();
              FileOutputStream fos = null;
              String fileName = getFileName(urlC);
              destinationFolder.mkdirs();
              File localFile = new File(destinationFolder, fileName);
              fos = new FileOutputStream(localFile);
              try {
                   byte[] buf = new byte[1024];
                   int i = 0;
                   while ((i = is.read(buf)) != -1) {
                        fos.write(buf, 0, i);
              } finally {
                   if (is != null)
                        is.close();
                   if (fos != null)
                        fos.close();
              return localFile;
          * Returns the file name associated to an url connection.<br />
          * The result is not a path but just a file name.
          * @param urlC - the url connection
          * @return the file name
          * @throws IOException Signals that an I/O exception has occurred.
         private static final String getFileName(URLConnection urlC) throws IOException {
              String fileName = null;
              String contentDisposition = urlC.getHeaderField("content-disposition");
              if (contentDisposition != null) {
                   fileName = extractFileNameFromContentDisposition(contentDisposition);
              // if the file name cannot be extracted from the content-disposition
              // header, using the url.getFilename() method
              if (fileName == null) {
                   StringTokenizer st = new StringTokenizer(urlC.getURL().getFile(), "/");
                   while (st.hasMoreTokens())
                        fileName = st.nextToken();
              return fileName;
          * Extract the file name from the content disposition header.
          * <p>
          * See <a
          * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html">http:
          * //www.w3.org/Protocols/rfc2616/rfc2616-sec19.html</a> for detailled
          * information regarding the headers in HTML.
          * @param contentDisposition - the content-disposition header. Cannot be
          *            <code>null>/code>.
          * @return the file name, or <code>null</code> if the content-disposition
          *         header does not contain the filename attribute.
         private static final String extractFileNameFromContentDisposition(
                   String contentDisposition) {
              String[] attributes = contentDisposition.split(";");
              for (String a : attributes) {
                   if (a.toLowerCase().contains("filename")) {
                        // The attribute is the file name. The filename is between
                        // quotes.
                        return a.substring(a.indexOf('\"') + 1, a.lastIndexOf('\"'));
              // not found
              return null;
         }

  • How to get the incoming file name using JMS adapter and SOAP adapter

    Hi Everybody,
       In one of my interface i need to get the file name of incoming flat file using JMS adapter at sender side. and then i am using xslt to convert it to IDOC and then posting to  SAP IDOC.
    my incoming filname are in this form price<DateTimestamp>.txt. when i do the tranformation this incoming file name should be part of one element in the IDOC which i am posting.
    EX:
    <IDOC
    <REF>price<DateTimestamp>.txt</REF>
    </IDOC>
    Hope it is clear to everybody. I need your suggestion how i can capture this incoming file name and send it as part of IDOC.
    Thanks
    raj

    If they are passing it in message id or correlation id,
    you can access it using
    <xsl:variable name="dynamic-conf" 
            select="map:get($inputparam, 'DynamicConfiguration')" />
        <xsl:variable name="dynamic-key"  
            select="key:create('http://sap.com/xi/XI/System/JMS', 'DCJMSMessageID/ DCJMSCorrelationID')" />
        <xsl:variable name="dynamic-value"
            select="dyn:get($dynamic-conf, $dynamic-key)" />
    Check this:
    http://help.sap.com/saphelp_nw70/helpdata/en/f4/2d6189f0e27a4894ad517961762db7/content.htm
    Thanks,
    Beena.

  • How to get the complete file name?

    Good day!
    My task is to upload files to the database and also save its path. I am already through with the Blob files but I have a problem with its filename. My boss wants me to get the complete path/location of the file that I am uploading. I mean, she wants to get where it is saved first before I upload it.
    Ex.
    C:/My Documents/User Files/WebApps/myWebApps/test.txt
    currently I am using the following codes:
    CODE 1:
         File tempFileRef  = new File(fi.getName());
         System.out.println("Field = "+tempFileRef);It only outputs:
    Field = test.txt
    which is not complete
    CODE 2:
         File tempFileRef  = new File(fi.getName());
         System.out.println("Field = "+tempFileRef.getAbsolutePath());which also gives this wrong output:
    Field = C:\Tomcat 5.5.23\bin\test.txt
    Can someone please help me?
    Thanks so much.
    God bless.

    Thank you for your reply.
    I am using Apache Commons File Upload. Here is the code where I got the "fi".
         DiskFileUpload fu = new DiskFileUpload();
              fu.setSizeMax(1000000000);
              List fileItems = fu.parseRequest(request);
             Iterator itr = fileItems.iterator();
              FileItem fi = (FileItem)itr.next();
              if(!fi.isFormField())
                File tempFileRef  = new File(fi.getName());
         System.out.println("Field = "+tempFileRef.getAbsolutePath());
         }

  • How to get the source file name and transform into database

    Hi,
    We need to load data from source file abc.csv into oracle table. during loading, we need to keep the file name abc.csv and write into the database table as one field. Is there anyone who did the similar task? and how to make it? Pls help!

    Hi,
    If you can write the filename to a text file, you may do the following:
    (1) create a text-file containing the name of your source-file.
    (2) create an external table using that text-file as input.
    Now, you can SELECT the filename from the external table.
    Of course, you need a way to : create the flat file, handle the flat file, etc.
    Grtz.

  • How to Get OHD's file name of last run?

    Hi Experts,
    I am currently generating a file, through a Process chain, from OHD that contains the BW system timestamp as part of its logical filename. There is  a requirement to log the file name generated along with the number of rows..
    Is there anyway of getting this informaiton.. Are there any logs that are created for OHDs when they are run that contain this info?
    Thanks in advance.
    Vj

    hi,
    please see below threads
    how to generate the open hub file format as .txt ?
    Open HUB Destination
    Open Hub Destination
    hope this will be helpful to you
    regards
    laksh

  • Getting trace file names for a conc program

    Hi All,
    We are using Oracle EBS 11i with Oracle 9i database.
    The Apps version is 11.5.9 and database version is Release 9.2.0.6.0.
    I am trying to trace a custom program which runs the pl/sql procedure.
    I have enabled the tracing in the custom program definition.
    This procedure has several blocks inside and also has many commits.
    Due to this the SID for the session changes frequently.
    Now my question is how can I get all the SIDs for this conc program and get the trace files for each SID.
    My goal is to get all the trace file generated for this conc program and use them for analysis.
    Any help is appreciated !
    Thanks,
    DR.

    Sending again with formatting.
    SELECT c.*, b.accounting_date,
              a.segment1
           || '.'
           || a.segment2
           || '.'
           || a.segment3
           || '.'
           || a.segment4
           || '.'
           || a.segment5 accrual_account
      FROM gl_code_combinations a,
           ARCHIVE.ap_ae_headers b,
           ARCHIVE.ap_ae_lines c,
           ARCHIVE.po_distributions d,
           ARCHIVE.ap_invoice_distributions e
    WHERE e.po_distribution_id IS NOT NULL
       AND d.po_distribution_id = e.po_distribution_id
       AND c.source_table = 'AP_INVOICE_DISTRIBUTIONS'
       AND c.source_id = e.invoice_distribution_id
       AND b.ae_header_id = c.ae_header_id
       AND b.accounting_date <= :b1
       AND a.code_combination_id = d.accrual_account_id
       AND a.segment3 = '3010'
    UNION ALL
    SELECT c.*, b.accounting_date,
              a.segment1
           || '.'
           || a.segment2
           || '.'
           || a.segment3
           || '.'
           || a.segment4
           || '.'
           || a.segment5 accrual_account
      FROM gl_code_combinations a,
           apps.ap_ae_headers b,
           apps.ap_ae_lines c,
           apps.po_distributions d,
           apps.ap_invoice_distributions e
    WHERE e.po_distribution_id IS NOT NULL
       AND d.po_distribution_id = e.po_distribution_id
       AND c.source_table = 'AP_INVOICE_DISTRIBUTIONS'
       AND c.source_id = e.invoice_distribution_id
       AND b.ae_header_id = c.ae_header_id
       AND b.accounting_date <= :b1
       AND a.code_combination_id = d.accrual_account_id
       AND a.segment3 = '3010'
    SQL>select * from table(dbms_xplan.display);
    | Id  | Operation                        |  Name                         | Rows  | Bytes | Cost  | Inst   |IN-OUT|
    |   0 | SELECT STATEMENT                 |                               |    20 |  7545 |  7708 |        |      |
    |   1 |  UNION-ALL                       |                               |       |       |       |        |      |
    |   2 |   NESTED LOOPS                   |                               |    19 |  7201 |   825 |        |      |
    |   3 |    NESTED LOOPS                  |                               |    19 |  6612 |   787 |        |      |
    |   4 |     NESTED LOOPS                 |                               |    93 | 28737 |   694 |        |      |
    |   5 |      NESTED LOOPS                |                               |   119 | 32130 |   456 |        |      |
    |*  6 |       FILTER                     |                               |       |       |       |        |      |
    |   7 |        REMOTE                    |                               |       |       |       | AJINNI | R->S |
    |*  8 |       FILTER                     |                               |       |       |       |        |      |
    |   9 |        REMOTE                    |                               |       |       |       | AJINNI | R->S |
    |* 10 |      FILTER                      |                               |       |       |       |        |      |
    |  11 |       REMOTE                     |                               |       |       |       | AJINNI | R->S |
    |* 12 |     FILTER                       |                               |       |       |       |        |      |
    |  13 |      REMOTE                      |                               |       |       |       | AJINNI | R->S |
    |* 14 |    TABLE ACCESS BY INDEX ROWID   | GL_CODE_COMBINATIONS          |     1 |    31 |     2 |        |      |
    |* 15 |     INDEX UNIQUE SCAN            | GL_CODE_COMBINATIONS_U1       |     1 |       |     1 |        |      |
    |  16 |   NESTED LOOPS                   |                               |     1 |   344 |  6883 |        |      |
    |  17 |    NESTED LOOPS                  |                               |     6 |  1878 |  6871 |        |      |
    |  18 |     NESTED LOOPS                 |                               |   572 |   156K|  5727 |        |      |
    |  19 |      NESTED LOOPS                |                               |   988 |   248K|  3751 |        |      |
    |* 20 |       TABLE ACCESS BY INDEX ROWID| AP_AE_HEADERS_ALL             |   978 | 17604 |   817 |        |      |
    |* 21 |        INDEX RANGE SCAN          | AP_AE_HEADERS_N3              | 17595 |       |    82 |        |      |
    |* 22 |       TABLE ACCESS BY INDEX ROWID| AP_AE_LINES_ALL               |     1 |   240 |     3 |        |      |
    |* 23 |        INDEX RANGE SCAN          | AP_AE_LINES_U2                |     8 |       |     2 |        |      |
    |* 24 |      TABLE ACCESS BY INDEX ROWID | AP_INVOICE_DISTRIBUTIONS_ALL  |     1 |    23 |     2 |      
    |* 25 |       INDEX UNIQUE SCAN          | AP_INVOICE_DISTRIBUTIONS_U2   |     1 |       |     1 |        |      |
    |* 26 |     TABLE ACCESS BY INDEX ROWID  | PO_DISTRIBUTIONS_ALL          |     1 |    32 |     2 |        |      |
    |* 27 |      INDEX UNIQUE SCAN           | PO_DISTRIBUTIONS_U1           |     1 |       |     1 |        |      |
    |* 28 |    TABLE ACCESS BY INDEX ROWID   | GL_CODE_COMBINATIONS          |     1 |    31 |     2 |        |      |
    |* 29 |     INDEX UNIQUE SCAN            | GL_CODE_COMBINATIONS_U1       |     1 |       |     1 |        |      |
    Predicate Information (identified by operation id):
       6 - filter(NVL("AP_AE_HEADERS_ALL_H"."ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(:B1,1,1),'
                  ',NULL,SUBSTRB(:B2,1,10))),(-99)))=NVL(TO_NUMBER(DECODE(SUBSTRB(:B3,1,1),' ',NULL,SUBSTRB(:B4
       8 - filter(NVL("AP_AE_LINES_ALL_H"."ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(:B1,1,1),'
                  ',NULL,SUBSTRB(:B2,1,10))),(-99)))=NVL(TO_NUMBER(DECODE(SUBSTRB(:B3,1,1),' ',NULL,SUBSTRB(:B4
      10 - filter(NVL("AP_INVOICE_DISTRIBUTIONS_ALL_H"."ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(:B1,1,1),'
                  ',NULL,SUBSTRB(:B2,1,10))),(-99)))=NVL(TO_NUMBER(DECODE(SUBSTRB(:B3,1,1),' ',NULL,SUBSTRB(:B4
      12 - filter(NVL("PO_DISTRIBUTIONS_ALL_H"."ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(:B1,1,1),'
                  ',NULL,SUBSTRB(:B2,1,10))),(-99)))=NVL(TO_NUMBER(DECODE(SUBSTRB(:B3,1,1),' ',NULL,SUBSTRB(:B4
      14 - filter("A"."SEGMENT3"='3010')
      15 - access("A"."CODE_COMBINATION_ID"="PO_DISTRIBUTIONS_ALL_H"."ACCRUAL_ACCOUNT_ID")
      20 - filter(NVL("AP_AE_HEADERS_ALL"."ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(:B1,1,1),'
                  ',NULL,SUBSTRB(:B2,1,10))),(-99)))=NVL(TO_NUMBER(DECODE(SUBSTRB(:B3,1,1),' ',NULL,SUBSTRB(:B4
      21 - access("AP_AE_HEADERS_ALL"."ACCOUNTING_DATE"<=:Z)
      22 - filter("AP_AE_LINES_ALL"."SOURCE_TABLE"='AP_INVOICE_DISTRIBUTIONS' AND
                  NVL("AP_AE_LINES_ALL"."ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(:B1,1,1),'
                  ',NULL,SUBSTRB(:B2,1,10))),(-99)))=NVL(TO_NUMBER(DECODE(SUBSTRB(:B3,1,1),' ',NULL,SUBSTRB(:B4
      23 - access("AP_AE_HEADERS_ALL"."AE_HEADER_ID"="AP_AE_LINES_ALL"."AE_HEADER_ID")
      24 - filter("AP_INVOICE_DISTRIBUTIONS_ALL"."PO_DISTRIBUTION_ID" IS NOT NULL AND
                  NVL("AP_INVOICE_DISTRIBUTIONS_ALL"."ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(:B1,1,1),'
                  ',NULL,SUBSTRB(:B2,1,10))),(-99)))=NVL(TO_NUMBER(DECODE(SUBSTRB(:B3,1,1),' ',NULL,SUBSTRB(:B4
      25 - access("AP_AE_LINES_ALL"."SOURCE_ID"="AP_INVOICE_DISTRIBUTIONS_ALL"."INVOICE_DISTRIBUTION_ID"
      26 - filter(NVL("PO_DISTRIBUTIONS_ALL"."ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(:B1,1,1),'
                  ',NULL,SUBSTRB(:B2,1,10))),(-99)))=NVL(TO_NUMBER(DECODE(SUBSTRB(:B3,1,1),' ',NULL,SUBSTRB(:B4
      27 - access("PO_DISTRIBUTIONS_ALL"."PO_DISTRIBUTION_ID"="AP_INVOICE_DISTRIBUTIONS_ALL"."PO_DISTRIB
      28 - filter("A"."SEGMENT3"='3010')
      29 - access("A"."CODE_COMBINATION_ID"="PO_DISTRIBUTIONS_ALL"."ACCRUAL_ACCOUNT_ID")
    Note: cpu costing is off
    67 rows selected.
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for