Unzipping downloaded files from Oracle

Which program must be used to unzip the downloaded files from Oracle??
I've run the batch file which creates the zip files, but Winzip doesn't recognize them.
Help Please!!
Thanks,
Rick

Just as a note, (I don't know if it will help you) After executing the batch file (especially for disks 1 & 2) it takes several minutes to complete the creation of the "single disk" zip file. And if you don't let it complete, winzip will not recognize it. The batch file will echo each steps completion, however the first echo takes a while to display, so it's easy to think that nothing is happening. I know I fell for it. So, try executing and then going for some coffee or something.

Similar Messages

  • How to download a file from Oracle UCM using OSB

    Hi,
    How can I download a file from Oracle UCM and save it on a filesystem using OSB 11.1.1.5.
    Thanks

    UCM supplies webservice interfaces which let you retrieve the filecontent by soap calls from UCM (http://ucmhost/_dav/cs/idcplg for example). (maybe you should enable some settings on ucm to have this webservice interface getting published).
    This services for example has 2 operations getFileByID and getFileByName.
    So you can just call these services from within OSB.
    After that you need to do some tests if you eitherway need to create a file-transport business-service and call this one from your proxy service or create a messageType proxyservice (binary)  which calls this file-transport business service to be able to write fo filesystem.
    I think for the OSB book i used a jca file adapter generated in Jdeveloper and used that one to write to filesystem.

  • Create XML file from Oracle DB

    Hi,
    I'm working in a task to create electronic billing for Mexico Rules, to do this; I need to create a XML source that will contain all the information requested from Oracle DB.
    For this reason, I'm looking how to create this XML file from Oracle DB.
    All this is for the new legislations rules in Mexico to use electronic billing.
    Please, if you have any reference about this, let me know.
    Thanks and regards.

    you may want to check out commands like xmlforest and xmlelement
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions221.htm
    copied from documentation
    Purpose
    XMLForest converts each of its argument parameters to XML, and then returns an XML fragment that is the concatenation of these converted arguments.
    •If value_expr is a scalar expression, then you can omit the AS clause, and Oracle Database uses the column name as the element name.
    •If value_expr is an object type or collection, then the AS clause is mandatory, and Oracle uses the specified c_alias as the enclosing tag. The c_alias can be up to 4000 characters.
    •If value_expr is null, then no element is created for that value_expr.
    Examples
    The following example creates an Emp element for a subset of employees, with nested employee_id, last_name, and salary elements as the contents of Emp:
    SELECT XMLELEMENT("Emp",
    XMLFOREST(e.employee_id, e.last_name, e.salary))
    "Emp Element"
    FROM employees e WHERE employee_id = 204;
    Emp Element
    <Emp>
    <EMPLOYEE_ID>204</EMPLOYEE_ID>
    <LAST_NAME>Baer</LAST_NAME>
    <SALARY>10000</SALARY>
    </Emp>

  • How to export an XML file from oracle database?

    plz help me its urgent requirement....could u pls tell me the step by step procedure for following questions...?how to export a data as an XML file from oracle database?
    thanks in advance,
    Bala.
    Edited by: user3523292 on Nov 14, 2008 5:43 AM

    user3523292 wrote:
    plz help me its urgent requirement....could u pls tell me the step by step procedure for following questions...?how to export a data as an XML file from oracle database?
    thanks in advance,
    Bala.
    Edited by: user3523292 on Nov 14, 2008 5:43 AMThis is a forum of volunteers. There is no "urgent" here. Nevertheless, a google search of 'xml oracle export' quickly lead me to this Oracle site:
    otn.oracle.com/sample_code/tech/xml/index.html
    I also see lots of hits when I search the documentation library at tahiti.oracle.com for 'xml'. This one in particular may be what you are looking for:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14252/adx_j_xsu.htm#ADXDK070

  • Download files from web to client

    Hi,
    I am trying to download txt file from the web and save it on the client using webutil_file_transfer.url_to_client. I am experiencing some problem which is connected to web util and says: The WEBUTIL object group is not available in this Form. WEBUTIL can not work.WebUtil error: oracle.forms.webutil.filetransfer.filetransfer.
    Can somebodey suggest what is the problem or any other solution for downloading files from url and saving them on the client?

    OK guys, i have done everything and web util finally (probably) works fine because i don't receive any error messages. Despite this i still cant download the file on the client machine.
    ps. I don't receive any error message
    here is the sample code , so you can try it if you want and suggest something
    DECLARE
    flag BOOLEAN;
    BEGIN
    flag :=
    webutil_file_transfer.url_to_client
    ('http://igor.pandurski.googlepages.com/CIIT-Molika-2007-WebServicesforInsur.pdf',
    'C:\1\'
    IF flag
    THEN
    MESSAGE ('DONE');
    MESSAGE ('DONE');
    ELSE
    MESSAGE ('NOT DONE');
    MESSAGE ('NOT DONE');
    END IF;
    END;

  • Generated pdf file from oracle reports show bad characters

    Hello all,
    Iam fighting with a problem with generated pdf file from oracle reports which show some bad characters. I was searching for some information but it didnt help...
    I have Oracle Database 11g R2 (or 10g R2) on Oracle Linux or Windows, Oracle forms and reports 6i (i know that is very old and not supported with 11gr2 but we are in this scenario).
    NLS parameters are set like this
    server:
    NLS_CHARACTERSET EE8MSWIN1250
    NLS_TERRITORY AMERICA
    NLS_LANGUAGE AMERICAN
    client:
    NLS_CHARACTERSET EE8MSWIN1250
    NLS_TERRITORY SLOVAK
    NLS_LANGUAGE SLOVAKIA
    When I run Oracle Reports it show perfect in display and when I try to print them, they are all good with good characters, but when I try to generate pdf file, some characters like č,š,ľ are not displaying corectly... This happen only when try to generate to pdf...
    I try to work with uifont.ali on client side but without any result. Fonts for reports were installed on client and server side... Can someone help me with this problem? Thank you very much for every advice.
    Martin

    Hi Sergiusz,
    Thank you for your reply. I look at what you wrote and try to make some test...
    1) For first I download FontForge, which can generate type1 font from true type. So I open FontForge and open my Arial.ttf font and use "Generate Fonts" to save my Arial.ttf font to pfb and pfm (whoch are need to set in uifont.ali). I have to change encoding, because my font has 2byte encoding so I reecondode the font from ISO10646-1 to ISO8859-2 and generate to pfb.
    2) Then I navigate REPORTS_PATH from regedit to my *.pfm and *.pfb files.
    3) I add these lines to end of my uifont.ali
    [ PDF:Embed ]
    Arial = "Arial.pfm Arial.pfb"
    ArialNarrow = "ArialNarrow.pfm ArialNarrow.pfb"
    4) Then I generate my report but nothing change... I check "Font used" in my pdf file, but there were not my fonts embedded I guess..
    I also try PDF:Subset, but it doesnt change anything... I try PDF aliasing to see if my uifont is working - this work very well, but I dont need to change font...
    Any other advice? Thank you so much to everyone!
    Martin

  • HT1338 I have a problem with opening downloaded files from the internet; zip types. Can you tell me an app to open these types of formats of files?

    I have a problem with opening downloaded files from the internet; zip types. Can you tell me an app to open these types of formats of files?

    It should unzip if you double-cick.
    What are you seeing happen when you do that?
    Select a .zip file in the Finder and Get Info (cmd-i). What is set for it to Open With. It should be Archive Utility.

  • About "Upload and download files from ADF into blob type colum."

    hi
    Using JDeveloper 10.1.3.3.0 I have tried the example available for download from this blog post by Jakub Pawlowski:
    "Upload and download files from ADF into blob type colum."
    at http://kuba.zilp.pl/?id=1
    First a thank you to Jakub for this interesting example.
    I have a question about a PDF file that I uploaded using the example.
    The file has a size of 10445518 bytes.
    After I upload that file, the blob column has a value with a size of 10445516 bytes, 2 bytes less.
    SQL> select file_name, dbms_lob.getlength(stored_file) from blob_table;
    FILE_NAME
    DBMS_LOB.GETLENGTH(STORED_FILE)
    ADF-DeveloperGuide-4GL-B25947_01.pdf
                           10445516If I download that file using the example, it has the same size as the blob value, 10445516 bytes.
    If I open the downloaded file, using Adobe Reader 8.1.1, it first shows this message:
    "The file is damaged but is being repaired."
    After that, there is not problem using the PDF file in Adobe Reader.
    I have tried this with both Internet Explorer 6 and Firefox 2.0.0.11.
    I have also tried this with other (smaller) files, and those upload and download correctly.
    question:
    Why are those 2 bytes lost during upload?
    many thanks
    Jan Vervecken

    Hi!
    I can only post you my code that works for me and as I said I had same problems but can't remember what solved them. My code:
      public void fileUploaded(ValueChangeEvent event)
        FacesContext fc = FacesContext.getCurrentInstance();
        UploadedFile file = (UploadedFile) event.getNewValue();
        if (file != null && file.getLength() > 0)
          // here I have some messages written and a call to the method on AM to save the uploaded file to the DB
      private BlobDomain newBlobDomainForInputStream(InputStream in)
        throws SQLException, IOException
        BlobDomain loBlob = new BlobDomain();
        OutputStream out = loBlob.getBinaryOutputStream();
        writeInputStreamToWriter(in, out);
        in.close();
        out.close();
        return loBlob;
      private static void writeInputStreamToWriter(InputStream in,
                                                   OutputStream out)
        throws IOException
        byte[] buffer = new byte[8192];
        int charsRead = 0;
        while ((charsRead = in.read(buffer, 0, 8192)) != -1)
          out.write(buffer, 0, charsRead);
       * Launch the upload - see fileUploaded() for actual upload handling.
       * @return null navigation event - we stay on this page
      public String UploadButton_action()
        if (this.getMyInputFile().getValue() == null)
          FacesContext context = FacesContext.getCurrentInstance();
          FacesMessage message =
            new FacesMessage(FacesMessage.SEVERITY_WARN, JSFUtils.getStringFromBundle("fileupload.emptyfielderror"),
                             null);
          context.addMessage(this.getMyInputFile().getId(), message);
        return null;
       * Setter for inputFile UI Component.
       * @param inputFile inputFile UI component
      public void setMyInputFile(CoreInputFile inputFile)
        this.myInputFile = inputFile;
       * Getter for inputFile UI Component.
       * @return inputFile UI component
      public CoreInputFile getMyInputFile()
        return myInputFile;
      }fileUploaded is a valueChangeListener on inputFile and UploadButton_action is as the name says the action for upload button.
    Hope this helps. If not, than your problem is probably not the same as mine was, although the message about file corrupted was the same.
    Next thing you can check in this case is if your file exceeds max file upload size. I don't know the exact default value, but if the file is too long I think this upload logic will upload only a part of the file and save it to the DB which can also lead to the same file corrupted error.
    You can set the max upload value in web.xml like this:
    <context-param>
    <!-- Maximum memory per request (in bytes) -->
    <param-name>oracle.adf.view.faces.UPLOAD_MAX_MEMORY</param-name>
    <!-- Use 5000K -->
    <param-value>5120000</param-value>
    </context-param>
    <context-param>
    <!-- Maximum disk space per request (in bytes) -->
    <param-name>oracle.adf.view.faces.UPLOAD_MAX_DISK_SPACE</param-name>
    <!-- Use 10,000K -->
    <param-value>15360000</param-value>
    </context-param>

  • Download files from the URL and store them in the table

    Hello,
    I want to download files from the URL and want to store them in the table.
    Can I do it using sql/pl-sql.
    Please help me on this.
    Thanks,
    Rajendra Yadav

    Never tried it before...
    Is this what you are talking about?
    http://www.oracle-base.com/articles/10g/file-upload-download-procedures-10g.php
    Cheers,
    Manik.

  • How to export a data as an XML file from oracle data base?

    could u pls tell me the step by step procedure for following questions...? how to export a data as an XML file from oracle data base? is it possible? plz tell me itz urgent requirement...
    Thankz in advance
    Bala

    SQL> SELECT * FROM v$version;
    BANNER
    Oracle DATABASE 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS FOR 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    5 rows selected.
    SQL> CREATE OR REPLACE directory utldata AS 'C:\temp';
    Directory created.
    SQL> declare                                                                                                               
      2    doc  DBMS_XMLDOM.DOMDocument;                                                                                       
      3    xdata  XMLTYPE;                                                                                                     
      4                                                                                                                        
      5    CURSOR xmlcur IS                                                                                                    
      6    SELECT xmlelement("Employee",XMLAttributes('http://www.w3.org/2001/XMLSchema' AS "xmlns:xsi",                       
      7                                  'http://www.oracle.com/Employee.xsd' AS "xsi:nonamespaceSchemaLocation")              
      8                              ,xmlelement("EmployeeNumber",e.empno)                                                     
      9                              ,xmlelement("EmployeeName",e.ename)                                                       
    10                              ,xmlelement("Department",xmlelement("DepartmentName",d.dname)                             
    11                                                      ,xmlelement("Location",d.loc)                                     
    12                                         )                                                                              
    13                   )                                                                                                    
    14     FROM   emp e                                                                                                       
    15     ,      dept d                                                                                                      
    16     WHERE  e.DEPTNO=d.DEPTNO;                                                                                          
    17                                                                                                                        
    18  begin                                                                                                                 
    19    OPEN xmlcur;                                                                                                        
    20    FETCH xmlcur INTO xdata;                                                                                            
    21    CLOSE xmlcur;                                                                                                       
    22    doc := DBMS_XMLDOM.NewDOMDocument(xdata);                                                                           
    23    DBMS_XMLDOM.WRITETOFILE(doc, 'UTLDATA/marco.xml');                                                                  
    24  end;                                                                                                                  
    25  /                                                                                                                      
    PL/SQL procedure successfully completed.
    .

  • [HELP] Download file from FTP server

    hi,
    I want to write a java program that can download and upload files from ftp server. Currently I only manage to upload a file to ftp server but i cant download file from ftp server. Here is the source code that only allow user to upload file. Anyone can give me some guidelines so that my program can download and also upload file? thx.
    import java.io.*;
    import java.net.*;
    public class FTPUpload {
    private static final int CTRLPORT = 21;
    private static Socket ctrlSocket;
    private static PrintWriter ctrlOutput;
    private static BufferedReader ctrlInput;
    private static byte[] localHostAddress;
    public final static String DIR = "C:\\zip\\";
    public static void main(String[] args) {
    try {
    String host = "192.168.1.1";
    String loginName = "testuser";
    String password = "password";
    String dirName = "/home/testuser";
    String fileName = "hello.zip";
    ctrlSocket = new Socket(host, CTRLPORT);
    localHostAddress = ctrlSocket.getLocalAddress().getAddress();
    ctrlOutput = new PrintWriter(ctrlSocket.getOutputStream());
    ctrlInput = new BufferedReader(new InputStreamReader(ctrlSocket.getInputStream()));
    ctrlOutput.println("USER " + loginName);
    ctrlOutput.flush();
    ctrlOutput.println("PASS " + password);
    ctrlOutput.flush();
    ctrlOutput.println("CWD " + dirName);
    ctrlOutput.flush();
    ctrlOutput.println("TYPE I");
    ctrlOutput.flush();
    FileInputStream fis = new FileInputStream(DIR + fileName);
    Socket dataSocket = dataConnection("STOR " + fileName);
    OutputStream outstr = dataSocket.getOutputStream();
    int n;
    byte[] buff = new byte[1024];
    while ((n = fis.read(buff)) > 0) {
    outstr.write(buff,0,n);
    dataSocket.close();
    fis.close();
    ctrlOutput.close();
    ctrlInput.close();
    ctrlSocket.close();
    }catch (Exception e) {
    e.printStackTrace();
    private static Socket dataConnection(String ctrlcmd)
    throws IOException,UnknownHostException {
    String cmd = "PORT ";
    ServerSocket serverDataSocket = new ServerSocket(0,1);
    for (int i=0;i<4;i++) {
    cmd = cmd + (localHostAddress[i] & 0xff) + ",";
    cmd = cmd + (((serverDataSocket.getLocalPort())/256) & 0xff)
    + ","
    + (serverDataSocket.getLocalPort() & 0xff);
    ctrlOutput.println(cmd);
    ctrlOutput.flush();
    ctrlOutput.println(ctrlcmd);
    ctrlOutput.flush();
    Socket dataSocket = serverDataSocket.accept();
    serverDataSocket.close();
    return dataSocket;
    }

    Or just use a java.net.URL("ftp://...) ..., get its input stream, and away you go ...

  • Download file from ftp server

    Can I download files from an ftp server by simply using the ip address or https:// url?    I've only gotten this to work by using the "ftp//:" address in previous projects and I'm not getting this to work in many different attempts. 
    Here is one...
     # FTP Config
    $FTPHost =
    "10.10.10.5"
    $Username =
    "admin"
    $Password =
    "12345678"
    $FTPFile =
    "test.log"
    # FTP Log File Url
    $FTPFileUrl =
    "ftp://" +
    $FTPHost +
    "/" +
    $FTPFile
    # Create FTP Connection
    $FTPRequest =
    [System.Net.FtpWebRequest]::Create("$FTPFileUrl")
    $FTPRequest.Credentials
    = New-Object System.Net.NetworkCredential($Username,
    $Password)
    $FTPRequest.Method =
    [System.Net.WebRequestMethods+Ftp]::DownloadFile
    $FTPRequest.UsePassive
    = $false
    $FTPRequest.UseBinary
    = $true
    $FTPRequest.KeepAlive
    = $false
    # Get FTP File
    $FTPResponse =
    $FTPRequest.GetResponse()
    $ResponseStream =
    $FTPResponse.GetResponseStream()
    $FTPReader =
    New-Object System.IO.Streamreader
    -ArgumentList $ResponseStream
    do
    Write-Host
    $FTPReader.ReadLine()
    while ($FTPReader.ReadLine()
    -ne $null)
    $FTPReader.Close()
    # Create FTP Connection
    $FTPRequest =
    [System.Net.FtpWebRequest]::Create("$FTPFileUrl")
    $FTPRequest.Credentials
    = New-Object System.Net.NetworkCredential($Username,
    $Password)
    $FTPRequest.Method =
    [System.Net.WebRequestMethods+Ftp]::DownloadFile
    $FTPRequest.UsePassive
    = $false
    $FTPRequest.UseBinary
    = $true
    $FTPRequest.KeepAlive
    = $false
    # Get FTP File
    $FTPResponse =
    $FTPRequest.GetResponse()
    $ResponseStream =
    $FTPResponse.GetResponseStream()
    $FTPReader =
    New-Object System.IO.Streamreader
    -ArgumentList $ResponseStream
    do
    Write-Host
    $FTPReader.ReadLine()
    while ($FTPReader.ReadLine()
    -ne $null)
    $FTPReader.Close()

    Hi!
    You don't need to specifically use an IP address. E.g can use
    $FTPHost = "myrandomserver.mycompany.com"
    $Username = "admin"
    $Password = "12345678"
    $FTPFile = "test.log"
    # FTP Log File Url
    $FTPFileUrl = "ftp://" + $FTPHost + "/" + $FTPFile

  • Uploading and downloading files from a web app (Urgent!!)

    Hi everyone:
    I'm developing an application in PL/SQL to upload and download files from an HTML webpage. I congured the document table and the parameters necessary in the DAD of my application.
    when I upload the file using my webpage that file info is automatically uploaded to the doc table. This is as far as I have gotten.
    I need to do the following:
    - Place the uploaded file into a column in another table in my database as part of a text message (think of it as an email message), and delete the file from the doc table (as this is thought to be a temp table that holds the file when uploaded from my webpage)
    - Retreive the file so that it can be downloaded from another web page.
    The file can be a PDF, WORD DOC, etc...
    I now that I can do this with InterMedia but I haven't figured out how :(
    Can anyone please point me to an example or some documentation that can guide me through the process.
    DB VERSION: 8.1.7
    IAS VERSION: 1.0.2.2
    Thanks,
    Carlos Abarca

    The idea was for you to look at the code and get an idea of how to access the BLOB in the document table. IF you look at the procedure
    insert_new_photo( new_description IN VARCHAR2,
    new_location IN VARCHAR,
    new_photo IN VARCHAR2 )
    It shows how to access the blob that is stored in the document table. You can then copy this blob to your own table using the DBMS_LOB package.
    Hope this helps,
    Larry

  • How to download files from Application Server of Unix o.s to local director

    Hi All,
    I am trying to download files from Apllication server of Unix operating Systems to local file in excel sheet format using a z-program.but whenever I am trying to use OPEN dataset ........
    it is showing sy-subrc = 8.
    Can I have any clew please.
    Thanks in advance,
    Regards,
    AMEER.

    Hi Sreekanth,
    Thanks a lot for quick reply.I have to download that files from z-program only. I am giving you my code below.
    *& Report  ZTRAK_DOWNLOAD                                         *
    REPORT  ZTRAK_DOWNLOAD  MESSAGE-ID ZCT                   .
    SELECTION-SCREEN BEGIN OF BLOCK DOWNLOAD WITH FRAME TITLE TEXT1.
      PARAMETERS :
           SERDIR LIKE RLGRAP-FILENAME DEFAULT '/usr/trak',
           LOCDIR LIKE RLGRAP-FILENAME DEFAULT 'C:\Trak'.
    SELECTION-SCREEN END OF BLOCK DOWNLOAD .
    SELECTION-SCREEN BEGIN OF BLOCK INFO2 WITH FRAME.
           SELECTION-SCREEN COMMENT 1(79) TEXT2.
           SELECTION-SCREEN SKIP.
           SELECTION-SCREEN COMMENT 1(79) TEXT3.
    SELECTION-SCREEN END OF BLOCK INFO2 .
    SELECTION-SCREEN BEGIN OF BLOCK INFO3 WITH FRAME.
           SELECTION-SCREEN COMMENT 1(79) TEXT4.
           SELECTION-SCREEN SKIP.
           SELECTION-SCREEN COMMENT 1(79) TEXT5.
            SELECTION-SCREEN SKIP.
           SELECTION-SCREEN COMMENT 1(79) TEXT6.
           SELECTION-SCREEN SKIP 1.
           SELECTION-SCREEN COMMENT 1(79) TEXT7.
           SELECTION-SCREEN SKIP 2.
           SELECTION-SCREEN COMMENT 1(79) TEXT8.
    SELECTION-SCREEN SKIP 1.
           SELECTION-SCREEN COMMENT 1(79) TEXT9.
    SELECTION-SCREEN END OF BLOCK INFO3.
    *- Internal Table to output data in Excel
    DATA: BEGIN OF tab_excel OCCURS 0,
            col1(50),
            col2(132),
            col3(255),
            col4(100),
            col5(100),
            col6(50),
            COL7(60),
            col8(30),
            col9(30),
            col10(30),
            col11(20),
            col12(15),
            col13(15),
          END OF tab_excel.
    DATA: FILE LIKE RLGRAP-FILENAME .
    DATA: W_DATASET(80).
    INITIALIZATION.
      TEXT1  = 'Download Reports'.
      TEXT2 = 'The Program downloads the reports generated by Trak'.
      TEXT3 = 'Utility from Server to Local PC.'.
      TEXT4 = 'Check the following before executing the Program.'.
      TEXT5 = '     1. A valid Server path is provided.'.
      TEXT6 = '     2. A valid Local PC path is provided.'.
      TEXT7 = '     3. Local PC has 10 MB free space.'.
      TEXT8 = 'The report can be executed in the forground.'.
    TEXT9 =
    'The report should be executed after execution of Transaction TRAK'.
    AT SELECTION-SCREEN.
    IF SERDIR EQ ''.
    MESSAGE E001(ZCT).
    ENDIF.
    IF LOCDIR EQ ''.
    MESSAGE E002(ZCT).
    ENDIF.
    START-OF-SELECTION.
    Download ABAP Development Summary Report
    FILE =  '\ABAP_Report_Developments.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/ABAP_Report_Developments.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download BDC Development Report
    FILE =  '\BDC_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/BDC_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Development Summary Report
    FILE = '\Developments_Summary_Report.XLS' .
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Developments_Summary_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Enhancement Development Report
    FILE =  '\Enhancement_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Enhancement_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download field exit Development Report
    FILE =  '\Field_Exit_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Field_Exit_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Frequency & Purpose Report
    FILE =  '\Frequency_And_Purpose_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Frequency_And_Purpose_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Function Group Developments Report
    FILE =  '\FunctionGroup_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/FunctionGroup_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Function Module Developments Report
    FILE = '\FunctionModule_Developments_Report.XLS' .
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/FunctionModule_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Include Developments Report
    FILE =  '\Include_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Include_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download UserGroup Developments Report
    FILE =  '\UserGroup_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/UserGroup_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Modified_Standard_SAP_Objects_Report
    FILE = '\Modified_Standard_SAP_Objects_Report.XLS' .
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Modified_Standard_SAP_Objects_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Include Developments Report
    *FILE =  '\Include_Developments_Report.XLS'.
    *CONCATENATE LOCDIR FILE INTO FILE.
    *W_DATASET = '/Include_Developments_Report.dat'.
    *CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    *PERFORM INIT.
    Download SAP Script Developments Report
    FILE =  '\SAP_Scipt_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/SAP_Scipt_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Transaction Developments Report
    FILE =  '\Transaction_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Transaction_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download User Exits Developments Report
    FILE =  '\UserExits_Reports.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/UserExits_Reports.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download ABAP Query Developments Report
    FILE =  '\ABAPQuery_Developments_Reports.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/ABAPQuery_Developments_Reports.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Functional Area Developments Report
    FILE =  '\FunctionalArea_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/FunctionalArea_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    MESSAGE S003(ZCT) WITH LOCDIR.
    END-OF-SELECTION.
    This routine checks whether file exists if yes downloads it to
    the Local PC
    FORM INIT.
    OPEN DATASET W_DATASET FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    DO.
       IF SY-SUBRC <> 0.
          EXIT.
       ENDIF.
       READ DATASET W_DATASET INTO  tab_excel.
       APPEND tab_excel.
       CLEAR tab_excel.
    ENDDO.
         PERFORM DOWNLOAD_FILE.
    ENDFORM.
    This routine downloads the data in an XL format on local PC
    FORM Download_File .
      CALL FUNCTION 'WS_DOWNLOAD'
                EXPORTING
                     FILENAME                = FILE
                     FILETYPE                = 'DAT'
                TABLES
                     DATA_TAB                = tab_excel
                EXCEPTIONS
                     FILE_OPEN_ERROR         = 1
                     FILE_WRITE_ERROR        = 2
                     INVALID_FILESIZE        = 3
                     INVALID_TYPE            = 4
                     NO_BATCH                = 5
                     UNKNOWN_ERROR           = 6
                     INVALID_TABLE_WIDTH     = 7
                     GUI_REFUSE_FILETRANSFER = 8
                     CUSTOMER_ERROR          = 9
                     OTHERS                  = 10.
        IF sy-subrc <> 0.
         message ''.       " Error in file transfer
        ELSE.
          CLEAR TAB_EXCEL.
          REFRESH TAB_EXCEL.
          FILE = ''.
          W_DATASET = ''.
        ENDIF.
    ENDFORM.
    I have created those files in Application Server running in another z-program in background mode.Then I am trying to download those files using above the program.I am creating those trak/Trak files manually and I can able to see those files in A.S level.But when downloading the same files I am facing the problem.
    regards,
    Ameer

  • How to download file from application server

    Hi Experts,
                  I developed report and execute in background mode. for this i used Open dataset transfer and close dataset . i got the requried output . But in this case user want downloaded file on presentation server so can anyone tell me How to download file from application server?
    i know it is possible through Tcode CG3Y. but i want code in program.

    This code will download a file to your Client package by package, so it will also work for huge files.
    *& Report  ZBI_DOWNLOAD_APPSERVER_FILE
    REPORT  zbi_download_appserver_file.
    PARAMETERS: lv_as_fn TYPE sapb-sappfad
    DEFAULT '/usr/sap/WBP/DVEBMGS00/work/ZBSPL_R01.CSV'.
    PARAMETERS: lv_cl_fn TYPE string
    DEFAULT 'C:\Users\atsvioli\Desktop\Budget Backups\ZBSPL_R01.CSV'.
    START-OF-SELECTION.
      CONSTANTS blocksize TYPE i VALUE 524287.
      CONSTANTS packagesize TYPE i VALUE 8.
      TYPES ty_datablock(blocksize) TYPE x.
      DATA lv_fil TYPE epsf-epsfilnam.
      DATA lv_dir TYPE epsf-epsdirnam.
      DATA ls_data TYPE ty_datablock.
      DATA lt_data TYPE STANDARD TABLE OF ty_datablock.
      DATA lv_block_len TYPE i.
      DATA lv_package_len TYPE i.
      DATA lv_subrc TYPE sy-subrc.
      DATA lv_msgv1 LIKE sy-msgv1.
      DATA lv_processed_so_far TYPE p.
      DATA lv_append TYPE c.
      DATA lv_status TYPE string.
      DATA lv_filesize TYPE p.
      DATA lv_percent TYPE i.
      "Determine size
      SPLIT lv_as_fn AT '/' INTO lv_dir lv_fil.
      CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'
        EXPORTING
          file_name      = lv_fil
          dir_name       = lv_dir
        IMPORTING
          file_size_long = lv_filesize.
      "Open the file on application server
      OPEN DATASET lv_as_fn FOR INPUT IN BINARY MODE MESSAGE lv_msgv1.
      IF sy-subrc <> 0.
        MESSAGE e048(cms) WITH lv_as_fn lv_msgv1 RAISING file_read_error.
        EXIT.
      ENDIF.
      lv_processed_so_far = 0.
      DO.
        REFRESH lt_data.
        lv_package_len = 0.
        DO packagesize TIMES.
          CLEAR ls_data.
          CLEAR lv_block_len.
          READ DATASET lv_as_fn INTO ls_data MAXIMUM LENGTH blocksize LENGTH lv_block_len.
          lv_subrc = sy-subrc.
          IF lv_block_len > 0.
            lv_package_len = lv_package_len + lv_block_len.
            APPEND ls_data TO lt_data.
          ENDIF.
          "End of file
          IF lv_subrc <> 0.
            EXIT.
          ENDIF.
        ENDDO.
        IF lv_package_len > 0.
          "Put file to client
          IF lv_processed_so_far = 0.
            lv_append = ' '.
          ELSE.
            lv_append = 'X'.
          ENDIF.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              bin_filesize         = lv_package_len
              filename             = lv_cl_fn
              filetype             = 'BIN'
              append               = lv_append
              show_transfer_status = abap_false
            TABLES
              data_tab             = lt_data.
          lv_processed_so_far = lv_processed_so_far + lv_package_len.
          "Status display
          lv_percent = lv_processed_so_far * 100 / lv_filesize.
          lv_status = |{ lv_percent }% - { lv_processed_so_far } bytes downloaded of { lv_filesize }|.
          CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
            EXPORTING          "percentage = lv_percent - will make it fash
              text = lv_status.
        ENDIF.
        "End of file
        IF lv_subrc <> 0.
          EXIT.
        ENDIF.
      ENDDO.
      "Close the file on application server
      CLOSE DATASET lv_as_fn.

Maybe you are looking for