Find SAP table records given a list of tables

Dear all,
I have been given a list of table names that I require to provide a report a total record counts for these table.
given such codes I have can't proceed further as the field symbol that I use is invalid. Please advice how to complete this. Or perhaps any standard system reports to find the total record counts given a specified tables.
here's the code:
types : begin of w_dd02l,
           TABNAME type TABNAME,
           totalrec like sy-dbcnt,
        END OF w_dd02l.
data : wa_dd02l type STANDARD TABLE OF w_dd02l with HEADER LINE.
data : wr_dd02l type w_dd02l.
data : totalrecord like sy-dbcnt.
field-SYMBOLS : <f1> type ANY.
p_tab is a selection field.
select tabname from dd02l into CORRESPONDING FIELDS OF TABLE wa_dd02l where tabname in p_tab.
loop at wa_dd02l into wr_dd02l.
   assign wr_dd02l-tabname to <f1>.
   select count(*) from <f1> into totalrecord.
   wr_dd02l-totalrec = totalrecord.
  write : wr_dd02l-tabname, wr_dd02l-totalrec.
ENDLOOP.
<f1> being a field symbol is not recognize as in ABAP dictionary. Here's where I can't proceed.. dear gurus please help.
Thanks and Regards,
Andrew

Pl. check, it's working
types : begin of w_dd02l,
          TABNAME type TABNAME,
          totalrec like sy-dbcnt,
        END OF w_dd02l.
data : wa_dd02l type STANDARD TABLE OF w_dd02l with HEADER LINE.
data : wr_dd02l type w_dd02l.
data : totalrecord like sy-dbcnt.
field-SYMBOLS : <f1> type ANY.
PARAMETERS: p_tab like dd02l-tabname.
* p_tab is a selection field.
select tabname from dd02l
               into CORRESPONDING FIELDS OF TABLE wa_dd02l
              where tabname = p_tab.
loop at wa_dd02l into wr_dd02l.
  assign wr_dd02l-tabname to <f1>.
  select count(*) from (<f1>) into totalrecord.      " use  like (<f1>)
  wr_dd02l-totalrec = totalrecord.
  write : wr_dd02l-tabname, wr_dd02l-totalrec, <f1>.
endloop.

Similar Messages

  • Create UDF for table not in the List of tables

    Hi all,
    I know that my question maybe easy or been asked before, but I couldn't find the answer.
    To create a UDF in SAP B1 version 9.0 you should go Tools -> Customization Tools -> User-Defined Fields - Management...
    which is ok and working perfect. but my question is:
    If I want to create UDF for a table not in the list of tables there what should I do? I need to create 2 UDFs for table OMRC [Manufacturers], and can't find it in master data tables.
    anyone had this issue before?
    EDIT  : Is it good to add the field by using sql server? I know it's possible, but will it be visible in SAP
    thank you
    Message was edited by: Samira Haroun

    Hi Samira,
    There is noit a simple link for this, I advise you to study the documentation for TB1300 SBO Development Certification.
    Ypu should also have knowledge of .net, and C# or VB, because you have to make a small program/addon to add the fields
    Kind regards
    Ad Kerremans

  • Where to find sap itutor recorder

    Hello Guys ,
    i am searching for sap itutor. I want to use it for learning purpose.
    Please help to find the itutor recorder .
    on the forum i only got  information about sap itutor player.. i dint get any information about full version of sap itutor.
    can any body help me ?
    Regards
    Bhavehs

    It seem you have no license for the SAP TUTOR full installation.
    You can install the SAP Tutor personal player which is a free software
    from the following link:
    https://websmp103.sap-ag.de/~sapidp/011000358700001572552002E
    Please note that this player can only play tutorials prepared by SAP.
    The SAP Tutor full installation is the licensed version. If you already
    have the license, you can download the same from the following path:
    service.sap.com -> SAP Support Portal -> Downloads (tab) -> Download ->
    Installation and Upgrades -> Entry by Application Group -> SAP
    Application components -> SAP TUTOR -> SAP Tutor 2.1/2.2 ->Installation.
    The full installation can play any tutorial file.
    If you are a Solution Manager customer, then please goto
            service.sap.com\saptutor and then you can download the SAP Tutor
    with the heading SAP-Tutor for Solution Manager Customer.
    Colin

  • If a User has select only on a table, it isn't listed in TABLES

    I have a group of Users I want to be able to access a view of the table (select only).
    I created a role and table/select privs. for those users. In SQL Developer they
    do not see a list under TABLES for those tables they have SELECT Access to.
    They can, however, enter a query (if they know the name) and select from the table,
    but they have to know the table name and they are not listed.
    Is there an Oracle priv. a user must have to have to view the TABLES (although they
    only have select)?

    Yes, I would think so. But for all the tables listed, when you click on the DATA tab you do not see any data. The only way to view is to go the SQL Worksheet and query *
    from the table.
    The user has SELECT on the tables.

  • Need to delete Table Contents for the list of tables in the internal table.

    Hi All,
    I have req where in I have the list of table in an internal table and delete the contents of the tables which are in the internal table.
    I need to delete the contents of the table using Native SQL statements. Else I can use function modules to delte the contents of table.
    Thanks in advance. Appriciable if you can revert as soon as possible at all.
    Thanks and Regards,
    Raj.
    Edited by: Thomas Zloch on Mar 11, 2010 1:56 PM

    Hi,
    You can try using truncate statement in native sql.
    EXEC SQL.
    TRUNCATE TABLE ABC.
    ENDEXEC.

  • Reg : Joining the all internal table records into a single internal table

    Hi all
    I am having 5 internal tables and i want to put all these entries in a single intrnal table and my requirement is for each and every record it has to go through all the internal tables and if an entry is missing meand.it has to go through the other internal tables and for missing entries i should leave it as blank and rest of the contents i have to display can any please gimme some logic how to do this??
    Thanks in advance

    Don't have time or will to deliver turnkey solutions, but here is a frame:
    LOOP AT itab1...
      READ TABLE itab2 WITH TABLE KEY... (fields linking itab1 and itab2)
      READ TABLE itab3 WITH TABLE KEY... (fields linking itab1 and itab3)
      LOOP AT itab4 WHERE... (fields linking itab1 and itab4)
        READ TABLE itab5 WITH TABLE KEY... (fields linking itab4 and itab5)
        MOVE-CORRESPONDING... (all five work areas to target work area)
        APPEND itabtarget...
      ENDLOOP.
    ENDLOOP.
    so use READ when there is a 1:1 relationship (e.g. check table entry), and LOOP when there is a 1:N relationship (e.g. items for a header)
    Thomas

  • Need to display Internal table records on screen without using table contro

    Hi Experts,
    I have a requirement to display internal table on screen which is having three columns (Material no, Serial No and quantity).
    But I can't use table control as it is not supported by hand held devices.
    They are going to use this transaction on hand held devices.
    Thanks In advance.
    Gaurav

    You should be able to use the good old STEP LOOP processing for this... create your three fields in the row then convert them to a STEP-LOOP.
    You can look up in the help how to work with STEP-LOOPs if you are not familiar with it. It was the way to manage table-like information before the age of table controls

  • How to find count of records based on batch wise.

    Hi All,
    We are working on OWB10gr2. I would like share one requirement. Any one can suggest me how to do it and which is the best way to get accurate information.
    We have 2 schemas’ like nia_src and nia_tgt. currently we are moving data from nia_src to nia_tgt for that reason we implemented some mappings based on requirement. In my source schema (nia_src) having 100 tables with data and similar structure replicated in target schema (nia_tgt).
    In source schema every table having one date field for which record is inserted and based on that field we can find how may records are inserted on particular table ,particular time.
    Same like target also maintaining date fields for tracking purposes.
    We have done some mappings and scheduled also. Every day we are into the target with incremental data. All are working fine not any issues.
    I wanted to know how many records inserted, updated, merged for particular batch
    How can we find?
    Can we find exact information in OWB_REP_OWNER schema on WB_RT_AUDIT?.
    For tracking purposes I need to find those values how many records are available in
    Source table and how many records are populated to the target schema?
    How to find schedule batch count of records table wise for batch wise?
    Please suggest me any one on this.
    thanks and regards,
    venkat.

    RE: based on pre operator can we find count of records. if yes how to do it.
    No, you cannot tell from the pre- operator how many records will be inserted or updated into a mapping. How could you? The mapping hasn't run yet!
    At best (if you have simple mappings with single targets) you could come up with a strategy to have the pre-mapping procedure aware of it's package name, then select from user_source for that package body until you find that first cursor used for the row-based processing, copy the cursor into a local variable, and then execute immediate select count(*) from that cursor definition. But still, all that would get you is the number of rows selected - not inserted / updated / errored etc.
    A post-mapping procedure that is aware of the package name will, however, run prior to package exit so that the package spec is still in memory so you can access the public variables in the package spec. We do that in our standard post-mapping procedure
    CREATE OR REPLACE procedure erscntrl_finalize_prc(
                           p_process_id     in  number,
                           p_process_name   in  varchar2)
    as
          l_numread      number         := 0;
          l_numInserted  number         := 0;
          l_numUpdated   number         := 0;
          l_numMerged    number         := 0;
          l_owb_audit_id number         := 0;
          l_owb_status   number         := 0;
          sqlStmt        varchar2(2000) :=
                               'begin '||
                               '  :1 := '||p_process_name||'.get_selected; '||
                               '  :2 := '||p_process_name||'.get_inserted; '||
                               '  :3 := '||p_process_name||'.get_updated; '||
                               '  :4 := '||p_process_name||'.get_merged; '||
                               '  :5 := '||p_process_name||'.get_audit_id; '||
                               '  :6 := '||p_process_name||'.get_status; '||
                               ' end;';
    begin
          -- we use dynamic SQL to return required audit field values.
          --  This allows us to alter which values we need at a later date
          --  without impacting the deployed mappings.
        execute immediate sqlStmt
        using   out l_numread,   out l_numInserted,  out l_numUpdated,
                out l_numMerged, out l_owb_audit_id, out l_owb_status;
      -- then execute our own logging package.
       owb_mapping_log_pkg.finalize(
                           p_process_id,
                           p_process_name,
                           l_numread,
                           l_numInserted,
                           l_numUpdated,
                           l_numMerged,
                           l_owb_audit_id,
                           l_owb_status
    end;
    /However, even in this case bear in mind that if you run the mapping in set-base mode, all Oracle returns is the number merged which does not give values for the inserted and updated counts. If you really need those values you need to either a) run in row-based mode or row-based-target-only, or come up with some custom queries. For example, in your pre-mapping do a select count(*) from your_target_table, then run the mapping, then get the number merged, then do another select count(*) from your_target_table. With these values and basic math you could tell the number inserted by the growth in the table, and the rest of the number merged must have been updates.
    That being said, if you are playing with dimensions as large as most of the ones I am - there is no bloody way that you want to do two select count(*) statements on each run without a really, really good reason.....
    Cheers,
    Mike

  • How to include in table of contents the list of figures and list of tables?

    How to include in table of content the "Table of contents", "List of figures" and "List of tables"? All are generated with function Table of contents, but they will not appear in generated table of contents even if they have proper style of headings - Heading 1, as other chapter.
    I get this in generated Table of contentes of my dissertaion thesis:
    Table of contents
    Preface
    Table of contents <- missing
    List of tables <- missing
    List of figures <- missing
    Introduction
    Main
    Conclusion
    Is it ok, that generated lists are not included in table of contents?

    You've just confused me.
    My understanding of how this is set up is that either:
    This is a book, and there is a master TOC that includes all book documents and a document-specific TOC in each component file, or
    This is a single file and there is one master TOC that includes all sections and a section-specific TOC that includes only the individual section.
    In the first case, I think you would want two TOC styles set up, one that includes the chapter heads (if I understood how you said this worked) for the for the master, and you would include all docs in the book when you generate it, and a second style for the individual chapters, with the subheadings you want to include.
    In the second case, it would be similar, but instead of only one style to cover the section TOCS, I think you would need to create a unique set of pargraph styles for the headings in each section (they can all be the same format, based one section, just with unique names), and then make a TOC style for each section that includes only the styles from that section.
    OK,  wait a sec. I just reread what you said: "Another thing: when the numbers are "linked" and updating well, they  display indide a little box. Not a text box, but a kind of little frame  around the numbers. That frame makes it imposible to delete just one  number: when the TOC says that Section 6.1 is in page 135, for example,  you cannot delete just the 5, it deletes, not just the 3 numbers, but  also the doted tab."
    I think these are NOT normal TOCs created by using Layout > TOC (but you could replace them with ones that are, if you set up your styles properly and the text you want to include is appearing on the pages). Those little boxes you mention sound like cross-references, which should update automatically without any intervention at all. Unfortunately, cross-refs can be flakey, especially if they point to another document. I'd open the cross-refs panel and see if you need to recreate a bunch of links.

  • How to find the list of Tables....

    Hi
    How to find the list of Tables associated with When a Goods Issue is done for a Process Order ??
    Kindly tell me step-by-step procedure in browsing it.
    cheers
    MaruthiRam

    Hi
    goto SE16 Click F4, You have two options Information system & Sap Applications.
    Click on SAP Applications & selec the application you wnat to see, for E.g Purchasing you can click on materials managemnt, Purchasing if you drill down you will see the list of tables....
    reward points if useful
    Thanks & Regards
    Kiran

  • How to find child records given a parent key

    I have a master table which is parent for several child tables. I want to display a button to delete a record in master table. I would prefer show this button conditionally so when a master record has child records, I don't show delete button and no error is raised.
    Of course I could scan every child table to find out child records, but I think must exist a generic method
    How can I find out if a given parent key has child records?
    Thanks in advance
    Oscar
    P.S: I'm using 10gR2
    Edited by: user10712087 on 13/01/2009 02:31 PM

    Oscar
    There's no magic/generic way to check that a master row has no associated detail rows. As Pavan says, you have to decide which detail tables to check, and check them using SQL as usual. (Actually, there is a quick way - you delete the row and if there are any child rows with foreign keys that don't cascade, the delete will fail; but of course you can't use this in case the delete succeeds but the user never wants to press the button).
    One addition to Pavan's answer: DO NOT under any circumstances count all the records in every detail table. All you want to know is, is there at least 1 detail record in at least 1 of the tables. No need to count 100 or 1000 rows...
    You can do this like this in your PL/SQL
    FUNCTION check_children(p_master_id IN INTEGER) RETURN BOOLEAN
    IS
      CURSOR c_child1  IS
      select 1 from child_table_1 where master_id = check_children.p_master_id;
      CURSOR c_child2 IS
      select 1 from child_table_2 where master_id = check_children.p_master_id;
      -- etc for all child tables
    l_rec_present integer := null;
    BEGIN
        OPEN c_child_1;
        FETCH c_child_1 INTO l_rec_present;
        CLOSE c_child_1;
        IF l_rec_present i= 1 THEN
            -- there is a child in child_table_1
            RETURN TRUE;
        END IF;
        OPEN c_child_2;
        FETCH c_child_2 INTO l_rec_present;
        CLOSE c_child_2;
        IF l_rec_present i= 1 THEN
            RETURN TRUE;
        END IF;
    -- etc for each child; finally, if no child found:
       RETURN FALSE;
    END;This makes sure that (1) you stop as soon as you find any child, and (2) you don't get any NO_DATA_FOUND or TOO_MANY_ROWS exceptions raised.
    HTH
    Regards Nigel

  • If Records of different list items are entered, then the data is not getting inserted in the table.

    Hi Everyone,
    A Very Very Happy, Fun-filled, Awesome New Year to You All.
    Now coming to the discussion of my problem in Oracle Forms 6i:
    I have created a form in which the data is entered & saved in the database.
    CREATE TABLE MATURED_FD_DTL
      ACCT_FD_NO    VARCHAR2(17 BYTE)               NOT NULL,
      CUST_CODE     NUMBER(9),
      FD_AMT        NUMBER(15),
      FD_INT_BAL    NUMBER(15),
      TDS           NUMBER(15),
      CHQ_NO        NUMBER(10),
      CREATED_DATE  DATE,
      CREATED_BY    VARCHAR2(15 BYTE),
      PREV_YR_TDS   NUMBER(15),
      ADD_FD_AMT    NUMBER(15),
      DESCRIPTION   VARCHAR2(100 BYTE),
      P_SAP_CODE    NUMBER(10),
      P_TYPE        VARCHAR2(1 BYTE)
    The form looks like below:
    ENTER_QUERY     EXECUTE_QUERY     SAVE     CLEAR     EXIT
    ACCT_FD_NO
    CUST_CODE
    FD_AMT
    FD_INT_BAL
    PREV_YR_TDS
    TDS
    ADD_FD_AMT
    P_SAP_CODE
    P_TYPE
    CHQ_NO
    DESCRIPTION
    R
    W
    P
    List Item
    There are 5 push buttons namely ENTER_QUERY, EXECUTE_QUERY, SAVE, CLEAR, EXIT.
    The table above is same as in the form. All the fields are text_item, except the P_TYPE which is a List_Item ( Elements in List Item are R, W & P).
    The user will enter the data & save it.
    So all this will get updated in the table MATURED_FD_DTL .
    I am updating one column in another table named as KEC_FDACCT_MSTR.
    and
    I want this details to get updated in another table named as KEC_FDACCT_DTL only if the P_TYPE='P'
    CREATE TABLE KEC_FDACCT_DTL
      FD_SR_NO                NUMBER(8)             NOT NULL,
      FD_DTL_SL_NO            NUMBER(5),
      ACCT_FD_NO              VARCHAR2(17 BYTE)     NOT NULL,
      FD_AMT                  NUMBER(15,2),
      INT_RATE                NUMBER(15,2),
      SAP_GLCODE              NUMBER(10),
      CATOGY_NAME             VARCHAR2(30 BYTE),
      PROCESS_YR_MON          NUMBER(6),
      INT_AMT                 NUMBER(16,2),
      QUTERLY_FD_AMT          NUMBER(16,2),
      ITAX                    NUMBER(9,2),
      MATURITY_DT             DATE,
      FDR_STAUS               VARCHAR2(2 BYTE),
      PAY_ACC_CODE            VARCHAR2(85 BYTE),
      BANK_CODE               VARCHAR2(150 BYTE),
      NET_AMOUNT_PAYABLE      NUMBER,
      QUATERLY_PAY_DT         DATE,
      CHEQUE_ON               VARCHAR2(150 BYTE),
      CHEQUE_NUMBER           VARCHAR2(10 BYTE),
      CHEQUE_DATE             DATE,
      MICR_NUMBER             VARCHAR2(10 BYTE),
      PAY_TYPE                VARCHAR2(3 BYTE),
      ADD_INT_AMT             NUMBER(16,2),
      ADD_QUTERLY_FD_AMT      NUMBER(16,2),
      ADD_ITAX                NUMBER(16,2),
      ECS_ADD_INT_AMT         NUMBER(16),
      ECS_ADD_QUTERLY_FD_AMT  NUMBER(16),
      ECS_ADD_ITAX            NUMBER(16)
    So for the push button 'Save' , i have put in the following code in the Trigger : WHEN BUTTON PRESSED,
    BEGIN
         Commit_form;
              UPDATE KEC_FDACCT_MSTR SET PAY_STATUS='P' WHERE ACCT_FD_NO IN (SELECT ACCT_FD_NO FROM MATURED_FD_DTL);
              UPDATE MATURED_FD_DTL SET CREATED_DATE=sysdate, CREATED_BY = :GLOBAL.USER_ID WHERE ACCT_FD_NO = :acct_fd_NO;
    IF :P_TYPE='P' THEN
         INSERT INTO KEC_FDACCT_DTL
              SELECT FD_SR_NO, NULL, MATURED_FD_DTL.ACCT_FD_NO, FD_AMT, INT_RATE, P_SAP_CODE,
                   GROUP_TYPE, (TO_CHAR(SYSDATE, 'YYYYMM'))PROCESS_YR_MON,
                   FD_INT_BAL, (FD_INT_BAL-MATURED_FD_DTL.TDS)QUTERLY_FD_AMT , MATURED_FD_DTL.TDS,
                   MATURITY_DATE, P_TYPE, NULL, NULL, (FD_INT_BAL-MATURED_FD_DTL.TDS)NET_AMOUNT_PAYABLE,
                   NULL, NULL, CHQ_NO, SYSDATE, NULL, 'CHQ', NULL, NULL, NULL, NULL, NULL, NULL
              FROM MATURED_FD_DTL, KEC_FDACCT_MSTR
         WHERE KEC_FDACCT_MSTR.ACCT_FD_NO=MATURED_FD_DTL.ACCT_FD_NO;
    END IF;
    COMMIT;
         MESSAGE('RECORD HAS BEEN UPDATED AS PAID');
         MESSAGE(' ',no_acknowledge);
    END;
    If P_TYPE='P' , then the data must get saved in KEC_FDACCT_DTL table.
    The problem what is happening is,
    If i enter the details with all the records as 'P' , the record gets inserted into the table KEC_FDACCT_DTL
    If i enter the details with records of 'P' and 'R' , then nothing gets inserted into the table KEC_FDACCT_DTL.
    Even the records with 'P' is not getting updated.
    I want the records of 'P' , to be inserted into table KEC_FDACCT_DTL, even when multiple records of all types of 'P_Type' (R, w & P) are entered.
    So, can you please help me with this.
    Thank You.
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    Oracle Forms Builder 6i.

    Its not working properly.
    At Form_level_Trigger: POST_INSERT, I have put in the following code.
    IF :P_TYPE='P'THEN
      INSERT INTO KEC_FDACCT_DTL
      SELECT FD_SR_NO, NULL, MATURED_FD_DTL.ACCT_FD_NO, FD_AMT, INT_RATE, P_SAP_CODE,
      GROUP_TYPE, (TO_CHAR(SYSDATE, 'YYYYMM'))PROCESS_YR_MON,
      FD_INT_BAL, (FD_INT_BAL-MATURED_FD_DTL.TDS)QUTERLY_FD_AMT , MATURED_FD_DTL.TDS,
      MATURITY_DATE, P_TYPE, NULL, NULL, (FD_INT_BAL-MATURED_FD_DTL.TDS)NET_AMOUNT_PAYABLE,
      NULL, NULL, CHQ_NO, SYSDATE, NULL, 'CHQ', NULL, NULL, NULL, NULL, NULL, NULL
      FROM MATURED_FD_DTL, KEC_FDACCT_MSTR
      WHERE KEC_FDACCT_MSTR.ACCT_FD_NO=MATURED_FD_DTL.ACCT_FD_NO;
      END IF;
    MESSAGE('RECORD HAS BEEN UPDATED AS PAID');
    MESSAGE(' ',no_acknowledge);
    It worked properly when i executed first time, but second time , in database duplicate values were stored.
    Example: First I entered the following in the form & saved it.
    ACCT_FD_NO
    CUST_CODE
    FD_AMT
    FD_INT_BAL
    PREV_YR_TDS
    TDS
    ADD_FD_AMT
    P_SAP_CODE
    P_TYPE
    CHQ_NO
    DESCRIPTION
    250398
    52
    50000
    6000
    0
    600
    0
    45415
    P
    5678
    int1
    320107
    56
    100000
    22478
    3456
    2247
    0
    45215
    R
    456
    320108
    87
    50000
    6500
    0
    650
    0
    21545
    W
    0
    In the database, in table KEC_FDACCT_DTL, the ACCT_FD_NO:250398 with P_TYPE='P' record was inserted.
    ACCT_FD_NO
    P_TYPE
    250398
    P
    But second time, when i entered the following in the form & saved.
    ACCT_FD_NO
    CUST_CODE
    FD_AMT
    FD_INT_BAL
    PREV_YR_TDS
    TDS
    ADD_FD_AMT
    P_SAP_CODE
    P_TYPE
    CHQ_NO
    DESCRIPTION
    260189
    82
    50000
    6000
    0
    600
    0
    45415
    P
    5678
    interest567
    120011
    46
    200000
    44478
    0
    4447
    0
    45215
    R
    456
    30191
    86
    50000
    6500
    0
    650
    0
    21545
    W
    56
    In the database, in the table KEC_FDACCT_DTL, the following rows were inserted.
    ACCT_FD_NO
    P_TYPE
    250398
    P
    250398
    P
    260189
    P
    320107
    R
    320108
    W
    There was duplicate of 250398 which i dint enter in the form second time,
    All the other P_TYPE was also inserted , but i want only the P_TYPE='P' to be inserted into the database.
    I want only those records to be inserted into the form where P_TYPE='P' and duplicate rows must not be entered.
    How do i do this???

  • How to find the longest record in a table?

    Hello,
    Is there a function to find the longest record in a table? Or is there a data dictionary that would tell you which record contains the longest data?
    I have a table with five columns and one million records. I want to find the record (5 columns combined) with the longest data. Thank you.

    Dear watson2000!
    The function "VSIZE" tells you the number of bytes in the internal representation of a column which means the size of a value within a column. An example of vsize can be found here:
    [http://www.adp-gmbh.ch/ora/sql/vsize.html]
    So I think you should try it with this query to get the size of the longest record:
    SELECT MAX(VSIZE(column1)) +
           MAX(VSIZE(column2))  +
           MAX(VSIZE(column3))  +
           MAX(VSIZE(column4))  +
           MAX(VSIZE(column5)) AS "Maximum Row"
    FROM your_table;To identify the longest record try like this:
    SELECT rowid
    FROM   your_table
    GROUP BY rowid
    HAVING  (MAX(VSIZE(column1)) +
             MAX(VSIZE(column2)) +
             MAX(VSIZE(column3)) +
             MAX(VSIZE(column4)) +
             MAX(VSIZE(column5))) = (SELECT MAX(VSIZE(column1)) +
                                          MAX(VSIZE(column2))  +
                                          MAX(VSIZE(column3))  +
                                          MAX(VSIZE(column4))  +
                                          MAX(VSIZE(column5))
                                   FROM your_table;)I hope that these two queries could be of help to you.
    yours sincerely
    Florian W.
    Edited by: Florian W. on 23.04.2009 20:53

  • Query to find out the list of tables used in a package

    hello,
    can anyone please help me out with a query; i want to find out the list of tables used by a particular package.
    thanks,
    orton

    orton607 wrote:
    thanks for replying guys. But the thing is i am using dynamic sql execute immediate in my package, so i want those tables also and the schema name.
    thanks,
    ortonThis is not possible. The best you could do is to have a good guess.
    Or how would you parse some dynamic statement as this:
       v_suffix := 'loyees';
       v_sql := 'Select count(*) from (select ''nonsense'' col1 from emp'||v_suffix||') where col1 = ''Y'''';
       execute_immediate(v_sql);
    ...What is the table name? How do you want to parse that?
    Better rewrite all dynamic SQL statements into non dynamic ones. Or do the source control logic for those dynamic parts in an extra module. For example implement your own dependency table and force every developer to add there all dynamic parts.

  • SAP DBTech JDBC: [259] (at 26): invalid table name:  Could not find table/view RS_POOL_CLUSTER_TABLES in schema SYSTEM: line 1 col 27 (at pos 26)

    Hi Gurus,
    I am trying to load a HANA column table using the import function and get the following error even though the mappings from the file to the table are 1:1.
    I get the following errors:
    Error 1: SAP DBTech JDBC: Result set is positioned before first row.
    Error 2: SAP DBTech JDBC: [259] (at 26): invalid table name:  Could not find table/view RS_POOL_CLUSTER_TABLES in schema SYSTEM: line 1 col 27 (at pos 26)
    With the following stack trace:
    com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [259] (at 26): invalid table name:  Could not find table/view RS_POOL_CLUSTER_TABLES in schema SYSTEM: line 1 col 27 (at pos 26)
      at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:334)
      at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateDatabaseException(SQLExceptionSapDB.java:165)
      at com.sap.db.jdbc.packet.ReplyPacket.buildExceptionChain(ReplyPacket.java:100)
      at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:1141)
      at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:888)
      at com.sap.db.jdbc.StatementSapDB.sendCommand(StatementSapDB.java:929)
      at com.sap.db.jdbc.StatementSapDB.sendSQL(StatementSapDB.java:978)
      at com.sap.db.jdbc.StatementSapDB.execute(StatementSapDB.java:256)
      at com.sap.db.jdbc.StatementSapDB.executeQuery(StatementSapDB.java:401)
      at com.sap.db.jdbc.trace.Statement.executeQuery(Statement.java:131)
      at com.sap.ndb.studio.bi.dataprovisioning.util.DBUtil.getPoolTables(DBUtil.java:200)
      at com.sap.ndb.studio.bi.dataprovisioning.util.DBUtil.getTablesToHide(DBUtil.java:188)
      at com.sap.ndb.studio.bi.filedataupload.ui.wizards.pages.SelectTableDialog.createDialogArea(SelectTableDialog.java:108)
      at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:775)
      at org.eclipse.jface.window.Window.create(Window.java:432)
      at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1104)
      at com.sap.ndb.studio.bi.filedataupload.ui.wizards.pages.SelectTableDialog.create(SelectTableDialog.java:186)
      at com.sap.ndb.studio.bi.filedataupload.ui.wizards.pages.ImportFileSelectionWizardPage$14.widgetSelected(ImportFileSelectionWizardPage.java:779)
      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
      at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
      at org.eclipse.jface.window.Window.open(Window.java:802)
      at org.eclipse.ui.internal.handlers.WizardHandler$Import.executeHandler(WizardHandler.java:152)
      at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:279)
      at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
      at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
      at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
      at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
      at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
      at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
      at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
      at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
      at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
      at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
      at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:420)
      at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
      at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
      at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
      at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
      at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
      at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
    I'm sure many of you have come across this before. Any help will be much appreciated.
    Thanks in advance

    Hello Akhtar,
    Have you tryed to delete the heador row from your file?
    I received the same error when loading a csv file, but when I delete the heador row it worked.
    Best Regards,
    Juliana Genova

Maybe you are looking for

  • Bank statement number not updating in reference field

    Hi All, After importing EBS, reference field of the posted document will be updated default as "HOUSE BANK" ACCOUNT ID" and "Statement number". But in my case statement number in this field is updating up to 11999. Means, if I run EBS upload with sta

  • Cisco ip phone 7960 cannot connect to call manager express

    The 7960 ip phone seems not to connect to the call manager express router and i have already put the firmware and configured the tftp server,the rest of the phones the 7911`s are all working ok,i have tried to reset the phone but it doesnt respond to

  • Historic Bill

    Hello, I have done an application that shows bill's data. I read the paying of a bill and with this data I get the data bank. well, The problem is that I have been told that if a person has changed of bank I could be reading wrong data because the ba

  • Itunes not syncing for carrier settings after restore.

    hii, yesterday i have restored my factory unlocked iphone4 with 4.3.3, after restore itunes is not showing up connecting store for carrier settings and directely starting syncing for contacts,mail etc.. any help is aprreciated

  • Can I use my Airport Extreme as a wireless bridge?

    Can I use my Airport Extreme as a wireless bridge?