Unable to read E$ table records into excel file in linux machine

Hi
I am using below code in ODI procedure to read E$ table record and store it in excel file
ODI Procedure: Technology=Java Beanshall and Command on Target I written below code and placed it in CKM Oracle KM
<@
String OS = System.getProperty("os.name").toLowerCase();
String v_path="";
if((OS.indexOf("win") >= 0))
v_path="D:\Unload_Dir\<%=snpRef.getSession("SESS_NO")%>.xlsx";
else if (OS.indexOf("mac") >= 0)
v_path="path details";
else if (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 )
v_path="/odi_a/oracle/Middleware/logs/wcds/odi_logs/<%=snpRef.getSession("SESS_NO")%>.xlsx";
else if (OS.indexOf("sunos") >= 0)
v_path="soliaris path";
@>
OdiSqlUnload "-FILE=<@=v_path@>" "-DRIVER=<%=odiRef.getInfo("DEST_JAVA_DRIVER")%>" "-URL=<%=odiRef.getInfo("DEST_JAVA_URL")%>" "-USER=<%=odiRef.getInfo("DEST_USER_NAME")%>" "-PASS=<%=odiRef.getInfo("DEST_ENCODED_PASS")%>" "-FILE_FORMAT=VARIABLE" "-ROW_SEP=\r\n" "-DATE_FORMAT=yyyy/MM/dd HH:mm:ss" "-CHARSET_ENCODING=ISO8859_1" "-XML_CHARSET_ENCODING=ISO-8859-1"
select * from <%=odiRef.getTable("L","ERR_NAME", "W")%>
But is not reading the data into .xlsx file ,
Please help me it is very urgent
Can I use below code
String os = "";
if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1) {
os = "windows";
} else if (System.getProperty("os.name").toLowerCase().indexOf("linux") > -1) {
os = "linux";
} else if (System.getProperty("os.name").toLowerCase().indexOf("mac") > -1) {
os = "mac";
T
his is high priority, please help me urgent
Regards,
Phanikanth
Edited by: Phanikanth on Feb 28, 2013 5:43 AM
Edited by: Phanikanth on Feb 28, 2013 6:00 AM
Edited by: Phanikanth on Feb 28, 2013 7:42 AM

Hi,
can you describe what is happening when you run the ODI procedure described below:
- Does the procedure fail with an error, if yes, which error(full details)?
- Does the procedure pass but no xslx file is been created?
- Does the procedure pass and an xslx file is been created, but Excel can't read it? If yes, what is the structure of the xslx file when read in an editor?
What I can see from your code below is that you have choosen -FILE_FORMAT=VARIABLE, but the XSLX format is supposed to be XML.
Regards,
Alex

Similar Messages

  • How to add the records of 2 internal table records into one file

    hello experts,
    My scenario is...
    I am retrieving the data for the for the credit, debit and trailer records of the customer into 3 different internal tables and finally i have to append all those records into one file first debit records then credit records finally the trailer record.... how to do that can anyone give some idea plzzzzzzzzz..
    Plz its bit urgent..
    Thanks a lot for your anticipation
    SRI

    Hello,
    Do like this.
    " Assume u have three itab.
    "Itab1 - debit
    "Itab2 - credit
    "Itab3 - Credit.
    REPORT ZV_TEST_SERVER .
    *PARAMETERS: P_FILE TYPE STRING."RLGRAP-FILENAME.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                  =
        FILENAME                      = P_FILE
    *   FILETYPE                      = 'ASC'
       APPEND                        = 'X'  " Check here
    *   WRITE_FIELD_SEPARATOR         = ' '
    *   HEADER                        = '00'
    *   TRUNC_TRAILING_BLANKS         = ' '
    *   WRITE_LF                      = 'X'
    *   COL_SELECT                    = ' '
    *   COL_SELECT_MASK               = ' '
    *   DAT_MODE                      = ' '
    * IMPORTING
    *   FILELENGTH                    =
      TABLES
        DATA_TAB                      = ITAB1
    * EXCEPTIONS
    *   FILE_WRITE_ERROR              = 1
    *   NO_BATCH                      = 2
    *   GUI_REFUSE_FILETRANSFER       = 3
    *   INVALID_TYPE                  = 4
    *   NO_AUTHORITY                  = 5
    *   UNKNOWN_ERROR                 = 6
    *   HEADER_NOT_ALLOWED            = 7
    *   SEPARATOR_NOT_ALLOWED         = 8
    *   FILESIZE_NOT_ALLOWED          = 9
    *   HEADER_TOO_LONG               = 10
    *   DP_ERROR_CREATE               = 11
    *   DP_ERROR_SEND                 = 12
    *   DP_ERROR_WRITE                = 13
    *   UNKNOWN_DP_ERROR              = 14
    *   ACCESS_DENIED                 = 15
    *   DP_OUT_OF_MEMORY              = 16
    *   DISK_FULL                     = 17
    *   DP_TIMEOUT                    = 18
    *   FILE_NOT_FOUND                = 19
    *   DATAPROVIDER_EXCEPTION        = 20
    *   CONTROL_FLUSH_ERROR           = 21
    *   OTHERS                        = 22
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                  =
        FILENAME                      = P_FILE
    *   FILETYPE                      = 'ASC'
       APPEND                        = 'X'  " Check here
    *   WRITE_FIELD_SEPARATOR         = ' '
    *   HEADER                        = '00'
    *   TRUNC_TRAILING_BLANKS         = ' '
    *   WRITE_LF                      = 'X'
    *   COL_SELECT                    = ' '
    *   COL_SELECT_MASK               = ' '
    *   DAT_MODE                      = ' '
    * IMPORTING
    *   FILELENGTH                    =
      TABLES
        DATA_TAB                      = ITAB2  " Check here
    * EXCEPTIONS
    *   FILE_WRITE_ERROR              = 1
    *   NO_BATCH                      = 2
    *   GUI_REFUSE_FILETRANSFER       = 3
    *   INVALID_TYPE                  = 4
    *   NO_AUTHORITY                  = 5
    *   UNKNOWN_ERROR                 = 6
    *   HEADER_NOT_ALLOWED            = 7
    *   SEPARATOR_NOT_ALLOWED         = 8
    *   FILESIZE_NOT_ALLOWED          = 9
    *   HEADER_TOO_LONG               = 10
    *   DP_ERROR_CREATE               = 11
    *   DP_ERROR_SEND                 = 12
    *   DP_ERROR_WRITE                = 13
    *   UNKNOWN_DP_ERROR              = 14
    *   ACCESS_DENIED                 = 15
    *   DP_OUT_OF_MEMORY              = 16
    *   DISK_FULL                     = 17
    *   DP_TIMEOUT                    = 18
    *   FILE_NOT_FOUND                = 19
    *   DATAPROVIDER_EXCEPTION        = 20
    *   CONTROL_FLUSH_ERROR           = 21
    *   OTHERS                        = 22
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                  =
        FILENAME                      = P_FILE
    *   FILETYPE                      = 'ASC'
       APPEND                        = 'X'  " Check here
    *   WRITE_FIELD_SEPARATOR         = ' '
    *   HEADER                        = '00'
    *   TRUNC_TRAILING_BLANKS         = ' '
    *   WRITE_LF                      = 'X'
    *   COL_SELECT                    = ' '
    *   COL_SELECT_MASK               = ' '
    *   DAT_MODE                      = ' '
    * IMPORTING
    *   FILELENGTH                    =
      TABLES
        DATA_TAB                      = ITAB3 " Check here
    * EXCEPTIONS
    *   FILE_WRITE_ERROR              = 1
    *   NO_BATCH                      = 2
    *   GUI_REFUSE_FILETRANSFER       = 3
    *   INVALID_TYPE                  = 4
    *   NO_AUTHORITY                  = 5
    *   UNKNOWN_ERROR                 = 6
    *   HEADER_NOT_ALLOWED            = 7
    *   SEPARATOR_NOT_ALLOWED         = 8
    *   FILESIZE_NOT_ALLOWED          = 9
    *   HEADER_TOO_LONG               = 10
    *   DP_ERROR_CREATE               = 11
    *   DP_ERROR_SEND                 = 12
    *   DP_ERROR_WRITE                = 13
    *   UNKNOWN_DP_ERROR              = 14
    *   ACCESS_DENIED                 = 15
    *   DP_OUT_OF_MEMORY              = 16
    *   DISK_FULL                     = 17
    *   DP_TIMEOUT                    = 18
    *   FILE_NOT_FOUND                = 19
    *   DATAPROVIDER_EXCEPTION        = 20
    *   CONTROL_FLUSH_ERROR           = 21
    *   OTHERS                        = 22
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    If useful reward.
    Vasanth

  • Function module for move internal table records into MSexcel file

    Hi all,
    Tell me the function module which is used to
    move internal table records in to MSexcel file.
    Give the sample program...

    Please search the forum for FM  "GUI_DOWNLOAD" You will get tons of threads with sample code.
    Also take a look into SAP_CONVERT_TO_XLS_FORMAT
    Thanks

  • DOWNLOAD HEADER & ITEM RECORD INTO EXCEL FILE

    I WANT TO KNOW THE LOGIC TO POPULATE HEADER DATA AND ITEM DATA INTO SAME INTERNAL TABLE AND AGAIN DOWNLOAD THE SAME TO EXCEL FILE .
    Header structure : rectyp ,hdnum ,sbank ,bankl ,accnr , paytp , crda ,iso.
    Item  structure    : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.
    Final internal table : Combination of these 2 fields. i need to populate these and download.

    Hi,
    fill at first your ITAB with header-date and append it. Then append your items.
    Do not SORT after appending.
    Regards Mario

  • How to specify path to read E$ tab records into .xls file using odisqlunlod

    Hi
    Can any one help me how to specify specific path in odisqlunload tools which is useful for both windows and linux.
    I am developing and testing in windows and moving generated scenario into linux box to test for testing people
    If in case any error out records are populated in E$ table then how that records will populated on xls file, later I am sending that attachement for email notification to concern people
    Below code is present in odisqlunload tool
    OdiSqlUnload "-FILE=d:\ODI_Error_Out_Files\Notification_Error_Records.xls" "-DRIVER=oracle.jdbc.OracleDriver" "-URL=jdbc:oracle:thin:@10.75.114.146:1521:POCWCDS" "-USER=wcds" "-PASS=h2yXeih4hFlXXV,QaMeRR2Fy" "-FILE_FORMAT=VARIABLE" "-ROW_SEP=\r\n" "-DATE_FORMAT=yyyy/MM/dd HH:mm:ss" "-CHARSET_ENCODING=ISO8859_1" "-XML_CHARSET_ENCODING=ISO-8859-1"
    select * from E$_notification
    Please help how to make a single code which is useful and work on both windows and linux
    Any sugession willl help me
    Thanks in advance
    Regards,
    Phanikanth

    Hi Bhabani,
    I have written below code in KM itself and select technology as Java BeanShall
    Code:
    <@
    String OS = System.getProperty("os.name").toLowerCase();
    String v_path="";
    if((OS.indexOf("win") >= 0))
    v_path="D:\Unload_Dir\<%=snpRef.getSession("SESS_NO")%>.xlsx";
    else if (OS.indexOf("mac") >= 0)
    v_path="path details";
    else if (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 )
    v_path="/odi_a/Middleware/logs/wcds/odi_logs/<%=snpRef.getSession("SESS_NO")%>.xlsx";
    else if (OS.indexOf("sunos") >= 0)
    v_path="soliaris path";
    @>
    OdiSqlUnload "-FILE=<@=v_path@>" "-DRIVER=<%=odiRef.getInfo("DEST_JAVA_DRIVER")%>" "-URL=<%=odiRef.getInfo("DEST_JAVA_URL")%>" "-USER=<%=odiRef.getInfo("DEST_USER_NAME")%>" "-PASS=<%=odiRef.getInfo("DEST_ENCODED_PASS")%>" "-FILE_FORMAT=VARIABLE" "-ROW_SEP=\r\n" "-DATE_FORMAT=yyyy/MM/dd HH:mm:ss" "-CHARSET_ENCODING=ISO8859_1" "-XML_CHARSET_ENCODING=ISO-8859-1"
    select * from <%=odiRef.getTable("L","ERR_NAME", "W")%>
    It was executed well and below is the Execution code of the above code
    Execution Code:
    <@
    String OS = System.getProperty("os.name").toLowerCase();
    String v_path="";
    if((OS.indexOf("win") >= 0))
    v_path="D:\Unload_Dir\1341360.xlsx";
    else if (OS.indexOf("mac") >= 0)
    v_path="path details";
    else if (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 )
    v_path="/odi_a/Middleware/logs/wcds/odi_logs/1341360.xlsx";
    else if (OS.indexOf("sunos") >= 0)
    v_path="soliaris path";
    @>
    OdiSqlUnload "-FILE=<@=v_path@>" "-DRIVER=oracle.jdbc.OracleDriver" "-URL=jdbc:oracle:thin:@10.75.114.146:1521:POCWCDS" "-USER=wcds" "-PASS=<@=snpRef.getInfo("DEST_ENCODED_PASS") @>" "-FILE_FORMAT=VARIABLE" "-ROW_SEP=\r\n" "-DATE_FORMAT=yyyy/MM/dd HH:mm:ss" "-CHARSET_ENCODING=ISO8859_1" "-XML_CHARSET_ENCODING=ISO-8859-1"
    select * from WCDS.E$_CDS_COMPANY
    Please confirm me if the above Code is correct or not, if Not, please correct it and DESC_ENCODE_PASS is not encoding the password
    Regards
    Phanikanth
    Edited by: Phanikanth on Feb 18, 2013 1:09 AM

  • Help Export TABLE Records into Flat File with INSERTs - error

    Hi,
    When i'm trying to run this procedure I got this error:
    ORA-00932:inconsistent datatypes: expected - got -
    Can anybody tell me why?
    Thanks
    CREATE OR REPLACE PROCEDURE generate_stmt(prm_table_name IN VARCHAR2,
    prm_where_clause IN VARCHAR2,
    prm_output_folder IN VARCHAR2,
    prm_output_file IN VARCHAR2) IS
    TYPE ref_cols IS REF CURSOR;
    mmy_ref_cols ref_cols;
    mmy_column_name VARCHAR2(100);
    mmy_column_data_type VARCHAR2(1);
    mmy_col_string VARCHAR2(32767);
    mmy_query_col_string VARCHAR2(32767);
    V_FILE_HNDL UTL_FILE.file_type;
    begin
    OPEN mmy_ref_cols FOR
    SELECT LOWER(column_name) column_name
    FROM user_tab_columns
    WHERE table_name = UPPER(prm_table_name)
    ORDER BY column_id;
    LOOP
    FETCH mmy_ref_cols
    INTO mmy_column_name;
    EXIT WHEN mmy_ref_cols%NOTFOUND;
    mmy_col_string := mmy_col_string || mmy_column_name || ', ';
    mmy_query_col_string := mmy_query_col_string || ' ' || mmy_column_name || ',';
    END LOOP;
    CLOSE mmy_ref_cols;
    V_FILE_HNDL := UTL_FILE.FOPEN('TEST','TESST.TXT', 'W');
    mmy_col_string := 'INSERT INTO ' || LOWER(prm_table_name) || ' (' ||
    CHR(10) || CHR(9) || CHR(9) || mmy_col_string;
    mmy_col_string := RTRIM(mmy_col_string, ', ');
    mmy_col_string := mmy_col_string || ')' || CHR(10) || 'VALUES ( ' ||
    CHR(9);
    mmy_query_col_string := RTRIM(mmy_query_col_string,
    ' || ' || '''' || ',' || '''' || ' || ');
    dbms_output.put_line(mmy_column_name);
    OPEN mmy_ref_cols
    FOR ' SELECT ' || mmy_query_col_string ||
    ' FROM ' || prm_table_name ||
    ' ' || prm_where_clause;
    loop
    FETCH mmy_ref_cols
    INTO mmy_query_col_string;
    EXIT WHEN mmy_ref_cols%NOTFOUND;
    mmy_query_col_string := mmy_query_col_string || ');';
    UTL_FILE.PUT_LINE(V_FILE_HNDL, mmy_col_string);
    UTL_FILE.PUT_LINE(V_FILE_HNDL, mmy_query_col_string);
    end loop;
    end;

    Buddy,
    Try this..
    CREATE OR REPLACE PROCEDURE generate_stmt
    (prm_table_name IN VARCHAR2,
    prm_where_clause IN VARCHAR2,
    prm_output_folder IN VARCHAR2,
    prm_output_file IN VARCHAR2) IS
    TYPE ref_cols IS REF CURSOR;
    mmy_ref_cols ref_cols;
    mmy_column_name VARCHAR2(100);
    mmy_column_data_type VARCHAR2(1);
    mmy_col_string VARCHAR2(32767);
    mmy_query_col_string VARCHAR2(32767);
    V_FILE_HNDL UTL_FILE.file_type;
    begin
    OPEN mmy_ref_cols FOR
    SELECT LOWER(column_name) column_name
    FROM user_tab_columns
    WHERE table_name = UPPER(prm_table_name)
    ORDER BY column_id;
    LOOP
    FETCH mmy_ref_cols
    INTO mmy_column_name;
    EXIT WHEN mmy_ref_cols%NOTFOUND;
    mmy_col_string := mmy_col_string || mmy_column_name || ', ';
    mmy_query_col_string := mmy_query_col_string || ' ' || mmy_column_name || ',';
    END LOOP;
    CLOSE mmy_ref_cols;
    mmy_col_string := 'INSERT INTO ' || LOWER(prm_table_name) || ' (' ||CHR(10) || CHR(9) || CHR(9) || mmy_col_string;
    mmy_col_string := RTRIM(mmy_col_string, ', ');
    mmy_col_string := mmy_col_string || ')' || CHR(10) || 'VALUES ( ' ||CHR(9);
    mmy_query_col_string := RTRIM(mmy_query_col_string,' || ' || '''' || ',' || '''' || ' || ');
    V_FILE_HNDL := UTL_FILE.FOPEN('TEST','TESST.TXT', 'W');
    OPEN mmy_ref_cols FOR 'SELECT ' || mmy_query_col_string ||' FROM ' || prm_table_name ||' ' || prm_where_clause;
    loop
    FETCH mmy_ref_cols INTO mmy_query_col_string;
    EXIT WHEN mmy_ref_cols%NOTFOUND;
    mmy_query_col_string := mmy_query_col_string || ');';
    UTL_FILE.PUT_LINE(V_FILE_HNDL, mmy_col_string);
    UTL_FILE.PUT_LINE(V_FILE_HNDL, mmy_query_col_string);
    end loop;
    UTL_FILE.FCLOSE(V_FILE_HNDL);
    END;
    This would work for table with one and only one column.
    Look at the line below:
    FETCH mmy_ref_cols INTO mmy_query_col_string;
    mmy_query_col_string has been declared as string...So it would hold single value only.That's the reason when you try this block on table with more than one column,mmy_query_col_string would've to hold a table row type data which it would not...
    Good luck!!
    Bhagat

  • Split records into two files based on lookup table

    Hi,
    I'm new to ODI and want to know on how I could split records into two files based on a value in one of the columns in the table.
    Example:
    Table:
    my columns are
    account name country
    100 USA
    200 USA
    300 UK
    200 AUS
    So from the 4 records I maintain list of countries in a lookup file and split the records into 2 different files based on values in the file...
    Say I have records AUS and UK in my lookup file...
    So my ODI routine should send all records with country into file1 and rest to file2.
    So from above records
    File1:
    300 UK
    200 AUS
    File2:
    100 USA
    200 USA
    Can you help me how to achieve this?
    Thanks,
    Sam

    1. where and how do i create filter to restrict countries? In source or target? Should I include some kind of filter operator in interface.
    You need to have the Filter on the Source side so that we can filter records accordingly the capture the same in the File. To have a Filter . In the source data store click and drag the column outside the data store and you will have Cone shaped icon and now you can click and type the Filter.
    Please look into this link for ODI Documentation -http://www.oracle.com/technetwork/middleware/data-integrator/documentation/index.html
    Also look into this Getting started guide - http://download.oracle.com/docs/cd/E15985_01/doc.10136/getstart/GSETL.pdf . You can find information as how to create Filter in this guide.
    2. If I have include multipe countries like (USA,CANADA,UK) to go to one file and rest to another file; Can I use some kind of lookup file...? Instead of modifying filter inside interface...Can i Update entries in the file?
    there are two ways of handling your situation.
    Solution 1.
    1. Create Variable Country_Variable
    2. Create a Filter in the Source datastore in the First Interface ( SOURCE.COLUMN = #Country_Variable)
    3. Create a new Package Country File Unload
    4. Call the Variable in Country_Variable in Set Mode and provide the Country (USA )
    5. Next call the First Interface
    6. Next call the Second Interface where the Filter condition will be ( SOURCE.COLUMN ! = #Country_Variable )
    7. Now run the package .
    Solution 2.
    If you need a solution to handle through Filer.
    1. Use this Method (http://odiexperts.com/how-to-refresh-odi-variables-from-file-%E2%80%93-part-1-%E2%80%93-just-one-value ) to call the File where you wish to create store the country name into the variable Country_Variable
    2. Pretty much the same Create a Filter in the Source datastore in the First Interface ( SOURCE.COLUMN = #Country_Variable)
    3.Create a new Package Country File Unload
    4.Next call the Second Interface where the Filter condition will be ( SOURCE.COLUMN ! = #Country_Variable )
    5. Now run the package .
    Now through this way using File you can control the File.
    Please try and let us know , if you need any other help.

  • Unable to write data into excel file when it's close

    Hi,
    I'm facing this problem and it's a bit weird. I'm using the following method to insert data into excel file. But when excel file is close, it unable to write data into the excel sheet. But it was able to write the data into the excel sheet if i open the excel file when running the program.
    Can anyone please tell me what's wrong to the code?
    public int updateLog(String sheet, String no, String cpId, String CatId, String rbtCode, String rbt, String rbtName, String artistName, String price, String rbtFileName, String songId, String msg){
            int result = -1;
            try{
                SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.ENGLISH);
                String actionDate = formatter.format(new Date());
                rbtName = rbtName.replaceAll("'", "''");
                artistName = artistName.replaceAll("'", "");
                String sql = "insert into [Sheet3$] (Code, CpID, CategoryID, RBTCode, RBT, RBTName, ArtistName, Price, RBTFileName, SongID, UploadStatus, FileUploadedDateTime) ";
                sql = sql + " values ('" + no + "', '" + cpId + "', '" + CatId + "', '" + rbtCode + "', '" + rbt + "', '" + rbtName + "', '" + artistName + "', '" + price + "', '" + rbtFileName + "', '" + songId + "', '" + msg + "', '" + actionDate + "')";
                System.out.println(sql);
                log.writeLog(sql);
                result = stmnt.executeUpdate(sql);
            } catch(Exception e){
                e.printStackTrace();
                log.printStackTrace(e);
            return result;
        public int openConnection(){
            int result = -1;
            try{
                Class.forName(dbDriver);
                c = DriverManager.getConnection(conStr + excelFilePath+";ReadOnly=0;");
                stmnt = c.createStatement();
            } catch(Exception e){
                e.printStackTrace();
                log.printStackTrace(e);
                return -1;
            return 1;
        }Thanks

    HI,
    i hv a doubt regarding reading / opening of a
    password protected Excel file using jxl( java ) .
    How to read / open a password protected Excel file
    thro Java (jxl ) program .plz let me know some
    example also .
    Regards,
    Ramesh P
    845935822cross posting !! answered here
    http://forum.java.sun.com/thread.jspa?threadID=710466&messageID=9507085#9507085

  • Conversion of internal table into excel file format &put it on app server

    Hi,
    My requirement is to convert the internal table into excel file format and I have to store it on application server so that administrator can send the file thr e-mail attachment.
    So, please let me know how to convert the records of internal table and store it on application server in Excel file format.
    TIA,
    Nitin

    Hi,
      Use FM GUI_DOWNLOAD to download the data from inernal table to excel sheet.
    Then Using tcode CG3Z u can transfer file to application server.
    *&      Form  sub_download
          text
    -->  p1        text
    <--  p2        text
    FORM sub_download.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
        BIN_FILESIZE                    =
          filename                        = p_path
         filetype                        = 'ASC'
        APPEND                          = ' '
         write_field_separator           = 'X'
        HEADER                          = '00'
        TRUNC_TRAILING_BLANKS           = ' '
        WRITE_LF                        = 'X'
        COL_SELECT                      = ' '
        COL_SELECT_MASK                 = ' '
        DAT_MODE                        = ' '
        CONFIRM_OVERWRITE               = ' '
        NO_AUTH_CHECK                   = ' '
        CODEPAGE                        = ' '
        IGNORE_CERR                     = ABAP_TRUE
        REPLACEMENT                     = '#'
        WRITE_BOM                       = ' '
        TRUNC_TRAILING_BLANKS_EOL       = 'X'
        WK1_N_FORMAT                    = ' '
        WK1_N_SIZE                      = ' '
        WK1_T_FORMAT                    = ' '
        WK1_T_SIZE                      = ' '
      IMPORTING
        FILELENGTH                      =
        TABLES
          data_tab                        = it_final
        FIELDNAMES                      =
      EXCEPTIONS
        FILE_WRITE_ERROR                = 1
        NO_BATCH                        = 2
        GUI_REFUSE_FILETRANSFER         = 3
        INVALID_TYPE                    = 4
        NO_AUTHORITY                    = 5
        UNKNOWN_ERROR                   = 6
        HEADER_NOT_ALLOWED              = 7
        SEPARATOR_NOT_ALLOWED           = 8
        FILESIZE_NOT_ALLOWED            = 9
        HEADER_TOO_LONG                 = 10
        DP_ERROR_CREATE                 = 11
        DP_ERROR_SEND                   = 12
        DP_ERROR_WRITE                  = 13
        UNKNOWN_DP_ERROR                = 14
        ACCESS_DENIED                   = 15
        DP_OUT_OF_MEMORY                = 16
        DISK_FULL                       = 17
        DP_TIMEOUT                      = 18
        FILE_NOT_FOUND                  = 19
        DATAPROVIDER_EXCEPTION          = 20
        CONTROL_FLUSH_ERROR             = 21
        OTHERS                          = 22
      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.                    " sub_download
    Otherwise use OPEN DATASET and TRANSFER statement to download data from internal table to direct application server
    Regards,
    Prashant

  • How to extract 250,000 Records into excel

    Hi Friends In sql server My table has 250,000 records . How can I import these records into excel?
    If not  which file type I can use for it. Thanks for advance friends

    There are many solutions. I say two solution here:
    using "extract" by right click on database in ssms like bellow screens shots
    using "get external data" from data tab in excel
    more info: http://office.microsoft.com/en-001/excel-help/connect-to-import-sql-server-data-HA010217956.aspx
    sqldevelop.wordpress.com

  • Deleted Rows Flashback : unable to read data - table definition has changed

    Hi All,
    Its Really Important.
    I Unfortunately truncated a table using
    Trancate table mytable;
    and Made a alter table to decrease data pricision length.
    But i Need the tabla data back,
    i used the below command to get deleted rows, it shows error.
    query : select * from pol_tot versions between timestamp systimestamp-1 and systimestamp;
    error : ORA-01466: unable to read data - table definition has changed
    query : flashback table pol_tot to timestamp systimestamp - interval '45' minute;
    error : ORA-01466: unable to read data - table definition has changed
    Kindly Share your ideas How Can i Get thoose Deleted Records.
    Edited by: 887268 on Jul 8, 2012 12:26 AM

    BluShadow wrote:
    Khayyam wrote:
    Flashback dont works after DDL. Truncate command is DDL. Only recover from backup can help.Please don't spread untrue statements.Working of flashback after Drop command is so clear to say. I mean such DDL commands as CREATE, ALTER, TRUNCATE and so on...
    "Remember that DDLs that alter the structure of a table (such as drop/modify column, move table, drop partition, truncate table/partition, and add constraint) invalidate any existing undo data for the table. If you try to retrieve data from a time before such a DDL executed, you will get error ORA-1466. DDL operations that alter the storage attributes of a table (such as PCTFREE, INITRANS, and MAXTRANS) do not invalidate undo data."
    [http://docs.oracle.com/cd/B28359_01/appdev.111/b28424/adfns_flashback.htm#BJFJHDAG]

  • Ora-01466 unable to read data table definition has changed oracle.

    hi all,
    i truncated a table before 10 min. now i want the data's so i used this query ;
    select *
    from ( select *
    from sometable where some_condition )
    as of timestamp sysdate-1;
    but it shows:
    """ ora-01466 unable to read data table definition has changed oracle"""";
    how to get the deleted records from database????????????
    Edited by: 887268 on Oct 24, 2011 4:02 AM

    Error:  ORA 1466
    Text:   unable to read data -- object definition has changed
    Cause:  This is a time-based read consistency error for a database object,
            such as a table or index.
            Either of the following may have happened:
            The query was parsed and executed with a snapshot older than the time
            the object was changed.
            The creation time-stamp of the object is greater than the current
            system time.
            This happens, for example, when the system time is set to a time
            earlier than the creation time of the object.
    Action: If the cause is
            an old snapshot, then commit or rollback the transaction and resume
            work.
            a creation time-stamp in the future, ensure the system time is set
            correctly.
            If the object creation time-stamp is still greater than the system
            time, then export the object's data, drop the object, recreate the
            object so it has a new creation time-stamp, import the object's data,
            and resume work.

  • Error Exporting Table Content into Excel

    Hi there,
    I have code that reads a TableView and exports its content into excel file. The code is running right now in an iView that is stored in a protal role. The code has been developed using PDK. I'm running portal 6.0 SP16.
    Here is what the code does:
    1. Reads the content of the table and stores it in an HSSFSheet inside an HSSFWorkbooK object.
    2. Gets HttpServletResponse from the portal request and updates its content type and headers
    HttpServletResponse response = ((IPortalComponentRequest)getRequest()).getServletResponse(true);
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition", "attachement;filename="EmployeeEntitlementRpt.xls"");
    3. Writes the excel file to the response output stream.
    ServletOutputStream fileOut = null;
    try{
         fileOut = response.getOutputStream();
         wb.write(fileOut);
         fileOut.close();
    } catch(IOException ie){
         throw new PortalRuntimeException("IOException when getting output steam from response, writing to the outputstream or closing it.", ie);
    The code gives me the following error message, if invoked from the iview inside the detailed navigation.
    <b>"Internet Explorer cannot download ...ge!2fcom.sap.portal.innerpage from portald.global.ad
    Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."</b>
    However, when I navigate to the same iView and open it in a new window, the code functions as expected.
    This is the URL to the iView when opened inside the detailed navigation: https://companyserver.global.ad/irj/servlet/prt/portal/prtpos/pcd!253aportal!255fcontent!252fevery!255fuser!252fgeneral!252fdefaultDesktop!252fframeworkPages!252fframeworkpage!252fcom!252esap!252eportal!252einnerpage!7b!3b2!7d.com!252esap!252eportal!252edynamicNavigationArea!7bHideMode!7d_com!252esap!252eportal!252etargetsiView!7bHideMode!7d_com!252esap!252eportal!252etargetsiView!255f!7bHideMode!7d-/prttarget/com!252enexeninc!252etots!252eiv_entitlement_report.content/prteventname/HtmlbEvent/prtroot/pcd!3aportal_content!2fevery_user!2fgeneral!2fdefaultDesktop!2fframeworkPages!2fframeworkpage!2fcom.sap.portal.innerpage
    This is the URL to the iView when opened in a new window:
    https://companyserver.global.ad/irj/servlet/prt/portal/prtroot/com.sap.portal.pagebuilder.iviewmodeproxy?iview_id=pcd%3aportal_content/com.nexeninc.fld_nexen_content/fld_all_users/fld_time_off_tracking/fld_administrators/com.nexeninc.tots.ro_administrator/com.nexeninc.tots.ws_user_components/com.nexeninc.portal.navigation.ws_my_workspace_my_applications/com.nexeninc.portal.navigation.ws_my_workspace/fld_general_applications/fld_track_time_off/fld_admin/com.nexeninc.tots.iv_entitlement_report&iview_mode=default

    Hi,
    In the iView properties, for the property Entry Point, mark the property as yes instead of the default no. May be this could help u.
    Regards,
    Sujana

  • Split table record into several lines - pdf forms

    hello experts
    im trying to split a table record into several lines in order to present the whole table record in the form.
    for example:
    table T has 4 fields F1 F2 F3 F4
    if the tables has 2 records - R1 and R2 (every record contains 4 data fields) then i want to present my table in the following way:
    R1-F1 R1-F2
    R1-F3 R1-F4
    R2-F1 R2-F2
    R2-F3 R2-F4
    please do not refer me to links - i really need a specific procedure
    thanks ahead to all
    Eyal
    P.S i am using the adobe lifecycle - SFP tran.

    hey everyone
    it has been solved
    for the record:
    subform table (flowed content) contains 2 positioned subforms
    subforn header
    subform lines contains 2 flowed subforms 1 for the first two fields and 1 for the ladt two fields
    thank anyway
    Eyal

  • How to solve this problem "ORA-01466: Unable to read data -- Table definiti

    Hi,
    I had deleted the entry and i want back now and in between i done the following
    alter table pv_head enable constraint FK_PV_HED__CRF_HEDwhen i try in the following one
    SELECT * FROM PV_HEAD AS OF TIMESTAMP TO_DATE('28-FEB-2011 9:45:00','DD-MON-YYYY HH24:MI:SS')
    WHERE PV_NO IN (703705,703704) the error i am receiving           
    ORA-01466: Unable to read data -- Table definition has changed how to solve this issue.
    please guide me.
    Kanish

    You can not perform DDL and then perform a flashback query to before the DDL.
    One might wonder why you chose this particular time to perform an ALTER TABLE but you did. It is what it is.

Maybe you are looking for

  • InDesign crashes during adding of pages

    Hi, I´ve got following problem. We design our annual school report in InDesign. In order to keep the required work at a minimum level, we use the document of the previous year, convert it into the currently used InDesign-version and replace the conte

  • Connecting Thunderbolt display to 2009 MacPro

    I have a 2009 Macpro with the GT 120 graphics card which has a dvi and mini display port. Can the thunderbolt be connected to the mini display por? I'm not interested in the extra thunderbolt facilities.

  • Windows does not seem to recognize my iphone as a storage device.

    How can I make this happen so that I can save my photos to the computer? I've been able to do it in the past so I'm not sure what has changed.

  • Query on Table Maintenance

    Hi I have created a Z Custom table. I have also created a Table maintenance for this table. Whenever i maintain entries through SM35 Table maintenance, it prompts me for a request number. I donot want it to ask me a request number for maintaining tab

  • Verify Labview Vis before starting execution in release mode

       I have a TestStand sequence that calls a number of Vis. When I switch from development mode to the run-time engine, sometimes the TestStand sequence crashes at certain Vis. I then find that when I switch back to developement mode and open the vi,