Validate filepath and filename

Hello friends,
I have a filepath given in the selection screen.  How to check whetehr the file attributes are valid. ie file path and name is a valid one.
Regards,
jamshed

hi John,
  Use FM WS_FILENAME_GET FM...
i.e,
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_INFILE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_infile.
  CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
            def_filename     = p_infile
            mask             = ',*.txt.'
            mode             = 'O'
            title            = 'Upload File'(078)
       IMPORTING
            filename         = p_infile
       EXCEPTIONS
            inv_winsys       = 1
            no_batch         = 2
            selection_cancel = 3
            selection_error  = 4
            OTHERS           = 5.
*START-OF-SELECTION
START-OF-SELECTION.
  gd_file = p_infile.
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                = gd_file
      has_field_separator     = 'X'  "file is TAB delimited
    TABLES
      data_tab                = it_record
    EXCEPTIONS
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      OTHERS                  = 17.
    IF sy-subrc NE 0.
      write: 'Error ', sy-subrc, 'returned from GUI_UPLOAD FM'.
      skip.
    endif.

Similar Messages

  • CFpdf and CFcontent shows filepath and filename in browser

    Thanks to all for past help on my CF questions...
    I've developed an upload application for (logged in to secure environment) users that uploads a pdf outside of the root, moves and renames the file and then cfpdf protects the file with a password. Part of the upload process inserts variables in a SQL database such as Catagory, Subcatagory, FileName, etc. The cffile move puts the file inside the root where I have a security framework. No problem with this.
    I have a cfm page populated (dynamically) with links to the pdf files. These links contain url handlers that pass the filepath and filename. When a user clicks a link, he is carried to an index.cfm that has the security framework and within this page I have cfpdf link to the pdf file (and sets a password) and cfcontent loading the pdf file in the browser. All of this works just fine, as it should.
    However... Because cfpdf sets the filepath/filename source and destination and passes this on to the cfcontent tag -- the filepath and filename are shown in the browser address bar as well as naming the download file the same as the http address (albeit with underscores) if the user saves the file. Anyone with any savvy can figure out the actual filepath and filename and go directly to the file in their browser. They'd still have to type in a password to view the file but I'd rather not have this filepath exposed like this.
    Without having to create a copy of the original and rename the file, is there a way to change what is shown in the browser address and in the download filename? At some point there may be many pdf files uploaded and stored on this site. I'd rather not have 2 copies of each file on the server - the original and one renamed...
    I've googled and googled and can't find an answer anywhere on this. Thanks to anyone pointing me in the right direction here.
    - e

    Finally figured this out...
    Since the file exists on the server, there's no need to use cfpdf and cfcontent to serve up the PDF.
    When the PDF link is clicked, the user is directed to a page that has the security framework where there is a redirect to the PDF on the server. I have the PDF password protected. The PDF opens in the browser and, if saved, is saved with the file name only instead of the whole url+filename.
    Learning to work with CF and PDFs through cfdocument and cfpdf lately has been somewhat frustratingly fun.(!) I guess it was overkill in trying to do the above when all I needed was a direct link to the file itself.
    Hope this will help someone else...
    - e

  • Getting filename from a string including filepath and filename

    How I can get a filename from a string which includes both
    filepath and filename? The filepath is not always the same. For
    example, the variable could include a "C:\temp\test.doc" or
    "C:\files\docfiles\test.doc" and I need to get the filename
    "test.doc" and save it to another variable. Thanks in
    advance.

    on getFilenameFromPath vPath
    oldDelim=the itemDelimiter
    the itemDelimiter=the last char of the moviePath
    iFilename=the last item of vPath
    the itemDelimiter=oldDelim
    return iFilename
    end
    Put that into a movie script. Then you can call the function
    any time
    to retrieve the last part of the path- like this:
    put getFilenameFromPath("C:\temp\test.doc")
    -- "test.doc"
    As an added bonus, it is cross-platform so it will work on a
    Mac as well
    as a PC.

  • Path and filename in footer

    If it is possible, how do I cause Acrobat 9 to report the current path and filename in the footer?
    Thanks!

    In a document-level JavaScript, add the following code, outside of a function definition:
    // Code in document-level JavaScript
    getField("PATH").value = path;
    where "PATH" is the name of a read-only text field that you've added to the bottom of each page.

  • How to browse a local PC directory and filename in Forms 10g?

    I am adding a Text Item and a Push Button. When the Push Button is pressed, I would like to select files from the local PC on Windows XP.
    What is the code that is required in order to select folder and filename and pass the value to a Text Item?

    I can now compile webutil.pll to webutil.plx after I start the create_webutil_db.sql bundled with the webutil in the schema I am using to connect from forms.
    I can run the form, but at run-time, another Error Alert appears:
    oracle.forms.webutil.file FileFunctions bean not found. WEBUTIL_FILE.FILE.SELECTION_DIALOG_INT will not work.
    What has gone wrong?
    I found that there is a batch file to sign jar files:
    sign_webutil.bat - Sample script to sign frmwebutil.jar and jacob.jar
    I can sign frmwebutil.jar but I cannot fond the file jacob.jar.
    Message was edited by:
    wyfwong

  • Is it possible to set default path and filename to the upload UI element  ?

    Hello All,
       Can some advise on if its possible to set a default path and filename to the upload ui element ? I will like to set a default path and filename to be uploaded to the upload UI. The user will then have the option of using that path or clicking on the browse to set another location.
      Any suggestions or advise ? Thank you very much.
    from
    Kwok Wei

    Hello VS,
      So to confirm, from your opinion, you feel that its not possible to have my upload UI elememt to be displyed on the screen with the path and filename preloaded ?
    Btw, do you have an email that I can reach you at ?
    from
    Kwok Wei

  • File dialog box: how get full path and filename (firefox 3.0 problem)

    Hi,
    I have a smilar problem then discussed in this thread: file dialog box: how get  full path and filename
    Now this solution doesn't seem to work in firefox 3.0,I only get the filename but not the full path.
    I have tried to solve this problem by adding *"netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");"* in a javacript function but that doesn't do the trick
    Although when i tested it local it does work.
    Any idees how to solve this?
    Best Regards
    Stijn

    Actually, that is strange and scarry. With 20% of the browser market share they decide to behave like Microsoft did in the past - they want to decide what users need and what they do not need. With 3.0 I have a real problem with some of my applications. They are all tested in IE6, IE7, FF2.0 and they all work the same way (they even work with Opera and Safari). Now, I will for sure not go there and make it work for 3.0, just because 2 out of 200 users use FF3.0. Up to now I have always recomended FF as the best browser. 3.0 causes my opinion to change completely. Competition is always good but it is a question if it is good if we have 20 different browsers out there with equal market shares.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How do I get the full path and filename of the current document?

    I'm writing a format plug-in. How do I obtain the full path and filename of the current image (document) from within my plug-in? Any help would be greatly appreciated!

    I actually just figured this out. For anyone else who would like to know, check out the propetizer sample code in the photoshop sdk. It makes a "filter" plug-in that just spits out all the properties of the document you could ever want to know about. The function I used to get the full path and filename of the current document is PIGetDocumentName(). I hope this helps someone eventually...

  • File dialog box: how get  full path and filename

    Hello All
    i have a problem to save the full path and filename with file dialog box.
    I want to save full path and filename in the database for creating a link to a file.
    I use a file-dialogbox to choose a file.
    I see in the textfiled something like this
    \FULLPATH\filename.ppt
    but when i save the textvalue in the database or look at the seesionvalue I see
    this:
    F2087258868/filename.ppt
    but I need the full path to create a link. How I can get?
    I use version 2.2.1..
    Thanks
    Putcho

    Hi Putcho,
    You can create some javascript that puts it into a hidden item.
    In HTML Form Element Attributes: onChange="$x('P15_X').value=$x('P15_FILE').value;" Then create another process that stores the value of the hidden item in your own table...
    I quickly made an example with a normal text item, so you see it copies itself to the other box: http://apex.shellprompt.net/pls/apex/f?p=286:15
    Hope that helps,
    Dimitri
    http://dgielis.blogspot.com

  • Sort by Path and Filename - What does a guy have to do?

    Hello all,
    First post here and such, but as the title reads. I have been using iTunes since early versions of 7 when I aquired my used 2gen Mini.
    In a past incident where people were attaching viruses to the ID3 Tags (see: http://en.wikipedia.org/wiki/Talk:ID3#Virusesin_ID3tags) I took the liberty (stupidity) of stripping all my ID3 tags from my music directory due to that security fault at the time, but also because all of them (the tags) were horridly inputted to the files.
    As iTunes users we can see the bad mistake I made, so now when I add a folder/directory to iTunes they just get sent to the bottom of the iTunes 'music list'.
    'Sort by path and Filename' would do wonders in organization of these untagged files. When adding an entire genre or folder, all **** breaks loose and there are the typical 40 tracks of '01 - songname' '02 - songname' and so on.
    This is where the rant part comes in. Here we are on Version 7.4.3.1 and Apple still hasnt added this minute feature to iTunes.
    I have to use Yahoo! Musicmatch (yuck) to sort and rename my files, only then to re-import them back into iTunes. I dont really care for that software (yahoo) for anything except sorting. Because it adds the actual folder to the viewable list and allows for batch renaming of directories and ID3 Tag renaming of entire albums/directories. I am not so concerned over the actual filename itself, but at least sorting by Path in iTunes would be nice so that I could give the files their proper ID3 Tags.
    Cmon Cupertino, this one isnt that hard.
    Thank you for your time.
    6

    You have several options -- two of which I'll outline below (neither built-in to iTunes, sorry)
    1) Use an external program to write ID3 tags based on the path/filename. One such program is "MP3Tag" (http://mp3tag.de/en)
    2) I wrote a program that with put the path in the Description field. You select the playlist -- then for every track in the playlist it changes the Description to the path. NOTE: I do NOT recommend that you select the "Library" playlist because it will overwrite existing descriptions for TV Shows, podcasts, etc. You can limit it to music by selecting the "Music" playlist.
    EXE version:
    http://home.comcast.net/~teridon73/itunesscripts/itunespathdescription.zip
    source code:
    http://home.comcast.net/~teridon73/itunesscripts/itunespathdescription.pl
    If you use my program, and it works for you, please consider a Paypal donation at my home page (http://home.comcast.net/~teridon73/itunesscripts/)

  • Tools for validate HTML and CSS Error in DW?

    Hello Guys,
    Want to know any addon or menu tool in Dreamweaver to validate HTML and CSS error.
    Because every time i have to check in w3c validation. If DW having in this options it wouldbe great to develop website with out error.
    Please let me know your suggestion for that.
    Cheers
    Abdul
    www.ilearnsmart.com
    www.whitehouseit.com

    DW does provide tools to help with validation:
    http://articles.sitepoint.com/article/dreamweaver-8-standards/1
    http://www.adobe.com/support/dreamweaver/htmljava/migrating_hs_to_dwmx/migrating_hs_to_dwm x06.html
    I find it a bit more comfortable though to use teh W3 Validator and I always access that with the Firefox Browser and the Web Developer plug-in.  Another good plug in for FF is Firebug.
    Martin

  • [svn:fx-trunk] 12542: When adding a mask to the display list need to validate it and all its children .

    Revision: 12542
    Revision: 12542
    Author:   [email protected]
    Date:     2009-12-04 10:38:32 -0800 (Fri, 04 Dec 2009)
    Log Message:
    When adding a mask to the display list need to validate it and all its children.  Previously the children were not validated and their display list was updated before properties were committed or measure was done.  RichText was not set up to handle this.
    QE notes:
    Doc notes:
    Bugs: SDK-24511
    Reviewer:  Evtim, Deepa
    Tests run: checkintests, fxg, primitives, Group
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24511
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/MaskUtil.as

    AFAIK, the only way to do this is to write a system modifcation.
    The BADI is executed only once at startup of the session, so that makes it merely static. (A strange point in time, I discussed it with SAP and they just shook their heads)
    I had the same problem with some other F4-Helps and it was a big hazzle. From my experience, no straight answer.

  • Diffrence between when-validate-item and post-text-item trigger

    What is the Diffrence between when-validate-item and post-text-item trigger, when they are written for the same item and the basic diffrence between when-validate-item and post-text-item trigger.

    Two big differences:
    1. post-text-item is only available to, and only triggered when leaving a text item, whereas when-validate-item is triggered by the forms validation process, and is available for any item type.
    2. p-t-i is a navigation trigger and you cannot invoke it programmatically, whereas the 'validate' built-in can be used to execute validation which fires the w-v-i trigger(s).

  • Failed to validate IIS and ShareFolder configurations. Retrun code 0x80070002

    Hi PROs,
    We're installin DP within SCCM 2012 R2 architecture in remote office,In the log file SMSDPPROV of that DP we noted the following error logged:
    [1C00][Fri 12/20/2013 13:31:37]:Failed to validate IIS and ShareFolder configurations. Return code: 0x80070002
    it is stuck at that error level,
    The DP server is Windows 2003 enterprise SP2,
    what does it mean and how can I fiw it please?

    Hi PROs,
    We're installin DP within SCCM 2012 R2 architecture in remote office,In the log file SMSDPPROV of that DP we noted the following error logged:
    [1C00][Fri 12/20/2013 13:31:37]:Failed to validate IIS and ShareFolder configurations. Return code: 0x80070002
    it is stuck at that error level,
    The DP server is Windows 2003 enterprise SP2,
    what does it mean and how can I fiw it please?

  • Validate plant and material on selection screen with select-options

    Hi all,
    I want to validate plant and material on selection screen. More over I need to validate the combination of that also (i.e plant based materials). Individually I made the validations, but combination I didn’t get it.
    For your information both are select-options, please reply me if you have an idea. The table to get the relationship is KEKO. <b>I have the below code for parameters, but I require code for select options.</b>
    SELECT MATNR WERKS FROM KEKO UP TO 1 ROWS
    INTO (KEKO-MATNR, KEKO-WERKS)
    WHERE MATNR = P_MATNR AND
    WERKS = P_WERKS.
    IF SY-SUBRC <> 0.
    MESSAGE E023 WITH 'COST ESTIMATE NOT FOUND FOR '
    P_MATNR P_WERKS 'COMBINATION'.
    ENDIF.
    ENDSELECT.
    Surely I will reward you.
    Thanks in Advance,
    Raghu.

    Raghu,
    You can't validate on select-options, MARC will have N to 1 relation between Material and plant.
    You can do one thing, keep material as select-option and plant as parameter, now you can validate the materials on plant level.
    Reward if this helps,
    Satish

Maybe you are looking for

  • How to trace the save menu in cs3 using javascript?

    i can able to add menu items using the following syntex app.scriptMenuActions.add("Script 1"); but i dont know how to trace the save menu, i want to do certain action while the user try to save their active document. is it possible in script? thanks

  • NoClassDefFound error when using custom Java package in scripting QPAC

    Hi, I compiled a little Java-package (.jar), which contains a class that uses com.adobe.workflow.datatype.form.FormDataTypeInstanceImpl. I put my library in the lib folder of JBoss (...\server\all\lib). Then I'm was trying to invoke my custom class i

  • IPhoto Printing

    How can I print multiple pictures & have the images automatically scaled to fit the page? For example, I wanted to print 4 pictures on a 4x6 page because I like small pictures. When I did this, the pictures didn't automatically scale for the space. T

  • Populating a load-status table from SQL*Loader

    Hello, I am using SQL*LDR to load a table and once I'm done with this load I am supposed to populate a status table which will capture the 'SYSDATE', and the total number of rows I loaded in the other table. Can anybody help me? Thanks

  • ISight doesn't register in Adobe Connect

    Hi. I need to take part in regular webinars using Adobe Connect for work. I had no trouble participating on my brand new Macbook Air until I (stupidly) allowed by battery to go flat mid-meeting. When I powered my Mac up and re-entered the online meet