RFC function to return number of records in a table

Hello,
I am looking for a RFC function to return just the number of records in a SAP table.
I don't want to use RFC_READ_TABLE since it takes too long when I query a big table.
Any advices?

Check the following post: Link: [Re: RFC function module to count records in DB table;

Similar Messages

  • Exist RFC Function or Bapi for insert Records form a external program?

    i create a Ztable same as tell me here:
    http://abaplovers.blogspot.com/2008/02/creating-table-in-sap.html
    5 String Fileds 2 Date Fields 2 Numeric Fields
    my question is exist a RFC Function or Bapi for insert Records form a external program (Delphi/Visual Basic)?
    Any advices?
    Thanks.

    hi madhurao123 thanks for answer.
    But Why block the Thread?
    This question is no so basic, yet never learn, the forum must be open to these questions maybe open a forum somewhere basic but must be able to do these basic questions.
    IT Toolbox commented the same thing, but if not here or ITtoolbox or where else can ask basic questions?
    Advise me, thank you.

  • NUMBER OF RECORDS IN EACH TABLE???

    Hi!
    how can i find the number of records in each table in the database. the result should be like this
    table_1 123
    table_2 60
    table_3 88
    thanks!!
    also if we want to see it only for a particular schema???

    You can get all the table names and schemas from ALL_TABLES table.
    then you can stored that on a cursor,
    then you can create a function where you use an execute_immediate to run the queries dinamically. with that you can run a COUNT for each TABLE
    That's the idea give it a shot :)
    Regards

  • Number of records in SETUP table

    Hello
    I am working with PO extractor. Is the number of records in XXXXXXSETUP table equal to the number of records setup?

    Hi if I understand the question the answer is no.  For example I have recently carried out a setup run for Stock Initialisation MC03BX0SETUP.
    The number of records in this table is just over 4000 and when I carry out an opening balance load to BW for the 2LIS_03_BX the number of records are just under 2million
    The setup tables are cluster tables

  • How  to retrieve one row from the number of records in a table

    i want to retrieve the rows from the number of records in a table without using the perticular column name.

    select count(*) from table
    /If you have your table currently analyzed, and no changes have been made, then you could
    select num_rows from user_tables where table_name = 'table'

  • SQL help: return number of records for each day of last month.

    Hi: I have records in the database with a field in the table which contains the Unix epoch time for each record. Letz say the Table name is ED and the field utime contains the Unix epoch time.
    Is there a way to get a count of number of records for each day of the last one month? Essentially I want a query which returns a list of count (number of records for each day) with the utime field containing the Unix epoch time. If a particular day does not have any records I want the query to return 0 for that day. I have no clue where to start. Would I need another table which has the list of days?
    Thanks
    Ray

    Peter: thanks. That helps but not completely.
    When I run the query to include only records for July using a statement such as following
    ============
    SELECT /*+ FIRST_ROWS */ COUNT(ED.UTIMESTAMP), TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD') AS DATA
    FROM EVENT_DATA ED
    WHERE AGENT_ID = 160
    AND (TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY')+(ED.UTIMESTAMP/86400)), 'MM/YYYY') = TO_CHAR(SYSDATE-15, 'MM/YYYY'))
    GROUP BY TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD')
    ORDER BY TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD');
    =============
    I get the following
    COUNT(ED.UTIMESTAMP) DATA
    1 07/20
    1 07/21
    1 07/24
    2 07/25
    2 07/27
    2 07/28
    2 07/29
    1 07/30
    2 07/31
    Some dates donot have any records and so no output. Is there a way to show the missing dates with a COUNT value = 0?
    Thanks
    Ray

  • Number of records in internal table

    Hi
    How can I tjeck an internal table for the number of records it contains (even if it contains 0).
    Thanks in advance, regards
    Torben

    Hi,
    DESCRIBE TABLE itab.
    Effect
    Returns the attributes of the internal table itab. You must use at least one of the additions listed below:
    Note
    The DESCRIBE statement cannot be used for all ABAP types. In connection with ABAP Objects, SAP has introduced a RTTI concept based on system classes to determine type attributes at runtime. This concept applies to all ABAP types and as such covers all the functions of the DESCRIBE TABLE statement.
    Extras:
    1. ... LINES n
    2. ... OCCURS n
    3. ... KIND   k
    Addition 1
    ... LINES n
    Effect
    Places the number of filled lines of the table t in the field lin. The value returned to lin has type I.
    Note
    The number of filled lines of the table itab can also be ascertained using the predefined function lines( itab ).
    Example
    DATA: N    TYPE I,
          ITAB TYPE TABLE OF I.
    CLEAR ITAB.
    APPEND 36 TO ITAB.
    DESCRIBE TABLE ITAB LINES N.
    Result: N contains the value 1.
    Addition 2
    ... OCCURS n
    Effect
    Passes the size of the OCCURS parameter from the table definition (as defined with DATA) to the variable n. The value returned to n has type I.
    Example
    DATA: N1    TYPE I,
          N2    TYPE I,
          ITAB1 TYPE TABLE OF I INITIAL SIZE 10,
          ITAB2 TYPE I OCCURS 5.
    DESCRIBE TABLE ITAB1 OCCURS N1.
    DESCRIBE TABLE ITAB2 OCCURS N2.
    Result: OCC contains the value 10 and N2 the value 5.
    Addition 3
    ... KIND k
    Effect
    Writes the table type from itab to the variables n. The value returned to k is of type C. The constants SYDES_KIND-STANDARD, SYDES_KIND-SORTED and SYDES_KIND-HASHED are defined in the type group SYDES for the return values.
    Example
    Generic FORM routine any table type
    TYPE-POOLS: SYDES.
    FORM GENERIC_FORM USING ITAB TYPE ANY TABLE.
      DATA: K TYPE C.
      DESCRIBE TABLE ITAB KIND K.
      CASE K.
        WHEN SYDES_KIND-STANDARD.
        WHEN SYDES_KIND-SORTED.
        WHEN SYDES_KIND-HASHED.
      ENDCASE.
    ENDFORM.
    Notes
    Performance: The runtime for executing the DESCRIBE TABLE statement is approximately 4 msn (standardized microseconds).
    The DESCRIBE TABLE statement also passes values to the SY-TFILL and SY-TLENG System fields
    Additional help
    Determining the Attributesof Internal Tables
    Thanks,
    Sankar M

  • How to restrict the number of Records into the Table?

    Is there any way that I can restrict the number of records can be entered into the table?
    For example I have created a table TAB1 with size category 0( zero).
    User dont want to enter more than 100 values, How to restrict the number entries? Whether Basis can do it?
    Regards,
    Prathap

    Hi Prathap,
    You can write a code in table maintenance events to restrict the number of Records added into the Table to constant.
    Solution:
    Se11 -> enter table name (TAB1) -> F6 -> Utlities -> Table maint. generator -> Envirnment -> modification -> events -> write here the form routine name.
    Double click on routine name. You will get into include section of the code. Write here code like:
    IF current_rec_num > 100.
       messgae error 'Entry restriceted to 100'
    ENDIF.
    Somewhat this way you can achieve your target.
    Regards,
    Sachin

  • Number of Records in one table

    Hi All,
    Can anybody let me know that in Oracle9i lite database, one table can have how many records. I mean is their any restriction on maximum number of ROWs for a table, like Palm database (PDB files) has a restriction that one table can have maximum 64000 rows.
    Is the same thing happen with Oracle lite database also
    Thansk in advance.

    We have had several tests of hundreds of thousands of rows using 9iLite on a PocketPC host. The upper bound appears to be based upon the physical limit of the host and not 9iLite.
    RP.

  • Number of records in setup tables

    Hi all,
    How do we find out the number of records extracted into setup tables ?
    Thanks in advance
    Kiran

    Hi Kiran,
    You can check in the RSA3 for the data source.
    In TA NPRT check for the no.of records and then cross check in SE16.
    Assign points if it helps
    Regards,
    Sinivas
    Message was edited by:
            Srinivas
    Message was edited by:
            Srinivas

  • Number of records in FAGLFLEXT table

    Dear colleagues,
    Could You please tell me what the maximum number of records FAGLFLEXT table may contain.
    I was said during FI-GL migration project in 2008 that the optimal number of records is 500 000 per year.
    After having implemented new project we expect the number of records to increase approximately up to 1 500 000 - 3 500 000 records for 1 year. Is this critical?
    I read at the forum that SAP recommends to have maximum 10 000 000 records in this table but it was not clarified for what period: for one year or for the whole life of the system.
    Regards,
    Stanislav.

    - hope below notes help.
    [Note 820495|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=820495]
    [Note 1045430|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1045430]
    Rgds.

  • Number of record  with multi-table insert

    Hi,
    I need to insert into 3 different tables from one big source table so I decided to use multi-table insert. I could use three inserts statements but the source table is an external table and I would prefer not reading it three times.
    I wonder if there is a way to get the exact number of records inserted in each one of the tables?
    I tried using rowcount but I all I get is the number of rows inserted in all three tables. Is there a way to get this info without having to execute a "select count" in each table afterward?
    Thanks
    INSERT /*+ APPEND */
    WHEN RES_ENS='PU' THEN
    INTO TABLE1
    VALUES(CD_ORGNS, NO_ORGNS, DT_DEB, SYSDATE)
    WHEN RES_ENS='PR' THEN
    INTO TABLE2
    VALUES(CD_ORGNS, UNO_ORGNS, DT_DEB, SYSDATE)
    ELSE
    INTO TABLE3
    VALUES(CD_ORGNS, NO_ORGNS, DT_DEB, SYSDATE)
    SELECT ES.CD_ORGNS CD_ORGNS, ES.RES_ENS RES_ENS, ES.DT_DEB DT_DEB, ES.NO_ORGNS NO_ORGNS
    FROM ETABL_ENSGN_SUP ES

    I have a large number of data to load in those three tables. I do not want to use PL/SQL (with loops and lines of codes) because I can do the insert directly from the source table and it saves a lot of time.
    INSERT /*+APPEND*/
    WHEN condition1 THEN
    INTO table1
    WHEN condition2 THEN
    INTO table2
    SELECT xx FROM my_table
    For example, if my_table has 750000000 rows, I only need to read it once and the INSERT..SELECT is a really fast way to load data.
    As I was saying, the only problem I've got, is that I cannot get the number of rows in each table. Do you know a way to get it?

  • Procedure inserting different number of records in GT table

    I have procedure, in the procedure a dynamic query is get created. Then query is open using OPEN for statement into refcusror. Then I'm fetching the data into record type object within a loop..end loop and inserting the records in a GT table.
    But problem is for the same data procedure is inserting less records, when i recomplie the procedure it began to insert correct number of data.
    I wonder whether is environment issue or something else? Please advise if any one faced such type problem.

    Hi upennit. Not much info to go on there.
    Have a read of Re: 2. How do I ask a question on the forums?
    then post back with some relevant info.

  • Total number of records of partition tables exported using datapump

    Hi All,
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    OS: RHEL
    I exported a table with partitions using datapump and I would like to verify the total number of all the records exported of all these partition tables.The export has a query on it with WHERE ITEMDATE< TO_DATE (1-JAN-2010). I need it to compare with the exact amount of records in the actual table if it's the same.
    Below is the log file of the exported table. It does not show the total number of rows exported but only individually via partition.
    Starting "SYS"."SYS_EXPORT_TABLE_05": '/******** AS SYSDBA' dumpfile=data_pump_dir:GSDBA_APPROVED_TL.dmp nologfile=y tables=GSDBA.APPROVED_TL query=GSDBA.APPROVED_TL:"
    WHERE ITEMDATE< TO_DATE(\'1-JAN-2010\'\)"
    Estimate in progress using BLOCKS method...
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 517.6 MB
    Processing object type TABLE_EXPORT/TABLE/TABLE
    Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
    Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
    Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2008_Q3" 35.02 MB 1361311 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2008_Q4" 33.23 MB 1292051 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2010_Q4" 5.875 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2011_Q1" 5.875 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2009_Q3" 30.53 MB 1186974 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2010_Q3" 5.875 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2009_Q1" 30.44 MB 1183811 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2009_Q2" 30.29 MB 1177468 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2009_Q4" 30.09 MB 1170470 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2010_Q2" 5.875 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2011_Q2" 5.875 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2010_Q1" 5.875 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2011_Q3" 5.875 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2011_Q4" 5.875 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2012_Q1" 5.875 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2006_Q3" 0 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2006_Q4" 0 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2007_Q1" 0 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2007_Q2" 0 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2007_Q3" 0 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2007_Q4" 0 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2008_Q1" 0 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2008_Q2" 0 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2012_Q2" 0 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2012_Q3" 0 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_2012_Q4" 0 KB 0 rows
    . . exported "GSDBA"."APPROVED_TL":"APPROVED_TL_MAXVALUE" 0 KB 0 rows
    Master table "SYS"."SYS_EXPORT_TABLE_05" successfully loaded/unloaded
    Dump file set for SYS.SYS_EXPORT_TABLE_05 is:
    /u01/export/GSDBA_APPROVED_TL.dmp
    Job "SYS"."SYS_EXPORT_TABLE_05" successfully completed at 12:00:36
    Edited by: 831134 on Jan 25, 2012 6:42 AM
    Edited by: 831134 on Jan 25, 2012 6:43 AM
    Edited by: 831134 on Jan 25, 2012 6:43 AM

    I assume you want this so you can run a script to check the count? If not and this is being done manually, then just add up the individual rows. I'm not very good at writing scripts, but I would think that someone here could come up with a script that would sum up the row count for the partitions of the tables from your log file. This is not something that Data Pump writes to the log file.
    Dean

  • How to return number range from sql (dual table)

    in sql plus
    I need to display values (numbers)1 to 52 from dual
    eg,
    1
    2
    3
    4
    5
    etc...
    Is this possible, can you display a range of numbers from an sql statment without creating atble holding the required numbers.
    I am trying to display 1 to 52 (week numbers) but I need to do this from the dual table.
    Creating a table with values 1 to 52 looks like a waste?
    Thanks in anticipation.
    SD.

    If you're running on 9i you may find the solution I posted Re: List all days of a month in single SQL to be useful. Otherwise the general discussion will provide some illumination.
    Cheers, APC

Maybe you are looking for