Download Excel file in the Unix directory of Application server

Hi Friends,
I have a requirement  of downloading the Excel file in the Unix directory path of the application server,i just need your inputs,it would be great help if you can send any sample coding for downlading the file in the Unix directory?
Regards
Dinesh

You can use the following fm
RZL_READ_FILE
or
use OPEN DATASET FOR INPUT.

Similar Messages

  • How to check whether a file is present in the UNIX directory of app. server

    Hi,
            I am creating files in the UNIX directory in the application server using :
                       CONCATENATE '/sapmnt/RD1/interfaces/client670/'
                       p_fname '.CSV' INTO w_filename.
               OPEN DATASET w_filename FOR OUTPUT IN TEXT MODE.
              LOOP AT t_output1.
                      TRANSFER t_output1 TO w_filename.
              ENDLOOP.
             CLOSE DATASET w_filename.
    I am unable to check whether a file with the same name exists or not. How to check the duplicate state of the file.

    You can use the following fm
    RZL_READ_FILE
    or
    use OPEN DATASET FOR INPUT.

  • How can I download a file over the internet from a WebDAV server?

    I am trying to download a file over the internet from a WebDAV server. I've tried doing it with Datasocket as suggested in these articles,
    <a href="http://digital.ni.com/public.nsf/websearch/f3cc5f7e60a75cb2862567e700696abf?opendocument">Retrieving an Unformatted Text File via FTP or HTTP Using DataSocket</a>
    <a href="http://digital.ni.com/public.nsf/websearch/4FA09E7B3674DA34C1256BD400555C41?OpenDocument">Download a Text File from a Password Protected URL Using DataSocket</a>
    but all I get is error 1181 (protocol unrecognized by Datasocket).
    I know I have the URL correct, because I can put it into a web browser and it works fine - I can download the file manually.
    But I want to have a LabVIEW program do the download automatically.
    I have the internet toolkit, but don't have the foggiest clue how to use it, and am using LabVIEW 7.1
    I am a bit out of my depth here, so any advice welcome.
    Regards,
    Mark.

    MIG,
    What is the URL to the website? Is it an FTP site? The articles you referenced are for specific transfer protocols. If the stie you're trying to get to doesn't follow these protocols, then you'll get the error you're seeing. You may have to use ActiveX to control IE and download the files programmatically.
    Chris C
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

  • Deleting all files in the Unix directory

    I was trying to create a DB in Unix. I had to remove all the files in the udump directory and I saw that there were files in thousands. I was trying to find a command to remove all of them to make the directory empty, so that I could create the udump file for Database creation. However, I couldn't find a command to remove all of them at once. I tried to google but evey website speaks about just these commands..
    rm filename
    or
    rm -r * directory_name
    This doesn't solve my problem as these commands are deleting one file at a time and not all the files at once within the directory. Can someone tell me the solution?

    Hi,
    First go to the directory where you want to delete all the files and folders. then
    rm -fr directory_name
    rm -r is not neccessary that it will delete the files and folder.
    thx
    pradeep

  • How to place the Excel fine in the UNIX Directory

    Hi Gurus,
    We are having requirement where in the data extracted from Bex Query has to ve placed in UNIX directory in CSV formate.
      It is very urgent.
    Thanx in Advance.

    Hi,
    We have a similar set up in our organization. The user inputs data through a workbook and a CSV file is output to a particular location. The jobs then pick up the file and load it to the server.
    We have VB code in teh workbook that is written behind a button. Once the user uploads his data and hits the button, a CSV file with that data is created and placed in a specific loacation via eufuse. You can also use SYNCRA. That file is then picked up by our jobs and loaded to BW.
    Cheers,
    Kedar

  • TO READ FILES IN A PARTICULAR DIRECTORY FROM APPLICATION SERVER

    Hi all,
    Is there any function module which gives the list of files in a specific directory ??
    for eg ;i want to fetch all files in a particular directory say */interf/sy-mandt/reports....*
    I need a function module which will give all filenames in an internal table ,if i give the directory name as input.
    Thanks in advance,
    Aakash.
    Edited by: Aakash Neelaperumal on Apr 25, 2008 11:06 PM

    Hi,
    You can use WS_FILENAME_GET but understand it is obsolete. Search for a FM in function group SFES. I saw quite a few and one of them should meet your requirement.
    Cheers !

  • Where are the Download Excel Files going?

    Safari 6 seems to download Excel files as requested from a web site but they do not appear anywhere in the Download Folder I have specified. The site successfully downloaded the files before I upgraded to Safari 6. I now have to switch to Firefox to download these files.  Where are they going?

    Erik Lommers (guest) wrote:
    : What happened to the files? Yesterday I tried to download the
    : different trunks of the ora805 file and suddenly everything
    : stops.
    : The ftp-server is there, but the whole linux directory is gone!
    : Does anyone have an explanation?
    : When will the files be available again?
    Point your browser to:
    http://www.oracle.com/products/trial/html/trial.html#oracle8
    null

  • Upload and download of  excel file in the application server in background

    Hi all,
    i want to download the excel file from application server into internal table and after processing i have to upload to excel file in the application server in the background mode..
    i mean i'll schedule the program in background.
    im using FM ALSM_EXCEL_TO_INTERNAL_TABLE its working fine in fore ground but not in back ground.
    what method i have to follow ?

    Hi Ankit,
    I think this is not possible to open a Excel-File from the application server because the Excel format before Office 2007 where a binary format (Suffix: .xls). The newer Office file format (Suffix: xlsx) is a zipped XML Format. To read the binary Excel-Format you need an OLE Connection between SAP GUI and Office. But at the application server in background you doesn't have this OLE Connection.
    In my opinion you have two possibilities:
    1. Convert all files in the CSV format. This file format can be read with open dataset.
    2. Upload the files from the presentation server in forground. There are some funktion modules in the standard which can read the xls format. But they have some limits regarding the length of cells content.
    My recommendation is solution no. 1. If you know an VBA expert, he can write an Excel-macro which converts all Excel Files in the CSV-Fomat.
    Regards
    Dirk

  • In SAP Webdynpro using ABAP,how to colour the downloaded excel file?

    Hi all Experts'
    I have downloaded the data from the webdynpro application into an excel file in the presentation server using a custom button in a layout of a view in the webdynpro component.
    Now the requirement is to colour the column heading names and the downloaded excel file should show the full column length.
    Could anybody help me on this how to do this two things.
    Thanks in advance.

    Hi,
    You can use this function GUI_EXEC.
    Let say you want to use winzip to zip the file then what you should do like this:
    use this command --> ' -min -a D:\WALCOTT.ZIP D:\MBARANG.TXT'
    D:\MBARANG.TXT --> path to the file you want to Zip
    D:\WALCOTT.ZIP --> result zip file
    The command above is depends on the software you use to zip.
    then
      DATA: cmdguiexec(150).
      cmdguiexec = cmd.
      CALL FUNCTION 'GUI_EXEC'
        EXPORTING
          command          = cmdguiexec.
    Hope this help you.
    Best Regards,
    Victor.

  • Modifying and saving a Excel file by the use of Blob-Stream Method?

    Hi everyone...
    I'm trying to change and modify a Excel file which is received as Blob variable from database.
    I wrote a PL/SQL Procedure which get the Excel file and convert it to blob; after that send it as the parameter of a Java source called TestPrintExcel
    CREATE OR REPLACE DIRECTORY VMI_TEST_DIR AS '/afc/opt/dba/test_utl_dir';
    GRANT READ, WRITE ON DIRECTORY SYS.VMI_TEST_DIR TO SYSTEM;
    declare 
       bfi  bfile := bfilename('VMI_TEST_DIR','TestFzglist.xls');
       bin  blob;
       cout clob;  
    begin
       dbms_lob.open(bfi);
       dbms_lob.createtemporary(bin, true);
       dbms_lob.loadfromfile(bin, bfi, dbms_lob.getlength(bfi));
       dbms_lob.close(bfi);
       dbms_lob.createtemporary(cout, true);
       dbms_java.set_output(100000);
       TestPrintExcel(bin);
       dbms_output.put_line('done!');
    end;With the following Java procedure I can read the content of the Excel file and write it to database perfectly. But the question is, how can i save the excel file with the same way, if i would change or insert any cell? I mean with the same way that to save as blob stream. Because i get permission error when i use another methods like FileOutputStream, FileInputStream etc. That's way i want to resolve this problem with the blob-stream method. Can anybody tell me how i can do that or what a method i have to use?
    Thanks.
    create or replace and compile java source named xltest as
      import org.apache.poi.ss.usermodel.WorkbookFactory;
      import org.apache.poi.ss.usermodel.Workbook;
      import org.apache.poi.ss.usermodel.Sheet;
      import org.apache.poi.ss.usermodel.Row;
      import org.apache.poi.ss.usermodel.Cell;
      import org.apache.poi.ss.util.CellReference;
      import org.apache.poi.ss.usermodel.DataFormatter;
      import org.apache.poi.ss.usermodel.FormulaEvaluator;
      import java.util.*;
      import java.sql.*;
      import oracle.sql.*;
      import oracle.jdbc.driver.*;
      public class XLTEST {
        public static void printx( oracle.sql.BLOB xblin ) throws SQLException {                       
          Connection Conn = null;
          try {
            Conn = DriverManager.getConnection( "jdbc:default:connection:" );
            Workbook wb = WorkbookFactory.create( xblin.getBinaryStream() ); // "/afc/opt/dba/test_utl_dir/TstFzglist.xls"
            for ( int sheetNum = 0; sheetNum < wb.getNumberOfSheets(); sheetNum++ ) {  //NumberOfSheets
              String TableName = new String();       
              switch( sheetNum )
                case 0:
                  TableName = "freeimportxls_s1"; break;           
                case 1:
                  TableName = "FreeImportXLS_S2"; break;
                case 2:
                  TableName = "FreeImportXLS_S3"; break;
                default:
                  break;                  
              Sheet sheet1 = wb.getSheetAt(sheetNum);         
              java.util.Iterator<Row> ri = sheet1.rowIterator();                 
              while ( ri.hasNext() ) {
                Row row = ri.next();
                java.util.Iterator<Cell> ci = row.cellIterator();                       
                while ( ci.hasNext() ) {
                  Cell cell = ci.next();
                  CellReference cellRef = new CellReference( row.getRowNum(), cell.getColumnIndex() );                         
                  switch( cell.getCellType() ) {
                  case Cell.CELL_TYPE_STRING:                            
                    Values   += "'" + cell.getRichStringCellValue().getString() + "'";               
                    break;
                  case Cell.CELL_TYPE_NUMERIC:
                    Values   += "'" + cell.getNumericCellValue() + "'";
                    break;
                  case Cell.CELL_TYPE_BOOLEAN:
                    Values   += "'" + cell.getBooleanCellValue() + "'";
                    break;
                  case Cell.CELL_TYPE_FORMULA:
                    Values   += "'" + cell.getCellFormula() + "'";
                    break;
                  default:
                    Values   += "''";               
                  int Counter1 = cell.getColumnIndex() + 1;
                  int Counter2 = row.getLastCellNum();
                  if ( Counter1==Counter2 ) {
                    Values   += ")";                          
                  else {
                    Values   += "," ;
                } System.out.println ( Values );               
                if ( ( sheetNum >= 0 ) && ( sheetNum <=2 ) ) {
                   String sqlUpdate = "INSERT INTO " + TableName + " VALUES " + Values;
                   PreparedStatement pstmt = Conn.prepareStatement( sqlUpdate );                                          
                   pstmt.executeUpdate();           
                   pstmt.close();              
            } Conn.close();
          } catch ( java.sql.SQLException e ) {       
            System.err.println( e.getMessage() );
            e.printStackTrace( System.err );
            Conn.close();}        
      };

    Hi,
    Because i get permission error when i use another methods like FileOutputStream, FileInputStream etc.Permission errors are generally resolved by granting the proper privilege via DBMS_JAVA.grant_permission procedure.
    Have you already tried that?
    http://download.oracle.com/docs/cd/E11882_01/java.112/e10588/chten.htm#BABHDBCJ

  • How to edit a spreadsheet (excel file) in the portal?

    Hello experts,
    at the moment i am working on the requirement to edit a spreadsheet in the portal.
    Until now i was able to display an excel file with the help of the 'KM Document iView (without content filter)'.
    Everything is displayed alright and i can perform changes in the spreadsheet.
    BUT: There is no such thing like a Save-Button or something like that. Does the SAP NW Portal already provide a solution for this requirement? Or will i have to develop an own application?
    I have already searched the forums and sap help, but i haven't found any solution. I can't imagine that such an easy requirement would need coding.
    Best Regards
    Marcus
    (Po*nts will be rewarded for good answers)

    Hi Marcus,
    I do not think you can do the task the way you want. You will have to look for some workaround that may be download the file, edit it and then upload it back. You will have to code in your application for that. If you want to do this way I can help you further to edit and save the excel.
    Regards.
    Rajat

  • How to download Excel file in JSP Page

    Actually I have a page
    Where I am uploading the files to server and it is listing the files which are all uploaded to the server.
    If I try to click the file which is uploaded it has to download to the local system.
    DOC, TXT, PDF, PPT. These file formats are try to download to local. But Excel file, opening the file content only not downloading to local.
    Any solution

    Hi Bangalore:
    As my experience,there may be some symbol such as "\r\n" was added in the content of the Excel file you want to download. this is no porblems to text format file, but to binary format file, such file can not be open. So I suggest you check-up the content of the file befor it was writed to the client, remove unwanted symbol, it should be word!
    I'm a newer to the here , and my english is poor. I thirst for intercommunion, I'm sorry for the syntax error in my reply.

  • Download Excel file through Web dynpro with no windows open?

    Can we have a web dynpro application that just returns an Excel file in the response with no open windows? Similar to a java servlet that is used to download a Excel file?
    This basically means that I cannot use wdComponentAPI.getWindowManager().createNonModalExternalWindow()
    Java Servlet Code
    HttpSession session = request.getSession();      // get a handle on the session id
    response.setContentType("application/download");
    response.setHeader("Content-Disposition", "filename=RTIS_Report.xls");
    PrintWriter out = null;
    out = response.getWriter();
    String report = request.getParameter("REPORT");
    JCO.Table lines = download(request, session, report);
    for (int i = 0; i < lines.getNumRows(); i++) {
         lines.setRow(i);
         String content = lines.getString("LINES") + "\n";
         out.write(content);
         out.flush();
    out.flush();
    out.close();

    Hi,
    I think you can use IWD Cached Web Resource to achieve this..
    See the below code FYI..
    public void downloadToExcel( )
        String fileName = "Customer" + ".xls";
         IWDCachedWebResource cachedExcelResource = null;
         try
              File f = new File("Customer.xls");
              WritableWorkbook workbook =   Workbook.createWorkbook(f);
              WritableFont black = new WritableFont(WritableFont.createFont("Trebuchet MS"),WritableFont.DEFAULT_POINT_SIZE,WritableFont.BOLD,false,UnderlineStyle.SINGLE,Colour.BLACK);
              WritableCellFormat blackFormat = new WritableCellFormat(black);
              WritableFont blue = new WritableFont(WritableFont.createFont("Trebuchet MS"),WritableFont.DEFAULT_POINT_SIZE,WritableFont.NO_BOLD,false,UnderlineStyle.NO_UNDERLINE,Colour.BLUE);
              WritableCellFormat blueFormat = new WritableCellFormat(blue);
              WritableSheet sheet = workbook.createSheet("Customer", 0);
                   Label label;
                   String[] header={"Corporate Code","Batch ID"};
                   for (int i=0;i<2;i++)
                        label = new Label(i,0,header<i>.toString(),blackFormat);
                        sheet.addCell(label);
                   WritableCellFormat integerFormat = new WritableCellFormat(NumberFormats.INTEGER);
                   jxl.write.Number number;
                   // Reading the contents
                   for(int i=0;i<wdContext.nodeVn_DownloadToExcel().size();i++)
                        String strCorpName = wdContext.currentContextElement().getVa_CorpCode();
                        String strBatchID =     wdContext.nodeVn_DownloadToExcel().getVn_DownloadToExcelElementAt(i).getVa_BatchID();
                        label = new Label(0,i+1,strCorpName,blueFormat);
                        sheet.addCell(label);
                        label = new Label(1,i+1,strBatchID,blueFormat);
                        sheet.addCell(label);
                   workbook.setColourRGB(Colour.LIME, 0xff, 0, 0);
                   workbook.write();
                   FileInputStream excelCSVFile = new FileInputStream(f);
                   IWDCachedWebResource cachedWebResource = null;
                   if (excelCSVFile!= null)
                        cachedWebResource = WDWebResource.getWebResource(excelCSVFile, WDWebResourceType.getWebResourceType("xls","application/ms-excel"));
                   cachedWebResource.setResourceName(fileName);
              cachedExcelResource = cachedWebResource;
              wdContext.currentContextElement().setVa_DownloadToExcel(cachedExcelResource.getURL());
              workbook.close();
         catch (Exception ex)
              wdComponentAPI.getMessageManager().reportException("Error in Excel Download"+ex.getMessage(),false);
    Regards,
    Vijay

  • Unable To Execute Files In The Temporary Directory. Setup Aborted. Error 5: Access Is Denied.

    Hi Everyone,
    Whenever I install some new software in my new laptop I get this error:-
    Unable To Execute Files In The Temporary Directory. Setup Aborted. Error 5: Access Is Denied.
    I have tried synchronizing the clocks but it doesn't remove the problem.
    These softwares work on another laptop that i have, which also runs windows 7.
    Can someone please tell me the solution as this is extremely urgent.
    Thanks In Advance.
    -Michael

    In short:
    ============
    My permissions were all fine, so if anyone has trouble resolving the issue after sorting permissions then make sure you try fully disabling your anti-virus / anti-spyware / firewall applications, because that was the cause for me.
    In detail:
    ============
    Problem:
    Failed to install this application
    - http://www.ssware.com/cryptoobfuscator/download.htm
    - on Windows 8.1 x64
    - Get error message "Unable To Execute Files In The Temporary Directory. Setup Aborted. Error 5: Access Is Denied."
    First Candidate Solution
    The issue turns out to NOT be security rights on the Temp folder
    ESET Smart Security HIPS Advanced Memory Scanner is the cause
    http://kb.eset.com/esetkb/index?page=content&id=SOLN2908&actp=search&viewlocale=en_US&searchid=1392804914417
    Instead, I went and turned off all the ESS protections one by one and it turned out to be HIPS that is causing this false positive.
    In fact, it is the Advanced Memory Scanner option under HIPS that is causing the error, while the application in question is legit (using Inno Setup and presumably trying to write to the user temp folder, not sure whether just logs or to execute from there)
    Furthermore, Smart Security logs have no entries under HIPS even though I ticked "Log all blocked operations" under the HIPS "Advanced setup" - it was quite a journey to find out the cause :)
    Thank you. I have the same OS and installed ESET Smart Security as well. And it is resolved now.
    I just want to add, that by "Temporarily disable protection" and "Temporarily disable firewall", it doesn't work. You have to disable HIPS, as KristjanL said. 

  • Download excel file to PC in background

    Hi All,
    I need to write a report to local PC as an excel file. The program is working fine in foreground using cl_gui_frontend_services=>gui_download. However since the report data is very large, when the user runs the program in foreground, it always gets timeout. So it has to be run in background. I did a lot of research and tried the example posted here as well: http://abapblog.com/articles/tricks/33-create-xlsx-mhtml-file-from-internal-table-in-background
    But I am still not successful. I am getting ""control_flush_error". Does anybody have any ideas?
    Thanks,
    Meiying

    Hi ,
    cl_gui_frontend_services=>gui_download is for front end if you use this for background job scheduling it will throw dump !!
    so the solution is write a program to download the file to application  server using
    'OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE'
    and from there you can get the file.
    there is no way that you can schedule a program in background and store it on local PC.

Maybe you are looking for

  • ATI issues

    I installed the ATI drivers just as it said to do on the wiki. The 2612-cko2-swsusp2 kernel compiled just fine as did the ATI drivers. I rebooted, started KDE...no direct rendering. I decided I might try the ATI graphical installer, despite the fact

  • View/Controller best practices

    Hello, A coworker and I are in charge of creating the standards for Web Dynpro development at our company.  We've been able to agree on most topics, but we're stuck on one issue.  Should ALL logic be in the controller or is it ok to perform some logi

  • Table TKZU3 Enhancement in SPRO

    Hi, I have a request for enhancement in SPRO: Customizing: Controlling/Product cost controlling/Product cost planning/Basic settings for material costing/Overhead/Define costing sheets I need to add a new column for Plant to table TKZU3. Can someone

  • Calling Java from BPEL

    Hi, Is WSIF still the best/recommend way to call java code from your BPEL? Or are we moving away from that kind of env. and should put a wrapper around the legacy java code and expose them as services? Regards, Muasir

  • AE & Verizon DSL with Westell 6100 Configuration Settings Question

    Hello, Has anyone configured their Airport Extreme with Verizon DSL using a Westell 6100 modem in the last few months? I'm wondering if you have any particular tips or have a set of screen shots of the process. I'm walking my mother through the proce