Skip to Content
author's profile photo Former Member
Former Member

SE16: Number of entries: Execute in background?


I have to know the number of entries of a table for a special selection.

The table is huge and I do not get the number of entries (for the selection criteria I enter) because of the timeout.

I know that I can execute in background any selection, but I neet the number of entries (some Million expected).

If I would run the selection instead of number of entries then the result would go to SP01. However cannot do this becaus ethere will be millions.

Who knows how to execute the query in background?



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Nov 04, 2009 at 10:56 AM

    Hi Thomas,

    easy: Start Transaction DB05, enter your table name, press F8 for execution which is done by default in background.

    The result has what you need:

    Date/time of analysis:                  04.11.2009  11:53:02
    Analyzed table:                         T100T
    Total number of rows:                         10.664 rows
    Requested bytes per row:                          81 bytes per row
    Requested bytes to be buffered 100%:         863.784 bytes
    Current buffering mode:                   single key buffering



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 04, 2009 at 08:00 AM

    Hi Thomas,

    with TAANA transaction you are able to perform more flexible table analysis.

    In your case you only need to execute the DEFAULT analysis on your table in background. The DEFAULT analysis returns as result the number of entries.

    For further details check the [official documentation|]



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 18, 2019 at 01:55 PM

    So, this is a really old question at this point, but I found a very good answer on my own. The answers above are great, if you have access to those t-codes, but I don't.

    Turns out, you can do this with SE16n & SM36.

    Go to SE16n, set up the selection criteria you want to count, and then choose "Extras" -> "Batch Variant (Number of Rows)." Save your variant, then go to SM36 and create a batch job for the program SE16N_BATCH and the variate you created earlier. The spool output of this batch job will have the count you are looking for.

    Anyway, thought I'd throw this out there for the next person who comes searching for this answer.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 04, 2009 at 07:29 AM


    If you are open to writing a small program for this, it can be run in background and just get the number of entries if its leading to timeout dump in SE16.

    data: lv_count type i.
    select count(*)
    from dbtable
    into lv_count
    where (conditions as per your selection screen).
    if sy-subrc = 0.
    write: lv_count.

    You could run this in background and get the output i,e the no of entries from SP01


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.