For number of records

which syntax is used to find out the no. of records in internal table

hi sharma
to find out records in internal table, we've system variable SY-TFILL, we can find out directly.
eg.
describe table itab.
write  sy-tfill.
Reward me if it helps
Thanks
Suren

Similar Messages

  • Creating a Counter for number of records

    Hi Folks,
    I need to show number of purchase orders, quotation items and purchase requisitions in one report. i need to count the number of RFQs and purchase requisitions per purchase order. 
    I have put numeric 1 in update rules but it shows value 1 even if the number of PR is 2. and getting.
    I want to show the same number irrespective of Analysis (even if the anlysis changes from PO to cost center.)             
    I saw one How to Document on counter some time ago in sdn its not there now.
    Please send a reply for this requirement. Its urgent
    Can Anyone forward it to me.
    Regards
    Mahesh

    The document you are looking for can be found at the following link:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7e58e690-0201-0010-fd85-a2f29a41c7af">How to... Count the occurrences of a characteristic relative to one or more other characteristics</a>.
    Hope this helps...
    Bob

  • 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

  • Different number of records in RSA3 for Full and INIT

    Hi All,
    I am about to load the data from 0FI_GL_4 and checked it in RSA3 for the number of records. It returned different number of records when I run the extract with options 'F' and 'C'. Why is it so? This is the first time I am loading the data into BW for this datasource. I would expect the number of records to be same if I do either a full extract or an init but surprised by seeing different number of records.
    Best Regards,
    James.

    Hi James,
    Probably it's because of the time stamps stored in table BWOM2_TIMEST.
    If you run a delta init and than a delta update then the number of the records should match with the record of the full update.
    You can find some more info about table BWOM2_TIMEST here:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a7f2f294-0501-0010-11bb-80e0d67c3e4a#527,7,Timestamp%20Mechanism:%20New%20documents
    Bye,
         Zsolt

  • Number of Records in RSA3 for 0EC_PCA_1

    Dear all,
    I have installed data source 0EC_PCA_1 from content. Data for this data source is extracted from table GLPCT. When see at the table there are only 634 and number of records that are extracted from data source in RSA3 is 28203. I want to understand logic behind this or am I making any mistake.
    On source system side we are ECC 6.0 and 'New GL' Functionality has been activated.
    Request your help as usual.
    Regards
    SN Dubey

    You can try the function module ECPCA_BIW_GET_DATA in order to see what really happens; but it could take some time since it depends a lot on your customizing: if you use special ledgers, the balance carry forward stuff and a lot more...
    An you are correct: I thought straight forward about EC_PCA_3 (GLPCA) instead of EC_PCA_1 (GLPCT); my mistake, sorry for that.
    In any case I cannot tell how it works in ECC.
    regards

  • How to generate the batch number for group of records

    Hi All,
    requirement: i have created one sequence to generate the batch numbers.i have to get the nextval of the sequence for batch number (this column is not part of the table. its dynamic column/alias column) only for every 50000 records of a table.
    detail description:
    for example, if i have 10 records in a table. And, if i want to generate the batch number for every 2 records, then the output should look like belo.
    batch-number qty
    1 10
    1 20
    2 30
    2 40
    3 50
    3 60
    4 70
    4 80
    5 90
    5 100
    Please help me on this. Please let me know if you need more info.

    one more update on the above request. this has to be done using SQL query only.

  • To count number of records in an internal table for a condition

    Hello All,
            I want to count number of records in an internal table for a condition.
    For e.g. -- I have one internal table IT which having fields F1, F2, F3, F4, F5.
                     Now, I want number of records in itnternal table IT where F1 = 'ABC'.
    Is it possible to do..?? If yes, then how.??
    Thanks in advance...!!
    Regards,
    Poonam.

    Hi,
    If you mean an internal table, there are a few ways to do this.
    1 One would be to loop over the table with a WHERE clause and increment a counter.
    data: lv_counter type i.
    clear lv_counter.
    loop at itab where fld1 = 'ABC'.
    lv_counter = lv_counter + 1.
    endloop.
    lv_counter now has the number of rows per the condiction.
    2  Well, you may want to try this as well, and compare to the LOOP way. Not sure what kind of overhead you may get doing this way. Here ITAB is our main internal table, and ITAB_TMP is a copy of it. Again I think there may be some overhead in doing the copy. Next, delete out all records which are the reverse of your condition. Then whatever is left is the rows that you want to count. Then simply do a LINES operator on the internal table, passing the number of lines to LV_COUNT.
    data: itab type table of ttab.
    data: itab_tmp type table of ttab.
    itab_tmp[] = itab[].
    delete table itab_tmp where fld1  'ABC'.
    lv_count = lines( itab_tmp ).
    Thanks & Regards,
    ShreeMohan

  • Number Ranges for Purchasing Info Record

    Dear Guru's
    Number range  interval for Purchase info record  can be  created and assign to group and there are two group for Stock and Non Stock materials.
    Now my query is how the system pick the number range ??? Since we don't have any assignment like PR,PO
      My requirement is we have 3 company code - I need to have different number ranges for purchase Info  record for each company . Guide me to achieve ...
    Thanks in advance
    Regards
    Anand

    SAP has provided only Two standard document Types for Pur. Info Records.
    IL for Stock Material ( with matl No.)
    IN For material Group (w/o MMR).
    By default, if you enter Matl No. in the initial screen, system automatically picks the doc. type IL and the no. range assigned to it.
    If you're not entered matl. no. in the initial screen, and proceed the Transaction further, system picks the doc. type IN and prompts you to enter Matl Group.
    In the second case, the system picks up the no. range as per assignment.
    Here in your case, you want create a new no. range and assign to your IL/ IN.
    For this, you go to the transaction Define No. Ranges in Inforecord, from menu bar, choose Group-> maintain. Here you maintain your new no. range with a name. Now your new group is created with your required no. range.
    Then select your new group ( Check box), select, IL, and click assign button and save.. Your IL is assigned to your new group and system picks the new No. Range when you are creating a Inforecord with Mat No. Similarly, you can change No. range for IN also.
    or one more option you have.
    In the first screen of No. Ranges Transaction, select change intervals tab button, you'll be goto intervals screen. There, from Menu bar, choose Interval-> change current No. Then you reset your current no. to Zero, save it. The again choose Change Interval, then in that screen, change the Interval with your new no. range.
    Here in the second case, u need not maintain new groups. Just changing the Interval for the existing group.
    You can adopt any one of these options.

  • Max Number of records for BAPI 'BAPI_PBSRVAPS_GETDETAIL'

    Hi All,
    Can you suggest me the number of records to be fed to the 'BAPI_PBSRVAPS_GETDETAIL'.
    I am using a few location products for 9 key figures.Whenever number of records
    in selection table increases BAPI behaves in a strange way and the code written below it does not get executed.
    Please guide me to get full points.
    Thanks in Advance,
    Chandan Dubey

    Hi Uma,
        It comes out of the program after this code is executed.I have 50 location product combinations in vit_selection table.
      CALL FUNCTION 'BAPI_PBSRVAPS_GETDETAIL'
        EXPORTING
          planningbook                = planning_book
          period_type                 = 'B'
          date_from                   = l_from_week
          date_to                     = l_to_week
          logical_system              = logical_system
          business_system_group       = business_system_group
        TABLES
          selection                   = vit_selection
          group_by                    = vit_group_by
          key_figure_selection        = vit_kf_selection
          time_series                 = vit_t_s
          time_series_item            = vit_t_s_i
          characteristics_combination = vit_c_c
          return                      = vit_return.
      LOOP AT vit_return.

  • Max number of records for  'BAPI_PBSRVAPS_GETDETAIL'.

    Hi All,
    Can you suggest me the number of records to be fed to the 'BAPI_PBSRVAPS_GETDETAIL'.
    I am using a few location products for 9 key figures.Whenever number of records
    in selection table increases BAPI behaves in a strange way and the code written below it does not get executed.
    Please guide me to get full points.
    Thanks in Advance,
    Chandan Dubey

    Server memory issue !

  • BI Loading for Infoobject : Number of records

    Hi Experts,
    When i am loading the data from DS 0wbs_elemt_attr to Infoobject 0wbs_elemt, in rsa3 there are 102117 number of records. but when i run the infopackge i see the number of records are 102035. I would like to know if there are any checkpoints to check as to where should I check for less number of records that are coming up.
    Kindly advise.
    thanks & regards,
    M.S

    Hi experts,
    I deleted everything and reloaded. It is now reflecting 1020117 number of records(dont know how).
    Thankyou guys for your help. Assigned points.
    thanks & regards,
    M.S
    Edited by: M.S on May 7, 2010 12:14 PM

  • Number range for service master record

    Hi..
    i have an issue in number ranges for service master record.
    when i create a service master record system is generating number ramdomly, its not in series..
    where do i make the settings so that i will get service master number ranges in series...
    Regards
    Sarfraz

    Hi,
    Follow the path:
    SPRO ->Material Management -> External Service Management ->  Service master ->  Define Number Range
    In menu ->Group-> maination->Aagian Group-> Insert
    Now Enter
    Number  Range  Group Text     01( example)
    From Number      80000000
    To Number     89999999
    & save.
    Regards,
    Biju K
    Edited by: Bijay Kumar Barik on Apr 4, 2008 8:45 AM

  • Maximum number of Records for Emigall Upload

    Hi,
    Is there any limit or maximum number of records can be uploaded via Emigall at one time.
    Thanks.

    Hi Satish Kumar,
    There exists no limit except for some exceptions ;o) These exceptions are objects that require more and more memory during runtime due to growing internal tables. This behavior leads to performance issues because more and more time is spend in working on the internal tables instead of updating the database. This is known for the PARTNER migration object and all MM and PM related migration objects, such as, CONNOBJ, INST_MGMT, etc.
    On the other hand a long lasting import run (because it takes such a long time to migrate the objects in the import file) limits your options in controlling the data import, for example, restarting a cancelled import run. As already pointed out, the Distributed Import should be your choice when migrating huge import files with many objects to be migrated.
    I hope this answers your question.
    Kind regards,
    Fritz

  • Maximum number of records for usage of "For all entries"

    Hi,
    Is there a limit on maximum number of records to be selected from the database using "For all entries"  statement ?
    Thanks in advance

    There is a UNDOCUMENTED(??) behaviousr
    FOR ALL ENTRIES does ahidden SELECT DISTINCT & drops duplicates.
    http://web.mit.edu/fss/dev/abap_review_check_list.htm
    3 pitfalls
    "FOR ALL ENTRIES IN..." (outer join) are very fast but keep in the mind the special features and 3 pitfalls of using it.
    (a) Duplicates are removed from the answer set as if you had specified "SELECT DISTINCT"... So unless you intend for duplicates to be deleted include the unique key of the detail line items in your select statement. In the data dictionary (SE11) the fields belonging to the unique key are marked with an "X" in the key column.
    ^^!!!!
    (b) If the "one" table (the table that appears in the clause FOR ALL ENTRIES IN) is empty, all rows in the "many" table (the table that appears in the SELECT INTO clause ) are selected. Therefore make sure you check that the "one" table has rows before issuing a select with the "FOR ALL ENTRIES IN..." clause.
    (c) If the 'one' table (the table that appears in the clause FOR ALL ENTRIES IN) is very large there is performance degradation Steven Buttiglieri created sample code to illustrate this.

  • Create Store Procedure to Count Number of records in Database for each table

    Hello,
    I have created the code which counts the number of records for each table in database. However, I want create store procedure for this code this code that when ever use execute the Store Procedure can provide the database name to execute it and as a result
    table will display number of records in each table.
    Below you will find the code its working:
    CREATE
    TABLE #TEMPCOUNT
    (TABLENAME
    NVARCHAR(128),
    RECORD_COUNT BIGINT)
    -- Creating a TEMP table
    EXEC
    sp_msforeachtable
    'insert #tempcount select ''?'', count(*) from ? with (nolock)'
    SELECT
    * FROM
    #TEMPCOUNT
    ORDER
    BY TABLENAME
    DROP
    TABLE #TEMPCOUNT
    This code need to be convert in store procedure and user can give database name when execute the procedure in order to count the records.
    Looking forward for your support.
    Thanks.
    SharePoint_Consultant_EMEA

    Something like:
    set quoted_identifier off
    go
    create procedure usp_TableCounts
    @DBName as varchar(1000)
    as
    set nocount on
    declare @SQLToExecute varchar(1000)
    CREATE TABLE #TEMPCOUNT (TABLENAME NVARCHAR(128), RECORD_COUNT BIGINT) -- Creating a TEMP table
    set @SQLToExecute = @DBName + ".dbo.sp_msforeachtable 'insert into #tempcount select ''?'', count(*) from ? with (nolock)'"
    print @SQLToExecute
    exec (@SQLToExecute)
    SELECT * FROM #TEMPCOUNT
    ORDER BY TABLENAME
    DROP TABLE #TEMPCOUNT
    GO
    Satish Kartan www.sqlfood.com

Maybe you are looking for

  • HT4437 How do I use apple TV to run my computer or iPad?

    I am trying to use Pandora (a music website from the Internet) from my computer and/or iPad on my apple TV but for some reason I can only access things from iTunes on my apple TV.  How can I show my screen from my computer on my apple TV?

  • Dbms_xmldom package results in ORA-31020

    Hi, I have the following procedure which compiles correct: CREATE OR REPLACE procedure vbk_selproc_doc is queryctx dbms_xmlquery.ctxtype; result varchar2(30000); header varchar2(1000); footer varchar2(1000); body varchar2(20000); line VARCHAR2(2000);

  • DW CS3 Display problem in Firefox and Netscape

    I have a page created using css. I have a div wrapper set at 100% for height and width and it has a background image. It displays correctly in IE, but in Firefox and Netscape it has a white bar along the top. I don't have this online yet, so I know i

  • Shuffle not working properly

    My Itunes library is not working properly. The main problem is the shuffle function. Clicking the shuffle icon to turn it blue and shuffle the play order of the songs does not work. If I sort by name, some of the songs are shuffled where as others wi

  • Unable to connect to wifi.. "incorrect password"

    So I'm sitting here at the car dealer getting some service done and they have a sign indicating free wifi Internet service. Nice. So I try to log on with the iPad...15 times. I think maybe I'm typing the password in wrong or they changed it so I try