Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SE16: Number of entries: Execute in background?

Former Member
0 Kudos

Hi,

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?

Thanks,

Thomas

1 ACCEPTED SOLUTION

Clemenss
Active Contributor
0 Kudos

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

Regards,

Clemens

7 REPLIES 7

Former Member
0 Kudos

Hello,

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.
endif.

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

Vikranth

0 Kudos

Thanks, but my problem was, that the customer does not give me developer key.

Thomas

0 Kudos

Hello,

Well then did you try what Clemens suggested?

Vikranth

andrea_olivieri
Contributor

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|http://help.sap.com/saphelp_nw2004s/helpdata/en/82/f0abb396969448a88863cd26a59182/content.htm]

Regards,

Andrea

Clemenss
Active Contributor
0 Kudos

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

Regards,

Clemens

bryan_cain
Contributor

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.

AnilDasari
Explorer
0 Kudos

Thanks for posting the TAANA transaction, it's really flexible.