Remove link for uploaded files in application

Hi all,
I've been following the tutorial on how to upload and download files in application at http://download-uk.oracle.com/docs/cd/B32472_01/doc/appdev.300/b32469/up_dn_files.htm. I have now created my own table which stores the uploaded files and can download them successfully. I would now like to add the ability to delete these files within the application and was wondering what the best way of doing this was?
I would like to add another column to the displayed report with a 'Remove file' link for each listed file, which when clicked would delete the file from the table. I've already tried using a similar method to the one used to upload the files (instead of uploading the file, the called procedure deletes it from the table using the specified ID), but this causes the application to display a blank page when the link is clicked, which I dont want (but does delete the file).
I would appreciate any suggestions.
Regards,
Dave

Dave,
See the login page:
http://htmldb.oracle.com/pls/otn/f?p=31517:101
There are details on how to access the application builder, where you can see how the
setup of that download, delete, upload application has been done.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://htmldb.oracle.com/pls/otn/f?p=31517:1
-------------------------------------------------------------------

Similar Messages

  • Program for uploading file on application server...

    Hi,
    I have created a program to upload a file from presentation server (local desktop) to application server. But in this program I have to specify the file length. What should I do in given program so that I can upload file of any length on application server ?
    *& Report  Z_FILE_DOWNLOAD_TO_APP_SERVER                               *
    * This Program can be used to move flat files to application server from presentation server.
    REPORT  Z_FILE_DOWNLOAD_TO_APP_SERVER.
    PARAMETERS: P_FILE       LIKE IBIPPARMS-PATH,
               P_FILE1(20000) default 'E:CONVERSIONFLAT' lower case.
    DATA: WS_FILE TYPE STRING.
    DATA: BEGIN OF T_DATA OCCURS 0,
           RECORD(20000),
         END OF T_DATA.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
      FILE_NAME           = P_FILE
    START-OF-SELECTION.
    WS_FILE = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
       FILENAME                      = WS_FILE
      FILETYPE                      = 'ASC'
    TABLES
       DATA_TAB                      = T_DATA
    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 <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    * Creating the file at Appl server............................
    OPEN DATASET P_FILE1 FOR OUTPUT IN TEXT MODE encoding utf-8.
    if sy-subrc ne 0.
    message e000(--) with 'Error in opening file'.
    endif.
    * Trasfer the records to file.............
    loop at t_data.
    transfer t_data to p_file1.
    endloop.
    close dataset p_file1.
    if sy-subrc eq 0.
    write: / 'Written the files at ', p_file1.
    write:/ 'Goto AL11 Transaction and then click on SAP Directory DIR_SAPUSERS to look for the file'.
    endif.
    Please advice.
    Regards,
    Rajesh

    Try declaring it as TYPE STRING. Not sure though.
    There are two predefined types in ABAP with variable length:
    STRING for character strings
    XSTRING for byte strings
    Thanks,
    SKJ

  • T-code for delete file from application server

    Hi all!
    Please, has any t-code for delete file from application server? For upload exist CG3Z, for download has CG3Y. And for delete? Has anyone?
    I need to delete file from application server in QA system and i don't want to create a program for this because i will need to transport a request from DEV to QA.

    I don't have contact with basis team.
    The FM EPS_DELETE_FILE support directory name with max 60 char. My dir. has more than that. I need a transaction for this.
    Anybody know if this transaction exist?

  • How to upload file from Application Server?

    Dear Friends,
    How to upload file from Application Server?
    Plz. with example...
    Regards,
    Dharmesh

    hi,
    check the code for upload from application server.
    tables: kna1.
    types: begin of s_file,
             customer type kna1-kunnr,
             country  type kna1-land1,
             name     type kna1-name1,
             region   type kna1-regio,
           end of s_file.
    *--Internal tables
    data: it_file type s_file occurs 0 with header line.
    *-- Selection screen
    selection-screen: begin of block b1 with frame title text-001.
    parameter: p_file type rlgrap-filename default 'C:/customer.txt'
    obligatory.
    selection-screen: end of block b1.
    *-- At selection screen
    at selection-screen on value-request for p_file.
    perform file_help using p_file.
    *-- Process File
    start-of-selection.
      perform upload_file using p_file.
    *-- write File data to o/p
    end-of-selection.
      perform write_data.
    *&      Form  file_help
    form file_help  using    p_p_file.
      data: l_filepath type ibipparms-path.
      call function 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
       importing
         file_name           = l_filepath
      p_p_file = l_filepath.
    endform.                    " file_help
    *&      Form  upload_file
    form upload_file  using    p_p_file.
      call function 'WS_UPLOAD'
       exporting
         filename                      = p_p_file
         filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
        tables
          data_tab                      = it_file
       exceptions
         conversion_error              = 1
         file_open_error               = 2
         file_read_error               = 3
         invalid_type                  = 4
         no_batch                      = 5
         unknown_error                 = 6
         invalid_table_width           = 7
         gui_refuse_filetransfer       = 8
         customer_error                = 9
         no_authority                  = 10
         others                        = 11
      if sy-subrc <> 0.
        message i001.
      endif.
    endform.                    " upload_file
    *&      Form  write_data
    form write_data .
      loop at it_file.
        write:/ it_file-customer, it_file-country, it_file-name,
                it_file-region.
      endloop.
      endform.
    regards,
    keerthi.

  • How to create link for pdf file in discoverer worksheet

    Hi All,
    I would like to create a link for pdf file into discoverer report (worksheet).
    So that i can open linked pdf file using worksheet link.
    Can any one tell me about this?
    Thanks
    Ravi

    Hi,
    I think the best way to do this is to use a database directory so that you can access your pdf file as a bfile. Then create a mod_plsql procedure that sets the mime type and downloads the pdf file. You then create a calculation in the EUL then returns the URL to your mod_plsql procedure. You can then include this calculation as a hyperlink in your worksheet.
    It is not as difficult as it sounds. Please let me know if you need anymore details.
    Rod West

  • Is there a size limit for uploading files?

    is there a size limit for uploading files?

    You have max 20GB storage.
    Upload anything you want up to that limit - be it one file or many.
    The only limit after that is the speed of your internet connection since extremely large files can take hours to upload.

  • Can i development program with EDK for uploading file to server?

    Can I development program with EDK for uploading file to server?How to avoid same name of files?
    Thanks!

    Hi ,
    thanks for the quick response.
    but the problem is supppose i have a excel sheet with 16 rows and 13 columns(so data).
    i am placing this file contents to appserver USING ABOVE fm.
    after that i am reading the file from appserver to create SO(idoc),i need  1row-3column data and 2row-2c data.like that.
    in unix we will get row data(after uploading to app server) as #mprn#2345# like this so easy to separate when reading.but in  MS NT OS 1row data getting stored in different rows in Appserver.so difficult to read.
    so the above mentioned FM is OS dependent or is there any way (any other FM) to get same kind of data in different OS.
    PLEASE SUGGEST OTHER WISE I NEED TO CODE BASED ON OS.
    REGARDS
    SARATH

  • Minimum filesize for uploaded file?

    One of the people in our department who is helping with course/content creation has brought up an interesting problem:
    For various reasons, up until now we have fed various pieces of video to our campus via a QT streaming server. Usually, we will embed a very small reference movie (usually around 4k) on a web page or in Blackboard. The reference movie will then kickstart the video stream. We have done this via podcasting in iTunes as well with success. When my colleague tried uploading one of the reference files into iTunesU, it acts as if it uploads, but will respond with a message stating : "0.00 of 0.00MB transferred" and the file never appears on the track list as it should. Other, larger files are uploading fine.
    So, my question is this:
    Is there some some sort of minimum size for an uploaded file? Is 4KB too small?
    and
    as a follow-up, will our stategy of using reference movies work within iTunesU? We know that the end-users will not be able to download the full video files.
    Thanks all
    Eric
    Dual 2GHz G5   Mac OS X (10.4.6)  

    One alternative you might consider is using a link on
    the iTunes U page. You could link to a page with the
    stream or to the stream itself with an http url.
    Links allow you to access any related content via a
    web browser.
    That is an option, but the idea here is to encourage the use of iTunes U to faculty and students as a media portal, and to encourage the use of iTunes in general. So basically, what I'm trying to accomplish is to argue why this needs to be a feature, instead of disabling it.
    I'll gladly argue the point with anyone that wants to take the side of the iTunes application NOT being a media player. I love Apple products, and I cringe at the notion of forcing our users to use Real to access academic streaming content from our Quicktime Streaming Server.
    It just doesn't make sense to force them to get some media files one way (using the "Get Song" button), and some (also Quicktime files) using a different metaphor. In fact, it goes against the metaphor of the entire iTunes Music Store interface of simply clicking the "Get" button to acquire the content.
    If the service only goes half way, there is little point in creating links on the iTunes U page linking back to a page referencing the streaming media. We (IT services on our campus) want to encourage the use of iTunes U, but why should we have users go to iTunes U to download the content when we could just post the links and content we would otherwise post within iTunes U within Blackboard, or as a podcast.
    Last fall we hosted a live event that we made accessible via our Quicktime Streaming server. I embedded a reference .mov file into one of our podcast feeds in iTunes (not iTunes U) so users could watch the even live within iTunes. Streaming... So it can be done. But iTunes U specifically prevents this format of a Quicktime .mov file from being uploaded.
    It would make my job much easier to advocate the use of iTunes as our campus media portal.
    Mark Leaman
    New Media Consultant
    Bowdoin College
    Brunswick, Maine
    207-725-3512
    17" iMac G5   Mac OS X (10.4.7)  

  • Problem in uploading file from Application Server

    Hi everyone,
    i got a problem in uplaoding a file from application server.i am having two folder (one folder name is current and another one is processed)in application server. In current folder i am having N no of files.I want to upload all the files names into one internal table and i want to process one by one file.After processing each file the file should be moved to processed folder and the files should not exist in current folder.All these process must be done everyday.Please rectify my problem asap.

    Ramesh,
    Take authorization from basis guy.
    Use the below code to get the list of files from require directory
    *& Report  ZDIRFILES                                                   *
    REPORT  ZDIRFILES    .
    PARAMETER: p_fdir            type pfeflnamel DEFAULT '/usr/sap/tmp'.
    data: begin of it_filedir occurs 10.
            include structure salfldir.
    data: end of it_filedir.
    *START-OF-SELECTION
    START-OF-SELECTION.
    Get Current Directory Listing for OUT Dir
      call function 'RZL_READ_DIR_LOCAL'
           exporting
                name     = p_fdir
           tables
                file_tbl = it_filedir.
    Now in internal table "it_filedir"  will have all your files.
    For moving and deleting
    report zrich_0001.
    Parameters: d1 type localfile default '/usr/sap/TST/SYS/fld1/Data1.txt',
                d2 type localfile default '/usr/sap/TST/SYS/fld2/Data1.txt'.
    data: begin of itab occurs 0,
          rec(20) type c,
          end of itab.
    data: wa(20) type c.
    start-of-selection.
      open dataset d1 for input in text mode.
      if sy-subrc = 0.
        do.
          read dataset d1 into wa.
          if sy-subrc <> 0.
            exit.
          endif.
          itab-rec = wa.
          append itab.
        enddo.
      endif.
      close dataset d1.
      open dataset d2 for output in text mode.
      loop at itab.
        transfer itab to d2.
      endloop.
      close dataset d2.
      delete dataset d1.
    Check below FM if required
    To move the file to archive directoryuse FMs 'PFL_COPY_OS_FILE'
    To Delete 'EPS_DELETE_FILE'.
    Don't forgot to reward if useful

  • Problem while uploading file from application server to internal tab in BG

    Hi all,
    When i see the file  in application server.data is like this
    #################00\);_(#####}#-#}###############################00\);_(#####}#-#}###############################00\);_(*#####}#-#}#########
    ###################}###}#############A#############???#00\);_(*#################;_(@_)  ########???#        ########???#        ########???###
    #######???#########}###}#############)##############}##00\);_(*#################;_(@_)  ############        ############        ##############
    ###################}#A#}#############:##############}##00\);_(#################;_(@_)  }###}##############################00\);_(*##########
    #######???#########}#-#}#############F#################00\);_(#####}###}#############@#################00\);_(#################;_(@_)  #####
    ###################}#-#}#############3#################00\);_(#####}#U#}#############E#################00\);_(#################;_(@_)  #####
    Because the csv which is uploaded has dropdowns and some formattings.
    when download from tcode cg3y i am getting correct file
    When try to use open(binary mode) and read dataset i getting data as it is (junk).
    i need to process in background.
    Any help.
    Rhea.

    upload file to string format
    begin of ty_tab,
    string type char200,
    end of ty_tab.
    loop at ty_tab into string
    use statement replace string into tab deliminated fromat(particular occurance in string)
    now call class to break string at tab into fields
    endloop.
    DATA : BEGIN OF i_data OCCURS 0,
            data(200)    TYPE c,       "To hold Upload file data
           END OF i_data.
    OPEN DATASET v_str FOR INPUT
                              IN TEXT MODE
                              ENCODING DEFAULT IGNORING CONVERSION ERRORS.
        IF sy-subrc EQ 0.
          DO.
    *Read a line from input file
            READ DATASET v_str INTO i_data-data.
            IF sy-subrc NE 0.
              EXIT.
            ENDIF.
    *Append record to an internal table
            APPEND i_data.
            CLEAR: i_data.
          ENDDO.
    *Close the file
          CLOSE DATASET v_str.
    *---Start of inserti
    LOOP AT i_data.
            REPLACE ALL OCCURRENCES OF '"' IN i_data WITH '#'.
            SPLIT i_data AT cl_abap_char_utilities=>horizontal_tab
                                INTO i_doc-pvaudt
                                     i_doc-pvpate
                                     i_doc-vecatc
                                     i_doc-vhvend
                                     i_doc-vhidt8
                                     i_doc-vhinvn
                                     i_doc-vhhexp
                                     i_doc-vhiref.

  • To Delete the uploaded file in Application Server

    Hi Friends,
    I developed an BSP Application displaying the results from ITAB though Iterator, for which , each row there is feature to upload a particular file in the Application Server, where I stored the file  path into a database table field.  .When I delete the the row, I am successfully get rid of the entire row including the file path.
    My Question.
    1. How to delete the uploaded file of the Application Server ?
    Please mail me in this regard.
    Regards
    CSM Reddy

    Hi,
    you have the keyword and you have the documentation. What is your problem?
    Search in the forums with keyword "delete dataset", there are lots of threads about this.
    Example
    Deletion of dataset in applicaiton server
    deleting file from AL11 Tcode
    Best regards
    Renald

  • Uploading file to Application Server using Tcode: CG3Z

    Hi Friends,
    I am facing a weird problem when uploading a file(PIPE delimited format) to application server
    using the transaction CG3Z. The data is getting truncated at the end of each row and the file size
    doesn't match with the one i had uploaded.
    Can anyone resolve this issue.
    Thanks in advance.
    Murthy

    Hi Friends
    I wrote the custom program to upload the file on application server.
    Thanks for your time.
    Murthy

  • Store links to uploaded files in mysql database

    Hello. What I'm trying to do is, let a user upload a file to my server, and lets other users download those files. I don't want to store the files in a database, because that will slooow things down. What I was wondering is how I would be able to store links to the files in the database, and let other users view them, and download them. I'm using apache tomcat, and MySQL.
    Any help would be appreciated. Thanks.

    I'm using a .jsp that uploads the files directly to my ROOT.
    This is the code for it:
    <html>
    <head><title>upload</title></head>
    <body>
    <%@ page import="java.io.*"%>
    <%
        String contentType = request.getContentType();
        if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) {
                    DataInputStream in = new DataInputStream(request.getInputStream());
                    int formDataLength = request.getContentLength();
                    byte dataBytes[] = new byte[formDataLength];
                    int byteRead = 0;
                    int totalBytesRead = 0;
                  while (totalBytesRead < formDataLength) {
                      byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
                         totalBytesRead += byteRead;
                    String file = new String(dataBytes);
                    String saveFile = file.substring(file.indexOf("filename=\"") + 10);
                  saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
                  saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1,saveFile.indexOf("\""));
                    int lastIndex = contentType.lastIndexOf("=");
                    String boundary = contentType.substring(lastIndex + 1,contentType.length());
                    int pos;
                 pos = file.indexOf("filename=\"");
                 pos = file.indexOf("\n", pos) + 1;
                 pos = file.indexOf("\n", pos) + 1;
                 pos = file.indexOf("\n", pos) + 1;
                   int boundaryLocation = file.indexOf(boundary, pos) - 4;
                    int startPos = ((file.substring(0, pos)).getBytes()).length;
                    int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
                    String filepath=session.getServletContext().getRealPath("/")+saveFile;
                    FileOutputStream fileOut = new FileOutputStream(filepath);
                fileOut.write(dataBytes, startPos, (endPos - startPos));
                fileOut.flush();
                fileOut.close();
                out.println("File saved as " +saveFile);
    %>
    <!-- Starts Here -->
    <form method="post" ACTION="upload.jsp" name="uploadForm" ENCTYPE='multipart/form-data'>
    <input type="file" name="uploadfile" />
    <p>
        <input type="submit" name="Submit" value="Submit">
        <input type="reset" name="Reset" value="Reset">
        <input type="hidden" name="action" value="upload">
    </p>
    </form>
    <!-- Ends Here -->
    </body>
    </html>
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Interface Mngr: Option for Uploading file from presentation or unix server

    Hi all,
      I want to upload file through interface manager where the file can be on the presentaion server or the unix server. How do i achieve the same? I need to create parameters for 'Filename' and 'Unix Filename'. Either of the 2 will be chosen at a time. But how do i retrieve the respective file?

    Hi!
    For handling a file on the apllication server (unix), you have to use the OPEN DATASET, CLOSE DATASET commands.
    For handling the files on the presentation server (local PC), you have to use the upload/download method (GUI_UPLOAD, GUI_DOWNLOAD function elements).
    You can make 2 parameters in your ABAP program like this:
    PARAMETERS: p_f_app LIKE rlgrap-filename.
    PARAMETERS: p_f_pre LIKE rlgrap-filename.
    both is filled - error
    IF NOT p_f_app IS INITIAL AND
    NOT p_f_pre IS INITIAL.
    MESSAGE E001(ZERROR).
    ENDIF.
    both is empty - error
    IF p_f_app IS INITIAL AND
    p_f_pre IS INITIAL.
    MESSAGE E002(ZERROR).
    ENDIF.
    IF NOT p_f_app IS INITIAL.   "application server
    open dataset...
    ENDIF.
    IF NOT p_f_pre IS INITIAL.   "presentation server
    call function 'gui_upload'...
    ENDIF.
    Regards
    Tamá

  • Issue in confirmation links for personal data ESS application (CA)

    Hi All,
    We have implemented EXIT button configuration for ESS applications and the Exit button along with 'Go to Home page' link is navigating to custom created page in portal.
    The configuration done earlier for ESS applications like Address Update, Family Member/Dependents works fine.
    We got a new service added (Personal data) & tried configuring the Exit button for this application also.
    Some how the exit button doesnt seem working for Canada besides it working for US.
    Please help in figuring out if there is any cause of the Exit button not working for personal data application for molga 07 specially. Adding to it, the links for confirmation screen are also not working for the same application
    Appreciate your help.
    Thanks

    Hi,
    As per your Req.....
    Its seems to be the Services exits that are county specific Services .........mease the Molga ( country  Code )  is set for this services is "US"
    That Y its working fine .....
    But as per your REq you want this Services working  for the Molga 07 ...
    I thikn for this you need to set the Molga 07 in the contry specific home pages......
    Then it will work fine

Maybe you are looking for

  • Code Analyzer

    I am currently using CF 4.5 on a Windows 2000 server and am trying to migrate to MX7 on Windows 2003. The code analyzer does not seem to want to analyze code on a remote server, so after I installed developer version and copied all the files over to

  • BFILE로 저장된 데이타 정보를 확인하는 방법

    제품 : ORACLE SERVER 작성날짜 : 2002-04-12 BFILE로 저장된 데이타 정보를 확인하는 방법 ========================================== Purpose Bfile 로 저장된 column의 경우 database 내에서는 file path만 알 수 있다. 여러가지 package를 사용하여 이 bfile로 저장된 data의 정보를 확인하는 방법을 알아보자. Example $ vi bfiletest

  • Need a phone that can upgrade to V5.0 for bridge

    I have the BB Curve 8310 - V4.5 on the Rogers network - there is no upgrade to 5.0 for this phone.  A friend offered to swap for the BB flip phone 8230, and my daughter has the 8130 she would trade - but I can't seem to find out if either of these ph

  • Where is my free iWork download for new iOS device?

    I just received my new iPhone 5S today.  It was advertised that it would automatically prompt you to download the free iWork applications however I received no such download!

  • I can't get my itunes library to upload to icloud.

    I am trying to up and running with imatch and icloud.  I am attempting to get everything off my laptop to my ipad.  Everything is turned to the on position.  itunes just gives me an icon stating that an error had occured in uploading.