Weird problem while Extracting File path from file Browser item

Hi all
I followed some tutorials on this forum to get the absolute filepath from the filebrowser item and storing it in the database.
Heres what I did. I created a script in the header of the page which reads like this:
<script language="JavaScript1.1" type="text/javascript">
function SaveFullName(filepath,feed)
function getVal(item)
if(document.getElementById(item).value != "")
return document.getElementById(item).value;
else
return "";
document.getElementById(filepath).VALUE = getVal(feed);
alert(document.getElementById(filepath).VALUE);
</script>
I have call this function by this syntax which I have put in the onchange event handler of the file browser item.
onChange="javascript:SaveFullName('CCDPATH','CCDFILEBROWSER');"
Here CCDPATH is the name of the hidden item which I use to store the path and CCDFILEBROWSER is the name of the filebrowser in question.
now the last statement of the script above, alert(), gives me an alert with the proper value. The problem is when I am trying to store the value of this variable CCDPATH in my database with an onsubmit process, NULL values are getting inserted :-(
When I checked out in the debug mode, I can see that the value of this hidden item, CCDPATH is showing as "" , i.e; null. Why is this happening is out of my understanding.
I mean, with the javascript, it is assigning and displaying its value perfectly, but when I try to store it with PLSQL, it simply does'nt happen.
What am I possible doing wrong? What should I do to store the value of this hidden item in the database ??

Any thoughts people?

Similar Messages

  • Error occured while extracting the data from BSIK Table

    Hi Experts,
    I am trying to extract the data from "BSIK"  by using generic extraction by table, I am getting the error "Invalid extractiion Structure template BSIK of Data source XXXXXX", But when i am trying the same by using VIEW, i am able to do it,
    I am getting same problem while extracting the data from other tables like "BSIK, BSAK.........."
    can some one explain me why it is throughing some error when i am doing generic extraction by using Table,
    Thanks,

    Hi,
    Can you check below link:
    Invalid extract structure template ZBW_VW_EKES of DataSource ZBW_SCN_VENDOR
    Hope this answer your question!
    Regards,
    Nilima

  • Problem while exporting the data from a report to an excel file.

    Hi SAP guru's,
    I have a problem while exporting the data from a report to an excel file.
    The problem is that after exporting, the excel file seems to have some irrelevant characters....I am checking this using SOST transaction..
    Required text (Russian):
    Операции по счету                                    
    № документа     Тип документа     № учетной записи     Дата документа     Валюта     Сумма, вкл. НДС     Срок оплаты     Описание документа
    Current Text :
       ? 5 @ 0 F 8 8  ? >  A G 5 B C                                   
    !   4 > : C       "" 8 ?  4 > : C      !   C G 5 B = > 9  7 0 ? 8 A 8        0 B 0  4 > : C         0 ; N B 0      ! C <       ! @ > :  > ? ; 0 B K        ? 8 A 0 = 8 5  4 > : C
    Can you help me making configuration settings if any?
    Regards,
    Avinash Raju

    Hi Avinash
    To download  such characteres you need to adjust code page to be used during export. You can review SAP note 73606 to identify which code page is required for this language
    Best regards

  • Dreamweaver encountered problems while constructing the menus from the current menus.xml file

    So, after having trouble with my Photoshop scratch disk, I had to do an archive and install of my Mac OS 10.6.1 then reinstall the Adobe suite. I then had to run the Licensing Repair Tool (http://www.adobe.com/support/contact/licensing.html).
    Now everything works but Dreamweaver, which is throwing the following error:
    "Dreamweaver encountered problems while constructing the menus from the current menus.xml file.
    Please delete the current menus.xml file and rename menus.bak to menus.xml"
    I tried that. menus.bak is a directory, not a file. Even renaming the directory didn't work.
    I saw this http://forums.adobe.com/message/2188511#2188511
    but I don't have a /FlashPlayerTrust/ directory, nor do I see what that has to do with Dreamweaver.
    I couldn't find a corresponding solution for this http://forums.adobe.com/message/862339#862339 for the Mac OS.
    This http://forums.adobe.com/message/3396334#3396334 didn't help, either.
    Anybody have any ideas?
    Thanks!

    This is the error I got after deleting (moving) the configuration directory.
    "No document types have been found in the Configuration/DocumentTypes/ folder. The MMDocumentTypes.xml file may be missing or corrupted. The application will exit now."
    I've reinstalled the entire Adobe CS4 (which fixed my Photoshop problem but created this Dreamweaver problem) and then reinstalled Dreamweaver alone.
    I've also attached a screenshot of the Dreamweaver directory tree with the menus.xml files.

  • Issue with Getting the file path from InputFile component

    Hi,
    One of our requirement is like below:
    I am working on ADF 11g (latest release R1) page. User will select the file and when he/she clicks on the Save button we need to store the file path in the database.
    In the database file_path is varchar2(300). We need to store just the file path. I am using InputFile component but filepath is not getting inserted.
    This is really urgent. It would be really appreciate if anyone can guide me on this.
    Thanks
    MC

    Hi Mahesh,
    I have manage to store the file path from the InputFile component in Jdev 11g. I found the file upload script from this forum and manage to alter it so that i could save the file path to the database. But my problem is to retrieve it back to view as a document. Hope this will help you :)
    This is an example of what I have manage to save to my DB :
    (CLOB) //192.168.238.53/c$/Research/Docs/0906160744/EyeCandyLog.txt
    In my form, I save the file path first before I update the other fields. My code is something like this :
    public void uploadFile(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    InputStream in;
    FileOutputStream out;
    if(tanda == 0){
    try {
    // final Context context = getInitialContext();
    RS01Proposal rS01Proposal = (RS01Proposal)new InitialContext().lookup("Phase2-RS01Proposal#sr.model.RS01Proposal");
    id = rS01Proposal.dptProposalid();
    tanda = tanda + 1;
    System.out.println("tanda"+ tanda);
    } catch (Exception ex) {
    ex.printStackTrace();
    System.out.println("id"+id);
    proposal = id.substring(6);
    System.out.println("proposal"+proposal);
    UploadedFile file = (UploadedFile)valueChangeEvent.getNewValue();
    String fileUploadLoc = "//192.168.238.53/c$/Research/Docs/"+id+"/";//The place where file will saved
    //create upload directory
    boolean exists = (new File(fileUploadLoc)).exists();
    if (!exists) {
    (new File(fileUploadLoc)).mkdirs();
    if (file != null && file.getLength() > 0) {
    FacesContext context = FacesContext.getCurrentInstance();
    FacesMessage message =
    new FacesMessage("File Uploaded " + file.getFilename() +
    " (" + file.getLength() + " bytes)");
    *// extracting the file message to get the path*
    context.addMessage(valueChangeEvent.getComponent().getClientId(context), message);
    columnL = valueChangeEvent.getComponent().getClientId(context);
    column = columnL.substring(9);
    System.out.println(column);
    columnLengkap = "RS01"+column.toUpperCase();
    System.out.println("columnLengkap"+columnLengkap);
    *try {*
    out = new FileOutputStream(fileUploadLoc + "" + file.getFilename());
    in = file.getInputStream();
    *for (int bytes = 0; bytes < file.getLength(); bytes++) {*
    out.write(in.read());
    in.close();
    out.close();
    } catch (IOException e) {
    e.printStackTrace();
    } else {
    String filename = file != null ? file.getFilename() : null;
    String byteLength = file != null ? "" + file.getLength() : "0";
    FacesContext context = FacesContext.getCurrentInstance();
    FacesMessage message =
    new FacesMessage(FacesMessage.SEVERITY_WARN, " " + " " +
    filename + " (" + byteLength + " bytes)",
    null);
    context.addMessage(valueChangeEvent.getComponent().getClientId(context),
    message);
    System.out.println(fileUploadLoc+file.getFilename());
    a = fileUploadLoc+file.getFilename();
    b = b + 1;
    if (flagInsert == 0){
    try {
    // final Context context = getInitialContext();
    RS01Proposal rS01Proposal = (RS01Proposal)new InitialContext().lookup("Phase2-RS01Proposal#sr.model.RS01Proposal");
    rS01Proposal.insertDoc(id,proposal,columnLengkap,a);
    flagInsert = flagInsert + 1;
    System.out.println("tanda"+ tanda);
    //session
    ProposalSession.storeCurrentProposalId(id);
    } catch (Exception ex) {
    ex.printStackTrace();
    }else{
    // update proses
    try {
    // final Context context = getInitialContext();
    RS01Proposal rS01Proposal = (RS01Proposal)new InitialContext().lookup("Phase2-RS01Proposal#sr.model.RS01Proposal");
    rS01Proposal.updateDoc(id,proposal,columnLengkap,a);
    flagInsert = flagInsert + 1;
    //session
    ProposalSession.storeCurrentProposalId(id);
    System.out.println("tanda"+ tanda);
    } catch (Exception ex) {
    ex.printStackTrace();
    }

  • File path from specific directory

    hi all ,
    How to get full file path from specific directory having many folder inside that directory.
    I have file name and main directory name,please help me if you know about it

    I recognize that this post is half a year old at this writing, and the OP has probably long since either solved or abandoned the problem in question. That being stipulated: if I understand the question properly, the OP is stating that there is a directory named A, and contained somewhere within that directory or one (or more) of its subdirectories is one (or more) file(s) named abc.txt, and OP would like to be able to locate and obtain the canonical path to said file(s). While I am in no way a java maven, I've written a brief program which appears to do exactly that:
    import java.io.*;
    public class Main {
        public Main() {
            String whatImLookingFor = "abc.txt";
            String startingDirectory = "A";
            File path = new File("A");
            recursivelySearch(path, whatImLookingFor);
        private void recursivelySearch(File path, String whatImLookingFor) {
            try {
                if (path.isFile()) {
                    if (path.getName().equals(whatImLookingFor))
                        System.out.println(path.getCanonicalPath());
                else
                    if (path.isDirectory()) {
                        File[] currentFiles = path.listFiles();
                        for (int i=0; i<currentFiles.length; i++)
                            recursivelySearch(currentFiles, whatImLookingFor);
    catch(IOException ioe) {
    System.out.println("During search got error "+ioe.getMessage());
    public static void main(String[] args) {
    new Main();

  • Incorrect file path from getContextPath

    I am trying to get a file listing from a directory on the server from my jsp page by doing:
    File hrdir = new File(request.getContextPath().substring(1));The substring just takes off the leading /.
    Anyway, if I do a getAbsolutePath() on my file object I get back: "C:\Program files\Tomcat 5.5\AppName"
    However, the actual path is: "C:\Program files\Tomcat 5.5\webapps\AppName"
    Any ideas on why the path is coming back incorrectly?

    I recognize that this post is half a year old at this writing, and the OP has probably long since either solved or abandoned the problem in question. That being stipulated: if I understand the question properly, the OP is stating that there is a directory named A, and contained somewhere within that directory or one (or more) of its subdirectories is one (or more) file(s) named abc.txt, and OP would like to be able to locate and obtain the canonical path to said file(s). While I am in no way a java maven, I've written a brief program which appears to do exactly that:
    import java.io.*;
    public class Main {
        public Main() {
            String whatImLookingFor = "abc.txt";
            String startingDirectory = "A";
            File path = new File("A");
            recursivelySearch(path, whatImLookingFor);
        private void recursivelySearch(File path, String whatImLookingFor) {
            try {
                if (path.isFile()) {
                    if (path.getName().equals(whatImLookingFor))
                        System.out.println(path.getCanonicalPath());
                else
                    if (path.isDirectory()) {
                        File[] currentFiles = path.listFiles();
                        for (int i=0; i<currentFiles.length; i++)
                            recursivelySearch(currentFiles, whatImLookingFor);
    catch(IOException ioe) {
    System.out.println("During search got error "+ioe.getMessage());
    public static void main(String[] args) {
    new Main();

  • External hard drive -- old file path from a previous laptop is still where to find my songs,  how do I change?

    My iTunes library is a mess, it is stored on an external hard drive.  My old laptop died unexpectedly and I didn't have a problem resetting the file path for the library on my new laptop.  The other day my son was trying to update his iPod when I wasn't home and I don't know what he did.... GRRRR  Any songs I purchased on my old laptop are now not able to be found.  When I click on 'get info' on a song it shows the old file path from the old laptop.  Songs that I purchased since the new laptop are still playable and great.  I know my songs are still there but I can't seem to get the file path to reset on the old music.  HELP!!! PLEASE

    This happens if the file is no longer where iTunes expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, or that the drive it lives on has had a change of drive letter. It is also possible that iTunes has changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout,or vice-versa, and so is looking in slightly the wrong place.
    Select a track with an exclamation mark, use Ctrl-I to get info, then cancel when asked to try to locate the track. Look on the summary tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, or an external drive letter has changed, it should be possible to reverse the actions.
    Alternatively, as long as you can find a location holding the missing files, then you should be able to use my FindTracks script to reconnect them to iTunes .
    tt2

  • Problem while writing data on xls file using jxl API

    Hi,
    I am getting problem while writing data on excel file using jxl api.
    When i write data on file and all handles associated to the file are closed, file size increases but when i open the file nothing is written in it and when file is closed manually from excel window, file size decreased to its original that was before writing data.
    here is code:
              FileOutputStream os = new FileOutputStream(this.dirPath + this.fileName, true);
              WritableWorkbook this.workbook = Workbook.createWorkbook(os);
    after writing data following handler are closed:
    this.os.flush();
                        this.workbook.write();
                        this.workbook.close();
                        this.os.close();
                        this.os = null;
    can any body help me.
    Thanks in advance

    Err, I did help you. I did understand your problem; and I solved it for you. What was missing was that you apparently made no effort to understand what you were being told. Or even consider it. You just argued about it, as though you were the one with the solution, instead of the one whose code didn't work.
    And the other thing that was missing was the part where you said 'thank you' to me for solving your problem. Somewhat more appropriate than biting the hand that fed you, frankly. I do this for nothing, on my own gas, and it's extremely irritating when people keep asking about problems I have already solved for them. I am entitled to discourage that. It's part of making them more efficient actually.
    But it happens often enough that it also makes me think I'm just wasting my time. Probably I am.

  • Getting path from file

    Good Morning,
    Is there a way to get a file path from a file without having to select it through client_get_file_name?
    for example i have a file 'test_01.txt' in C:/
    I cannot hard code the path as each day the txt name will change eg. 'test_02'.
    Is there another way to select the full path name in C:/ where file like 'test%'?
    Thank you in advance,
    D

    Sorry francois ill be a more clear
    On a variable i want to keep changing the path provided.
    For example one day will be var:='C:/Test_01'
    next day will be var:='C:/Test_03'
    as the last number is generated randomly im trying to figure a way to get the correct path in C:/ where the name corresponds to 'test' so i can pass it to my variable
    Edited by: 794018 on 18-Oct-2012 00:50

  • How to get physical file path from logical file path

    Hi
    there is a immediate requirement ,
    I have logical file path but I need to get physical file path from it.
    So is there any FM which providesthis functionality.
    Points will be rewarded.
    Thanks

    Can you please share the piece of code ?
    Which File APIs are you using ?
    For java file, you can get complete path by simple method call : getAbsolutePath() on file object.
    Regards,
    Ashwani Kr Sharma

  • How to get folder(directory path only not file path) from local file system

    Hi Firends,
    How to get folder(directory path only not file path) from local file system , whenevr i will click on browse button.
    Please give reply for this one , if anybody knows.
    Thanks,
    Anderson.

    Hi Anderson,
    if you're using flash.filesystem.FileReference - then it is run in black box - except of filename, size and creation data (and few other properties available after some operation succeeded). This is part of security features in Flash runtime (described in header section):
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference .html
    This for example implies that user can download a content to local machine - but that content cannot be loaded back into Flash runtime. For this you would need either Air runtime flash.filesystem.File:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.h tml
    (so you would created Air runtime based application: desktop or mobile but not web, even as standalone project) or you would need one of 3rd party tools that add file access/file information features to standard Flash runtime applications converted to standalone native applications.
    hth,
    kind regards,
    Peter

  • How to Serialize a file path from client to server?

    I am using serializing concepts in java. I am stuck, that how can i send only file path from client to server?

    Um, ill take a wild guess and say that youre trying to
    access a file on another computer using that path?
    That wont work.
    What could the other computer possible do
    with that path unless both computers are networked to a
    common drive, or if they are networked to each other in a way
    where the root in the file path would point to the same place
    on either computer?

  • Problems While Extracting Hours From Date Field

    Hi Guys,
    Hope you are doing well.
    I am facing some problems while extracting hours from date field. Below is an example of my orders table:-
    select * from orders;
    Order_NO     Arrival Time               Product Name
    1          20-NOV-10 10:10:00 AM          Desktop
    2          21-NOV-10 17:26:34 PM          Laptop
    3          22-JAN-11 08:10:00 AM          Printer
    Earlier there was a requirement that daily how many orders are taking place in the order's table, In that I used to write a query
    arrival_time>=trunc((sysdate-1),'DD')
    and arrival_time<trunc((sysdate),'DD')
    The above query gives me yesterday how many orders have been taken place.
    Now I have new requirement to generate a report on every 4 hours how many orders will take place. For an example if current time is 8.00 AM IST then the query should fetch from 4.00 AM till 8 AM how many orders taken place. The report will run next at 12.00 PM IST which will give me order took place from 8.00 AM till 12.00 PM.
    The report will run at every 4 hours a day and generate report of orders taken place of last 4 hours. I have a scheduler which will run this query every hours, but how to make the query understand to fetch order details which arrived last 4 hours. I am not able to achieve this using trunc.
    Can you please assist me how to make this happen. I have checked "Extract" also but I am not satisfied.
    Please help.
    Thanks In Advance
    Arijit

    you may try something like
    with testdata as (
      select sysdate - level/24 t from dual
      connect by level <11
    select
      to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS') s
    , to_char(t, 'DD-MM-YYYY HH24:MI:SS') t from testdata
    where
    t >= trunc(sysdate, 'HH') - numtodsinterval(4, 'HOUR')
    S     T
    19-06-2012 16:08:21     19-06-2012 15:08:21
    19-06-2012 16:08:21     19-06-2012 14:08:21
    19-06-2012 16:08:21     19-06-2012 13:08:21
    19-06-2012 16:08:21     19-06-2012 12:08:21trunc ( ,'HH') truncates the minutes and seconds from the date.
    Extract hour works only on timestamps
    regards
    Edited by: chris227 on 19.06.2012 14:13

  • Max length of VI file paths and file names

    Hi,
    Is there a maximum allowed length of VI file paths and file names in LabVIEW? I'm running LV 6.0.2i on NT and is trying to save a VI inside a LLB and LabVIEW crashes each time. I have also tried to copy the VI from the LLB to a temp folder with the Librarian VI, but LabVIEW crashes as well. The total length of the file path is around 260 characters and I strongly suspect the file path length in combination with LLB because when I use a shorter path the problem disappear. If I use a long path without LLB (just regular VIs) a warning appear "Invalid file name" instead of LabVIEW crashing.
    Does anybody know the solution to this problem or must I use shorter filepaths? Perhaps it depends on which platform I am running
    LV on?
    Sincerely,
    Mattias Ericsson

    "Mattias Ericsson" wrote in message
    news:[email protected]..
    > Hi,
    >
    > Is there a maximum allowed length of VI file paths and file names in
    > LabVIEW? I'm running LV 6.0.2i on NT and is trying to save a VI inside
    > a LLB and LabVIEW crashes each time. I have also tried to copy the VI
    > from the LLB to a temp folder with the Librarian VI, but LabVIEW
    > crashes as well. The total length of the file path is around 260
    > characters and I strongly suspect the file path length in combination
    > with LLB because when I use a shorter path the problem disappear. If I
    > use a long path without LLB (just regular VIs) a warning appear
    > "Invalid file name" instead of LabVIEW crashing.
    >
    > Does anybody know the solution to
    this problem or must I use shorter
    > filepaths? Perhaps it depends on which platform I am running LV on?
    I believe windows has a 255 character pathname (file+path) limit. We once
    had that problem because we had a long filename and a longer pathname.
    Moved the directory up a couple levels and problem solved.

Maybe you are looking for

  • How can I block spam text messages from an email address?

    Twice per week I am getting spam texts in the middle of the night from a random email address, in reference to a free Target gift card. The problem is, the sender's email address is different every time. Any ideas how to make it stop??

  • Can't get Mountain Lion to install

    Hi I bought an iPhone 5 a month ago, then found out I needed to upgrade my OS on my 4 year Macbook Pro. I received Snow leopard yesterday and managed to install it without issue. I then found out SL doesn't support iTunes &, which is apparently what

  • Rebate processing. I need urgently

    The sales volume of earlier billing documents should be taken into consideration for subsequent agreements. I need to know how to do it step by step. When I rebuild the statistics data for the statistics structure S136 using transaction OLI9, Where a

  • SWF Talking to Adobe AIR

    I have an Adobe Air App, inside the app is a SWF embedded with the Object Tag, the SWF calls StopPlay and then calls GetURL(Javascript Command) to call a Function Interfaced with a Function inside the Application Sandbox and it works but it only work

  • Fresh install - Format, start again!

    Hello, First post here so go easy, Had an iMac for almost a year and it's been great. It's my first apple product. However due to my lack of mac knowledge within the first few month it took me a while to get use to the file stucture, OS etc. So now I