File download/upload howto

Regarding the Fil upload/download at
http://www.oracle.com/technology/products/database/htmldb/howtos/howto_file_upload.html
How can I add a 'Delete' button next to each file in the Download report region to delete that file from the wwv_flow_files table?
Thanks

You need to pass the ID of the file you want to
to delete. Take a look at
http://htmldb.oracle.com/pls/otn/f?p=11602:1 .
How can I pass the id of the file? I thought that would be in the session state :DEL (which is what I aliased the id column to in the report region), thats why I did 'delete from wwv_flow_files where id=:DEL'
Few questions, if you dont mind.
1. How do you get your After header process code to show up on the page?
2. Where do you set your :P1_DEL?
3. How do you get your 'Delete File' text box to be displayed in that fashion? My after header process's success messges just gets displayed with a green checkmark next to it. How can I change the formatting like you did?
4. Where did you get the 'Upload' button gif? Does that come with HTMLDB? Or did you pick it up from the Internet and upload it?
5. Regarding the upload button, is that displayed in a 'region position' or 'among the region's items'? I have never seen it in that position!
Thanks for your continued help. I appreciate it.

Similar Messages

  • Peformance Turning for File Download / Upload with Enabled SharePoint Audit

    Greetings all, may I ask your help for Peformance Issues?
    Background:
    I tried to create a ASP.NET Web Page to download/upload/list SharePoint file and deployed to IIS website in same application server (will NOT use web part as some users are NOT allowed to direct access confidential workspace)
    Besides, for Audit Log record purpose, the page will impersonate (without password) the logged in user:
    SPUserToken userToken = web.AllUsers[user].UserToken;
    SPSite s = new SPSite(siteStr, userToken);
    For File Listing, the web service can provide fast response, and we are using service A/C for connection (as no auting for listing, but require audit for file download upload)
    Several implemeation options tested for File Downloiad / Upload, but issues occured and finding listed below:
    Issues
    1) SharePoint Object Model
    When I open Site (using new SPSite), it's too slow to respond. (under 1s for all operations, but require 10~50s for open SPSIte. e.g.
    using(SPSite s = new SPSite(siteStr) //50s
    How can I download/upload file without open SPSite object (using SharePoint object model, but user token should be kept to allow SHarePoint identifiy user actions. e.g. Updated by Tom, NOT system administrator)?
    2) SharePoint default web service
    For file download, I tried to use SharePoint Web Service for download file, it's quick but how can SharePoint record the audit log to downloaded user, and not service A/C? ( e.g. View by Tom, NOT system administrator)
    With Windows SSO solution, please note system should NOT prompt to ask user password for use impersonation
    3) HTTP Request API (for file download)
    As mentioned in point 2, if the system cannot get password from user, SharePoint also recorded service A/C in audit log... ><
    Thank you for your kine attention.
    .NET Beginner 3.5

    Thank you for prompt response, please find my reply with Underline:
    Hi,
    Maybe I'm not quite clear about the architecture you have now.
    Is your asp.net application deployed in separate IIS site but in the same physical server as SharePoint?
    Yes
    "we are using service A/C for connection", can you please explain the 'A/C'?
    Domain User, Local Admin and also SharePoint Service Admin A/C
    Opening SPSite is relatively slower but shouldn't take 50 sec. However it depends on your server hardware configuration. You should meet the minimum hardware requirements for SharePoint.
    Assigned double resources based on minimum hardware requirements.
    For details, 50s is the load test result. But for other SharePoint operation, it takes around/under 3s reponse time.
    Are you using SharePoint Audit log? Exactly If so then why don't you just put the hyperlink to the documents in your asp.net page. User maybe have to login once in SharePoint site but
    it depends on your security architecture. For example if both of your sites in local intranet and you are using windows integrated authentication, SSO will work automatically  User is NOT allowed
    to access SharePoint site/server (not implemented for sepreate server yet, as performance issues occured for
    separate site in same server)  directly from Internet, the
    middle server with web interface created for user request.
    Whatever I understands gives me the feeling that you download the file using HTTPWebRequest C# class. However regarding security it depends on how authentication is setup in asp.net web site and in sharepoint. If both site uses windows integrated security
    and they are in the same server, you can use the following code snippet:
    using (WebClient webClient = new WebClient())
    webClient.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
    webClient.DownloadFile("file ur in sharepoint", "download directory");
    Thanks, will try and reply later
    But still, as I've mentioned, not quite clear about the whole architecture.
    A) Request Handling
    1) User use browser to request file listing and/or download file (hereafter called: File Download Request) from custom ASP.NET page (Let's say In Server 1, IIS 1)
    2) ASP.NET page  or File Handler ashx (Server 1, IIS 1) call custom web service, SharePoint deault/OOTB web service or using SharePoint Object Model to access SharePoint Document Library (in Server 1,
    IIS 2)
    3) Both SharePoint and IIS Web Site
    (Server 1, IIS 1 & IIS2) using the same service A/C
    4) The web service , File Handler return file obeject to IIS1
    5) IIS 1 reply File Download Request to user
    B) Application Architecture (In testing environment)
    1) no load balancing
    2) 1 DB server (Server 2)
    3) 1 Application Server (with IIS 1 - ASP.NET, IIS 2, SharePoint Web Site with default SharePoint Web Service, IIS 3 SharePoint Admin Site & IIS 4 Custom SharePoint Web Service)
    4) Sepreate AD Server (Server 3)
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com
    .NET Beginner 3.5

  • Download & upload of an excel file

    Hi,
          I have a requirement where the data needs to be downloaded into an excel file and user will upload the same excel file after making required changes in the data.
    I have used 'GUI_DOWNLOAD' to download the data to excel file. I have tried to upload the same excel file using 'ALSM_EXCEL_TO_INTERNAL_TABLE' and 'TEXT_CONVERT_XLS_TO_SAP' function modules. But it is giving exceptions if I upload the same downloaded file directly. If I copy the data in the downloaded file to another excel file and upload this file, it is working.
    I have tried using 'GUI_UPLOAD' with field separator which was also specified in 'GUI_DOWNLOAD' but in this case the data is uploaded into the internal table like,.
    ###&jkj, 0000 .......
    Please suggest any other alternative.
    Thanks & Regards,
    Vishnu Priya

    Hi,
    You may like to give a try to this FM
    RH_START_EXCEL_WITH_DATA.it will take care of your formatting problem.
    go thru this program..
    *& Report  RHVERI_EXCEL_DOWNLOAD                                       *
    REPORT  rhveri_excel_download.
    DATA: g_excelpath    TYPE string,
          g_excelversion TYPE string,
          g_codepage     TYPE abap_encod,                       "XMK#754232
          g_return_code  TYPE i,                                "XMK#754232
          BEGIN OF gt_data OCCURS 0,
            f1 TYPE char20,
            f2 TYPE char20,
            f3 TYPE char20,
            f4 TYPE char20,
          END   OF gt_data.
    END-OF-SELECTION.
      gt_data-f1 = 'C1'.
      gt_data-f2 = 'C2'.
      gt_data-f3 = 'C3'.
      gt_data-f4 = 'C4'.
      APPEND gt_data.
      gt_data-f1 = '10'.
      gt_data-f2 = '11'.
      gt_data-f3 = '12'.
      gt_data-f4 = '13'.
      APPEND gt_data.
      gt_data-f1 = '20'.
      gt_data-f2 = '21'.
      gt_data-f3 = '22'.
      gt_data-f4 = '23'.
      APPEND gt_data.
      "XMK#754232
      gt_data-f1 = 'AEIOU'.                                     "#EC NOTEXT
      gt_data-f2 = 'aeiou'.                                     "#EC NOTEXT
      gt_data-f3 = '*?#/&§$#'.                                 "#EC *
      gt_data-f4 = 'äöüÄÖÜßaé'.                                 "#EC *
      APPEND gt_data.
      "XMK#754232
      CALL FUNCTION 'RH_CHECK_EXCEL_SUPPORT'
        IMPORTING
          excel_exe_path      = g_excelpath
          excel_version       = g_excelversion
        EXCEPTIONS
          no_batch            = 1
          internal_error      = 2
          excel_not_installed = 3
          wrong_frontend_os   = 4
          OTHERS              = 5.
      IF sy-subrc <> 0.
        WRITE / 'Testaufruf von Excel endete mit Fehlercode:'(002).
        WRITE: sy-subrc, / sy-msgv1, sy-msgv2, sy-msgv3, sy-msgv4.
        MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ELSE.
        WRITE: / 'Pfad von Excel'(005), g_excelpath.
        WRITE: / 'Version von Excel'(006), g_excelversion.
      ENDIF.
      "XMK#754232
      IF cl_abap_char_utilities=>charsize <> 1.
        WRITE / 'Unicode system'(007).
        CALL METHOD cl_gui_frontend_services=>get_saplogon_encoding
          CHANGING
            file_encoding = g_codepage
            rc            = g_return_code
          EXCEPTIONS
            OTHERS        = 1.
        IF sy-subrc <> 0.
          g_codepage = '4110'.
        ENDIF.
        WRITE: / 'Codepage is'(009), g_codepage.
      ELSE.
        WRITE / 'Non-Unicode system'(008).
      ENDIF.
      "XMK#754232
      CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
       EXPORTING
         data_filename             = 'TEST.DAT'
         data_path_flag            = 'W'
       DATA_ENVIRONMENT          =
         wait                      = 'X'
         data_table                = gt_data[]
       EXCEPTIONS
         no_batch                  = 1
         excel_not_installed       = 2
         internal_error            = 3
         cancelled                 = 4
         download_error            = 5
         no_authority              = 6
         file_not_deleted          = 7
         OTHERS                    = 8.
      IF sy-subrc <> 0.
        WRITE / 'Aufruf von Excel endete mit Fehlercode:'(003).
        WRITE: sy-subrc, / sy-msgv1, sy-msgv2, sy-msgv3, sy-msgv4.
        MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ELSE.
        WRITE / 'Aufruf von Excel lieferte keinen Fehler.'(004).
      ENDIF.
    Regards,
    Amit

  • In dreamweaver mx 2004 and dreamweaver cs4, how I configure, when download/upload do not ask me to include DEPENDED FILES but act without including ?

    in dreamweaver mx 2004 and dreamweaver cs4, how I configure, when download/upload do not ask me to include DEPENDED FILES but act without including ?

    Open the Preferences panel (Edit menu on Windows, Dreamweaver menu on a Mac), and select the Site category. There are two checkboxes there for dependent files. Make sure both are selected. The Dreamweaver default is NOT to upload/download dependent files. You need to click Yes, if you want the dependent files to be included.

  • I need some information about File Download & File Upload

    Hi  All,
    Can any one help me on this, I need some information about File Download & File Upload.
    I read tutorial abt file upload and download but some of methods in tutorial are deprecated so i need clear information abt File upload and Download, if possible Code examples.
    Thanks
    Ragards
    Ravi Golla

    Hi Ravi
    Check out thses links for examples:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
    /docs/DOC-8661#22 [original link is broken]
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/202a850a-58e0-2910-eeb3-bfc3e081257f
    Otherwise you can simply follow this code for file download
    Use the code like this.
    1) Create the button and bind the action for it.
    2)then write this code in the action.
    3) do not write any thing in the init method.
    try {
    final byte[] content = this.getByteArrayFromResourcePath("C:
    xyz.properties");
    final IWDCachedWebResource resource = WDWebResource.getWebResource(content, WDWebResourceType.UNKNOWN);
    try {
    final IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(resource.getAbsoluteURL(), "WD_Filedownload", false);
    window.open();
    catch(Exception e)
    wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);
    5) writr the method getByteArrayFromResourcePath
    //@@begin others
    private byte[] getByteArrayFromResourcePath(String resourcePath)
    throws FileNotFoundException, IOException {
    FileInputStream in = new FileInputStream(new File(resourcePath));
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    int len;
    byte[] part = new byte[10 * 1024];
    while ((len = in.read(part)) != -1) {
    out.write(part, 0, len);
    in.close();
    return out.toByteArray();
    //end
    Similarly for file upload
    Similarly for upload in to server path also do the same
    IWDAttributeInfo attInfo =
    wdContext.getNodeInfo().getAttribute("upload");
    binaryType =
    (IWDModifiableBinaryType) attInfo.getModifiableSimpleType();
    uploadedName = binaryType.getFileName();
    File filename =new File("
    <server name>
    <folder name>
    "+uploadedName ); );
    try {
    FileOutputStream out = new FileOutputStream(filename);
    out.write(b);
    out.close();
    } catch (FileNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();

  • TAx Reporter Temse Files Download Automation

    Hi,
    I have a reuiqrement to download the Temse files generated in Tax Reporter. I have completed the code and it works fine if we run the program in foreground. But when I run the same program in background some Temse files downloaded have junk characters. If I download the same Temse file in foreground it works fine.
    There seems to be some issue with the FM when I run my progam in background.
    I have searched SDN and SAP Notes for any clues but did not get any.
    REPORT  ZPHOP_TEMSE  NO STANDARD PAGE HEADING
                      LINE-SIZE 1023
                      LINE-COUNT 65
                      MESSAGE-ID zz.
    DATA: BEGIN OF tape OCCURS 1,
             DATA(2000),
          END OF tape.
    DATA: force_ascii type c VALUE 'T'.
    DATA:  BEGIN OF int_msgs2 OCCURS 10,
             errnum(2) TYPE c,
             text1(8) TYPE c,
             text2(60) TYPE c,
           END OF int_msgs2.
    DATA: BEGIN OF g_int_temse OCCURS 0,
             dname    LIKE TST01-dname,
             dpart    LIKE TST01-dpart,
             dcretime LIKE TST01-DCRETIME,
             dcreater LIKE TST01-DCREATER,
          END OF g_int_temse.
    DATA: record_length  TYPE i VALUE 275,
           data_length    TYPE i,
           convert_to_ebcdic,
           filesize TYPE i,
           number_of_records TYPE i VALUE 1,
           filetype(3) VALUE 'BIN',
           conv TYPE REF TO cl_abap_conv_out_ce,
           dline TYPE REF TO data,
           dtab TYPE REF TO data,
           p_compid(4),
           p_pswd(8),
           g_str(2000),
           uc_filename TYPE string.
    DATA: l_nm_fixed_record.
    CONSTANTS: c_lpath TYPE pathintern VALUE 'ZOUT'.
    TABLES: TST01, ZPHOPFLS, ZTEMSE_LOG, V_5UXY_A.
    FIELD-SYMBOLS: <dtab> TYPE STANDARD TABLE,
                   <dline> TYPE ANY.
    INCLUDE: dbpnpcom.           " No logical database        Do not modify!
    INCLUDE: zphoptop,           " Top Include                Do not modify!
             zphopfil.           " File inlcude               Do not modify!
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-T01.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(30) text-001.
    SELECT-OPTIONS  s_temse FOR TST01-dname NO INTERVALS.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE text-T02.
    SELECT-OPTIONS  s_cai   FOR TST01-DCREATER NO INTERVALS.
    SELECT-OPTIONS  s_date  FOR sy-datum.
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE text-T03.
    PARAMETERS: p_ifid   LIKE t9aoa-if_id MODIF ID DIS ,
                p_fileid LIKE t9aoa-file_id MODIF ID DIS,
                p_unixf(60)  LOWER CASE MODIF ID DIS,
                p_uxdir  TYPE pathextern LOWER CASE MODIF ID DIS,
                p_dstfil(45) LOWER CASE MODIF ID DIS.
    SELECTION-SCREEN END OF BLOCK B3.
    PARAMETERS: p_skip AS CHECKBOX.
    DATA: ws_unixr LIKE p_unixf,
          ws_trans LIKE p_unixf.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'DIS'.
          screen-output = '1'.
          screen-input  = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    INITIALIZATION.
      p_ifid = 'PAYFLS'.
      p_compid = 'HR00'.
      p_fileid = '01'.
      p_unixf = 'AFS'.
      p_pswd = 'chevr123'.
      p_skip = 'X'.
    -End of Initialization--
      PERFORM get_physical_path.
      FORMAT COLOR COL_HEADING.
      WRITE: /01 text-t04,
              10 sy-pagno,
              41 text-t05,
             110 text-t06,
             123 sy-datum.
      WRITE: /01 text-t08,
              14 sy-repid,
             110 text-t07,
             125 sy-uzeit.
      FORMAT COLOR OFF.
      SKIP.
      WRITE: /(20) text-T21       CENTERED COLOR COL_HEADING,
              (15) text-T22       CENTERED COLOR COL_HEADING,
              (20) text-T23       CENTERED COLOR COL_HEADING,
              (15) text-T24       CENTERED COLOR COL_HEADING,
              (40) text-T25       CENTERED COLOR COL_HEADING.
    START-OF-SELECTION.
    *Do not allow background processing
    *Check if the Temse file and CAI both are entered
    IF NOT S_TEMSE IS INITIAL AND NOT S_CAI IS INITIAL.
       MESSAGE W999 WITH TEXT-E01.
    ELSEIF S_TEMSE IS INITIAL AND S_CAI IS INITIAL.
       MESSAGE W999 WITH TEXT-E02.
    ENDIF.
    Collect all temse filenames from TST01 into an internal table.
    IF NOT s_temse IS INITIAL.
       SELECT dname dpart dcretime dcreater FROM TST01 INTO TABLE g_int_temse
              WHERE dname in s_temse
              AND   dpart EQ '1'.
    ELSE.
       SELECT * FROM TST01
              WHERE DCREATER in s_cai
              AND   DPART EQ '1'.
         IF TST01-DCRETIME(8) GE s_date-low
             AND TST01-DCRETIME(8) LE s_date-high.
            MOVE-CORRESPONDING TST01 TO g_int_temse.
            APPEND g_int_temse.
         ENDIF.
       ENDSELECT.
    ENDIF.
    SORT g_int_temse BY DNAME DPART DCRETIME.
    LOOP AT g_int_temse.
    Check if the temse file is already processed in ZTEMSE_LOG table.
      SELECT SINGLE * FROM ZTEMSE_LOG
             WHERE DNAME = g_int_temse-dname.
      IF sy-subrc EQ 0.
    error. Temse already processed
         CONTINUE.
      ENDIF.
    Check if the temse file bieng processed is the eligible temse file
      SELECT SINGLE * FROM V_5UXY_A
             WHERE TSOBJ = g_int_temse-dname.
      IF sy-subrc EQ 0.
         SELECT SINGLE * FROM ZPHOPFLS
             WHERE TAXAU = V_5UXY_A-TAXAU
             AND   TXFRM = V_5UXY_A-TXFRM.
         IF sy-subrc EQ 0.
    Generate the filename for the target destination
            CONCATENATE ZPHOPFLS-FILENAME '.' sy-datum '.' sy-uzeit INTO p_dstfil.
         ELSE.
    error. Script not maintained in ZPHOPFLS table
            CONTINUE.
         ENDIF.
      ELSE.
    error. Temse file is not the latest processed file.
         CONTINUE.
      ENDIF.
      CALL FUNCTION 'RP_TS_OPEN'
        EXPORTING
          tsobj = g_int_temse-dname
         versn = g_int_temse-dpart
          empfg = 'RPUTSVUM'.
      COMMIT WORK.
      REFRESH tape.
      CLEAR   tape.
    Einlesen von der TemSe
      CALL FUNCTION 'RSTS_READ'
        EXPORTING
           PARTS1BY1 = 'X'
        TABLES
          datatab = tape.
      CALL FUNCTION 'RSTS_CLOSE'.
    Read the 1st line which is supposed to contains info important for
    the downloading procedure. The syntax of the line is :
      SAPxxxnnnyyyy  - the 1st 3 char 'SAP' indicates this line contains
    download related info. xxx can either be 'ASC' (for ASCII) or 'EBC'
    (for EBCDIC). nnn is the length of each record, e.g. 128 for SSA disk
    format, 275 for SSA tape format etc. yyyy can either be 'CRLF' (each
    record is delimited by CRLF) or blank (no CRLF).
    After processing the 1st line, the line is deleted from the internal
    table. Downloading begins on the 2nd line.
      READ TABLE tape INDEX 1.
      IF tape-data(3) EQ 'SAP'.
        IF tape-data+3(3) EQ 'EBC'.
          convert_to_ebcdic = 'x'.
        ELSEIF tape-data+3(3) EQ 'ASC'
              AND force_ascii EQ 'T'.
          filetype = 'ASC'.
        ENDIF.
        IF tape-data+6(3) NA '*'.
          record_length = tape-data+6(3).
        ELSE.
          record_length = tape-data+13(4).
        ENDIF.
        IF tape-data+9(4) EQ 'CRLF'.
          data_length = record_length + 2.
        ELSE.
          data_length = record_length.
        ENDIF.
        DELETE tape INDEX 1.
      ELSE.
        data_length = record_length.
      ENDIF.
    Transfer the Temse file data to Unix file.
          PERFORM transfer_file.
    Update the Log table with the temse details.
          ZTEMSE_LOG-dname = g_int_temse-dname.
          ZTEMSE_LOG-txcmp = V_5UXY_A-taxau.
          ZTEMSE_LOG-txfrm = V_5UXY_A-txfrm.
          ZTEMSE_LOG-filename = ws_unixr.
          ZTEMSE_LOG-DCREATER = g_int_temse-dcreater.
          INSERT ZTEMSE_LOG.
        WRITE: /(20) ZTEMSE_LOG-dname,
                (15) ZTEMSE_LOG-txcmp,
                (20) ZTEMSE_LOG-txfrm,
                (15) ZTEMSE_LOG-dcreater,
                (40) ZTEMSE_LOG-filename.
    ENDLOOP.
    *&      Form  get_physical_path
          Get Physical directory name for the given logical path name
    FORM get_physical_path .
      CALL FUNCTION 'ZFILE_GET_PATH_NAME'
        EXPORTING
          LOGICAL_PATH               = c_lpath
        IMPORTING
          FILE_NAME_PATH             = p_uxdir
        EXCEPTIONS
          PATH_NOT_FOUND             = 1
          MISSING_PARAMETER          = 2
          OPERATING_SYSTEM_NOT_FOUND = 3
          FILE_SYSTEM_NOT_FOUND      = 4
          OTHERS                     = 5.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " get_physical_path
    *&      Form  TRANSFER_FILE
    FORM transfer_file.
      p_unixf = 'AFS'.
    Concatenate Date with Unix File name
      CONCATENATE p_unixf '.' p_compid '.' p_ifid  '.' sy-datum '.' sy-uzeit INTO ws_unixr.
    Concatenate Unix Directory with Unix File for Outbound
      CONCATENATE p_uxdir ws_unixr INTO p_unixf.
      PERFORM open_files USING p_unixf.
    LOOP AT tape.
         g_str = tape-data(record_length).
        TRANSFER g_str TO p_unixf LENGTH record_length.
        IF sy-subrc <> 0.
          MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
           ' Error Transferring to: ' p_unixf.
        ENDIF.
    ENDLOOP.
      PERFORM close_files USING p_unixf.
    ENDFORM.                    " TRANSFER_FILE
    Can anyone please check and tell me what I need to overcome this problem.

    Hi Bhaskar,
    I also have the same requirement to upload TemSe files in to application server.
    In FDTA tcode after we enter company code and click on enter.
    In the second screen checking and line item and go to edit and click on download button.
    Here we see a popup with default file name, and when we say ok the file will get downloaded into C:\.....
    Here our req is to upload the file automatically pick up via batch job and place it in the in to the application server and from there it should be placed in the Netwrok server (UNIX).
    Pls provide me with suitable code so that i can finish it off.I tried a lot but did not work.
    Thanks.

  • To display non US-ASCII filename in file download dialog - Help Needed

    Hi,
    Our application supports to upload a file with name in chinese/japanese language. When user tries to download filedownload dialog box is appearing with the filename as junk characters.
    How to solve this issue to display the filename as uploaded.
    Thanks in advance
    ~kans

    bsampieri, issue is in display of the file name in
    file download dialog.
    ~kansI understood that, but my thought was that the HTTP headers content type containing a charset of UTF-8 might help. I don't know for sure, but otherwise, I don't know how to get the browser to otherwise not assume ASCII.

  • What is the difference between: "Place..." or "Add files for Upload..."?

    Where can I get information about the detailed differences between the commands "Place..." and "Add Files for Upload..." of the Files menu?
    Understand that in both cases the files are linked and not embedded. But what further differences are there?
    I came across this issue because widget 039 (Animated Image Rollovers) from MuseThemes works only if you use the "Add Files for Upload..." option.
    Thanks,
    Daniel

    Hi Daniel,
    There are a few differences in both the options-
    Place is used to add content to page (rendered) while Add Files for Upload... is used to upload files to your site but not on page (not rendered).
    Placed images are published to /images folder on the server while images added using Add Files for Upload... option are published to the /assets folder on the server.
    Placed images have a chance of getting renamed (if resized/interpolated in Muse) upon publish while images added using Add Files for Upload... retain their names.
    Place can be used to add limited file formats like jpg/png/psd/swf/oam etc while you can upload almost any type of file using Add Files for Upload...
    You don't see Placed content in the Hyperlinks dropdown for linking while files added using Add Files for Upload... show up in the Hyperlinks dropdown so that you may link to them and allow download.
    Both serve different purposes and Add Files for Upload... is preferred by Widget Developers because it gives more control over uploaded content and assurance that file location and name will be as expected.
    Hope the above give you clarity on the basic difference.
    Cheers,
    Vikas

  • Issue with File Download(messageDownload) on Search Page.

    Hi,
    I created a custom OAF search page which fetches values from one table. The document in getting stored in my custom table in a BLOB colums and NOT in FND_LOBS.
    The table has 3 collumns along with others:
    1st is primary key (Record_Seq) ==> number data type
    2nd to store actual file name (File1Name) ==> varcahar2 data type
    3rd to store the actual uploaded data (File1Data) ==> BLOB data type
    The reason for having the “File1Name” is so that I can display the original file name of the document that was uploaded, instead of just the “view” in the search page results .
    On the File1Data BLOB and created a messageDownload for that under query results table with following details:
    ID : File1Data
    ItemStyle : messageDownload
    FileMIME Type : pdf
    Datatype : BLOB
    View Instance : LacEmpExposureVO1
    view Attribute : File1Name
    File View Attribute : File1Data
    When I click on the "File1Name" data hyperlink, it is opening only the first document corresponding to the first record in the search page results.
    For example, If my search page returns 10 rows then when I click on the file1name on any row, It is open the first row file name only.
    I have a primary key column(RECORD_SEQ) in the Table / EO / VO which is displayed in the search page results.
    Also one weird thing is happening:
    If I try to do this more than 2 times then it is opening the update page with the first record from the search page results…
    I tried to print the context and it is nul the first time, But the second time then context is changing to "update". Dont know how this is happening????
    Any advice is greatly appreciated as it is very crucial for me to get this resolved ASAP. I have looked at several forums and did a lot of things as advised in the forums . But nothing seems to work for me.
    Thanks,
    Mir
    CO code for the search page
    ===========================
    if (pageContext.getParameter("Create")!= null)
    System.out.println("Into LacEmpExposureCO in PROCESS FORM REQUEST with Context of CREATE");
    pageContext.setForwardURL
    ("OA.jsp?page=/lac/oracle/apps/lac/lacempexposure/webui/LacEmpExposureCreatePG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, //Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    else if ("update".equals(pageContext.getParameter(EVENT_PARAM)))
    System.out.println("Into LacEmpExposureCO in PROCESS FORM REQUEST with Context of UPDATE");
    System.out.println("LacEmpExposureCO ==> RecordSeq in PROCESS FORM REQUEST is: " + RecordSeq);
    HashMap params = new HashMap(1);
    params.put("RecordSeq", RecordSeq);
    pageContext.setForwardURL
    ("OA.jsp?page=/lac/oracle/apps/lac/lacempexposure/webui/LacEmpExposureUpdatePG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    params,
    true, //Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO, // Do not display breadcrumbs
    OAWebBeanConstants.IGNORE_MESSAGES);
    else {           
    String strEvent = pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM);
    System.out.println(strEvent);
    System.out.println("Into the last ELSE part in LacEmpExposureCO.java");

    Duplicate post -- Issue with File Download(messageDownload) on Search Page.

  • File download in CRM WEB UI

    Hi ,
    I am using web ui .
    I have a requirement of converting an internal table to xml file & download it to application server .
    I have converted the file to xml but not able to save the file to application server  .I am currently using CL_CRM_FRONTEND_SERVICES=>GUI_DOWNLOAD method to download on application server  , but it is throwing an exception of "flush" but at the same time if i am calling this method from a report through SE38, it is working fine .
    Is there any other method that is to be used for CRM WEB UI to download a file on desktop / application server .
    Manish

    GUI DOWNLOAD will not work in WebClient, as it is a completely different technology. You will have to use some kind of technology that uses HTTP. Just like in the Internet.
    When you have got your content ready, maybe it is an option for you to transform it to XSTRING. There are some function modules in FM Group SCMS_CONV. Once you have got the XSTRING you can set it on a response object of class CL_HTTP_RESPONSE. Create a new one.
    Now declare yourself an URL. In your viewcontroller you have got access to the variable RUNTIME.
    concatenate runtime->application_url '/234234234.xml' into lv_url'
    when you have both you can upload the content to the server cache:
    cl_http_server=>server_cache_upload( url = lv_url response = lr_response ).
    now you can access the content under the created URL lv_url.
    On the BSP page you could for instance do this using javascript:
    window.open( lv_url ).
    This should open a dialog for the user with save option.
    cheers Carsten

  • Mulitple File Downloads in AIR

    ** EDIT **
    Just tested. I was throttling the downloads to 28kbps. Think
    there must be a timeout on the file functions, as when it was reset
    without throttling, the file downloaded 100%. Is there a way to
    reset/remove a timeout on a URLStream?
    Good morning all.
    I'm having trouble with a file download component I've
    written. It worked fine debugging, but when testing an installed
    version of the application, there seems to be a problem with the
    loop, and files not completely downloading.
    I have tested, and one file in the loop is writing to the
    directory (event.complete action) at about 45%.
    How can I check if the total bytes downloaded is the same as
    total available, and if not, force it to carry on the download for
    that particular item?
    The code for the page is below:
    public function Update():void {
    if(appModel.fileArrCol.length > 0) {
    var urlReq:URLRequest = new
    URLRequest(appModel.fileArrCol[0][1].toString());
    trace(urlReq.url);
    urlStream = new URLStream();
    urlStream.addEventListener(IOErrorEvent.IO_ERROR,
    onStreamError);
    urlStream.addEventListener(ProgressEvent.PROGRESS,
    progressHandler);
    urlStream.addEventListener(Event.COMPLETE,
    fileTransferHandler);
    urlStream.load(urlReq);
    private function fileTransferHandler(event:Event):void {
    urlStream.readBytes(fileData, 0, urlStream.bytesAvailable);
    var fileLoc:String = appModel.fileArrCol[0][2].toString() +
    appModel.fileArrCol[0][0].toString();
    var file:File =
    File.applicationStorageDirectory.resolvePath(fileLoc);
    var fileStream:FileStream = new FileStream();
    fileStream.addEventListener(Event.CLOSE, fileClosed);
    fileStream.addEventListener(IOErrorEvent.IO_ERROR,
    onStreamError);
    fileStream.openAsync(file, FileMode.WRITE);
    fileStream.writeBytes(fileData, 0, fileData.length);
    fileStream.close();
    trace("File " + appModel.fileArrCol.length + ": " +
    appModel.fileArrCol[0][0].toString());
    private function onStreamError(event:IOErrorEvent):void{
    //Alert.show("Invalid Username or Password!","Warning");
    this.showCloseButton =true;
    btnUpdate.visible = true;
    trace(event.text);
    private function progressHandler(event:ProgressEvent):void {
    /* bar.setProgress( Number(event.bytesLoaded /
    event.bytesTotal), 1 ); */
    bar.setProgress(event.bytesLoaded,event.bytesTotal);
    progLabel.text = "Downloading " +
    Math.round(event.bytesLoaded / 1024) + " kb of " +
    Math.round(event.bytesTotal / 1024) + " kb " +
    (appModel.fileArr.length - 1) + " files remaining";
    private function fileClosed(event:Event):void {
    // run a progress bar or sqlite table update here
    appModel.fileArrCol.removeItemAt(0);
    if (appModel.fileArrCol.length > 0){
    Update();
    } else {
    progLabel.text = "Uploads Complete";
    var thisServerVersion:String =
    appModel.fileDownloadServerVersion;
    var thisDescription:String =
    appModel.fileDownloadDescription;
    var thisDownloadDate:String = appModel.fileDownloadDate;
    // store the file download details within the database table
    if(appModel.checkFileDownloadHistory(thisServerVersion).valueOf()
    > 0) {
    // a record matches the version number in the xml. do
    nothing
    } else {
    appModel.storeFileDownloadHistory(thisServerVersion,thisDescription,thisDownloadDate);
    // close the box down
    PopUpManager.removePopUp(this)
    public function init():void{
    btnUpdate.visible = false;
    this.showCloseButton = true;
    if (appModel.urlAvailable){
    Update();
    }else{
    Alert.show("No Network Connection Detected","Message");
    this.showCloseButton =true;
    btnUpdate.visible = true;
    public function titleWindow_close(evt:CloseEvent):void {
    PopUpManager.removePopUp(this)
    The application reads the number of files from an xml file on
    the server. That works fine, but I think the loop is wrong. In
    debug, it traces the file names without a problem
    Please please please can someone help me? I need to get this
    sorted and resolved by this lunchtime.
    Many thanks in advance,
    Matt

    http://kb.mozillazine.org/Unable_to_save_or_download_files
    Separate Issue;
    Your System Details shows;
    Installed Plug-ins
    Shockwave Flash 16.0 r0
    Shockwave Flash 11.9 r900
    Having more than one version of a program may cause issues.
    Grab the uninstaller from here:
    '''[http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-windows.html Uninstall Flash Player | Windows]'''
    '''[http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html Uninstall Flash Player | Mac]'''
    Then reinstall the latest version.
    Flash Player '''v16.0.0.257<br>https://www.adobe.com/products/flashplayer/distribution3.html'''
    Shockwave Director '''v12.1.6.156 http://get.adobe.com/shockwave/'''

  • Error while opening PDF file downloaded  from database Blob column

    Hi All,
    I am working on jdev 11.1.1.4.0.
    In my use-case I am using filedownload Actionlistner on a link to get the PDF file stored in the database in blob field. These files are being uploaded from other use-case in adf only.
    After getting the dialog box to open/save/cancel for the PDF file when i click on open then i am getting an error *'Adobe Reader could not open 'abc.pdf' because it is either not a supported file type*
    or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly docoded)' for some files , and to my surprise I am able to open some files.
    When I open these PDF files separately from desktop I am able to view the content of each and every file in adobe reader.
    I dont know where the problem exactly lies , while uploading/downloading the file . Any ideas/thoughts to resolve this issue?
    Thanks
    Kanika

    Thanks a lot Timo...!!!
    I checked the PDF file downloaded directly from the blob column in DB, there only it is corrupted so must be the problem in uploading the file. I am checking the code line by line,, but no problem in setting the file content type,size etc.
    Here is the code snippet ..
    byte[] buff;
    buff = new byte[(int)length]; -- Length is the file size
    int bytesRead = is.read(buff);
    for (int i = 0; bytesRead < buff.length; i++) {
    // int b = is.read();
    int b = is.read();
    if (b == -1)
    break;
    buff[i] = (byte)b;
    BlobDomain blobDomian = new BlobDomain((buff));
    TestVORow = (TestVORow Impl)TestVO.createRow();
    if(blobDomian != null) {
    TestVORow.setAttachment(blobDomian);
    am.getTransaction().commit();
    This seems to be Ok to me..the same issue, file is still corrupting.
    Any thoughts from your side ???
    Thanks
    Kanika
    The problem is resolved.
    Changes made are instead of
    InputStream is;
    used ... BufferedInputStream bis ;
    and after
    for (int i = 0; bytesRead < buff.length; i++) {
    // int b = bis.read();
    int b = bis.read();
    if (b == -1)
    break;
    buff[i] = (byte)b;
    bis.close(); // use this close bufferedInput Stream.
    Able to open each and every file now..Thanks for your suggestions Timo and Frank.
    Edited by: Kanika on Mar 6, 2012 3:15 AM

  • CommandButton and commandLink behaving differently for file download

    Hello there,
    Hopefully someone can help - I have looked through the existing queries and can't just find what I'm after.
    I have a main record with asociated files - the files are uploaded through my web app and are downloaded from the same page that lists the files in a dataTable. I have a series of commandLinks that display the file names - a user selects the file and it downloads.
    The problem I have is that when a user downloads a file then immediately trys to upload another, they are prompted to download the file that they have already previously downloaded. If however I replace the commandLinks for commandButtons the application behaves correctly.
    I have seen an associated link that mentions similar behaviour (http://blogs.sun.com/tor/entry/creating_downloadable_files), however I do not want to use the command buttons in this manner, and I use an actionListener rather than an action so I may retrieve information from the list of dynamically created files. I am not receiving any errors, just the strange behaviour with commandLinks.
    My code is as follows:
    public void downloadFile(ActionEvent ev) {
    UIData fileList = findParentHtmlDataTable(ev.getComponent());
    AssociatedFile associatedFile = (AssociatedFile) fileList.getRowData();
    String downloadPath = "download path retrieved here...";
    try {
    byte[] fileData = InternalUtil.readFile(downloadPath);
    HttpServletResponse response =
    (HttpServletResponse) getFacesContext().getExternalContext().getResponse();
    response.setHeader("Content-disposition", "attachment; filename=\"" +
    associatedFile.getName() +
    response.setContentLength(fileData.length);
    response.setContentType(associatedFile.getContentType());
    ServletOutputStream out = response.getOutputStream();
    out.write(fileData);
    getFacesContext().getApplication().getStateManager().saveSerializedView(getFacesContext());
    getFacesContext().responseComplete();
    } catch (FileSystemException e) {
    getFacesContext().addMessage("null", new FacesMessage("Error downloading file: " +
    e.getMessage()));
    } catch (IOException e) {
    getFacesContext().addMessage("null", new FacesMessage("Error downloading file: " +
    e.getMessage()));
    Any help would be greatly appreciated!
    Thanks in anticipation, Carl

    Which JSF version are you using? Try upgrading to newer version if needed. http://javaserverfaces.dev.java.net

  • DownloadServlet or alternative method for file download

    I have searched the forums for this topic and have seen one other posting from someone having the same problem (with no response). I can not get the oracle.jsp.webutil.fileaccess.DownloadServlet to fully function. Using the file access example code that is installed with iAS and following the instructions in the manual "Oracle Application Server Containers for J2EE JSP Tag Libraries and Utilities Reference 10g (9.0.4)" I can get the file upload to work just fine (both to a file and to the database). However with the file download it stops short of working. It will access the DownloadServlet and list the files that have been uploaded, but when you try to follow the link that it creates you get a "400 Bad Request"
    If you look at the URL it creates I see what I think is a problem
    Here is a clip of code from dbBeanDownloadExample.jsp that creates the URL
    The following files were found:
    <% Enumeration fileNames = dbean.getFileNames();
    while (fileNames.hasMoreElements()) {
    String name = (String)fileNames.nextElement();
    %>
    <br><a href="<%= servletPath + name +
        ?"+FileAccessUtil.SRCTYPE_PARAM + "=" + dbean.getSourceType() +
    "&"+FileAccessUtil.TABLE_PARAM + "=" + dbean.getTable() +
    "&"+FileAccessUtil.PREFIX_COL_PARAM + "=" + dbean.getPrefixColumn() +
    "&"+FileAccessUtil.DATA_COL_PARAM + "=" + dbean.getDataColumn() +
    "&"+FileAccessUtil.FNAME_COL_PARAM + "=" + dbean.getFileNameColumn() +
    "&"+FileAccessUtil.FILETYPE_PARAM + "=" + dbean.getFileType() %> ">
    <%= name %></a>
    <% } %>
    and here is one of the URLs
    http://iasserver.here.com:7779/ojspdemos/servlet/download/beanexample\fields.txt?srcType=database&fileType=binary&table=fileaccess&prefixCol=fileprefix&fileNameCol=filename&dataCol=data
    The problem I see is the fileprefix (from the upload) "beanexample" and the filename "fields.txt" is appended to the end of the servlet "download", while the rest of the parameters to the DownloadServlet are passed in the proper manner "srcType=database". I have been unable to find any documentation on the DownloadServlet so I don't know if there are setters for the fileprefix or the filename.
    This example code has been out for sometime, I know it was with iAS 9.0.2. Has any one been successful implementing the download of a file from the database using the oracle.jsp.webutil.fileaccess.HttpDownloadBean or the tag?
    Certainly Oracle must test this stuff before they release it. At some point I think this must have work.

    Larry, the DownloadServlet certainly worked at some point of time as ensured by the automated tests. It should work all the time, I believe, unless......
    The problem I see is the fileprefix (from the upload)
    "beanexample" and the filename "fields.txt" is appended to > the end of the servlet "download", while the rest of the
    parameters to the DownloadServlet are passed in the proper > manner "srcType=database". I have been unable to find any
    documentation on the DownloadServlet so I don't know if
    there are setters for the fileprefix or the filename.A nice observation. That is the root cause of the problem, I believe. Actually, the documentation is right there in the example dbBeanDownloadExample.jsp. You should use
      String name = (String)fileNames.nextElement()).replace('\\','/');
    as in the example instead of
      String name = (String)fileNames.nextElement();
    Well, I will check if this point of changing '\' to '/' have been made explicitly in the documentation. That kind s of tiny point is sometimes really a killer.
    Hope this helps.

  • Any way to set up iWeb pages for file download / sharing?

    I have been using .Mac Homepage to set up several web pages to share audio files with my clients. I have been able to set up a different web page for each client, each with their own password, with files there for them to download.
    Is there a way to duplicate this using iWeb now that .mac homepage sites are going away? I don't want the audio to stream, I just want to make the files available for downloading, and don't see any page templates in iWeb '08 for file downloading.
    I know that I can use mobileme's new file sharing feature to email links to individual files, but this doesn't work as well as having all the files downloadable on one or more web pages.

    If you have all of the sites in one domain file you should be able to upload only the changed pages but it's been a while since I used 08 so don't remember. You can move each site into its own domain file so that only that site is edited and published. And if you're publishing directly to mobile me only the edited files should be uploaded.
    I use iWebSites to manage over 75 individual sites.. It lets me create multiple sites and multiple domain files.
    If you have multiple sites in one domain file here's the workflow I used to split them into individual site files with iWebSites. Be sure to make a backup copy of your original Domain.sites files before starting the splitting process and move it to another location on your HD until you're satisfied the separation process is completed and what you want.
    This lets me edit several sites and only republish the one I want. Make sure you're running the lastest version of iWeb, 2.0.4 I believe.
    An example of files set up for immediate download is Toad's Cellar. Each linked is linked to a zipped file which downloads when clicked on. The site could be password protected if so desired.
    OT

Maybe you are looking for

  • Upgraded to Windows 8 can't find my photos

    I re-installed elements 6 due to an upgrade to Windows 8 and now I can't find my photos

  • Problem in Calling Subscreens

    Hi, my main screen number is 1001 and in that screen i have a tabstrip with subscreens 1002,1003,1004,1005,1006.Each tab has an ALV... When i click on excute button in my main screen 1001 then i need to call all the subscreens and all the ALV's shoul

  • Installing 8i Personal

    I have Windows ME. The software from Prentice Hall for my class is Oracle 8i Pesonal Edition for Win 98; however, it says Win 98 or higher. Any known conflicts. I get the setup dialog box, then click install and then next and the box just leaves. Is

  • HT5824 Contacts, iCloud, iphone, computer ISSUES

    Hello everyone, I am rather new to the iPhone and iCloud stuff....I am having a little trouble with my contacts and my phone and my iCloud account.  I have just recently deleted some contacts from my iCloud account on my computer, but it hasn't updat

  • GetInstance

    is this method a part of an API for a particular class or interface? or is it just a commonly given name for a method in a singleton design pattern? Can someone explain to me how it works? for instance: Calendar c = Calendar.getInstance();is that jus