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: 

How many entries in a Table??

Former Member
0 Kudos

Hi Experts,

Pls. let me know, How to to get it know that, each table does have so many entries? say, BKPF 10 million, like that, i need to display the entries in each table!!

I know, I can write a report prog. but, wuld like know that, Is there any way, to make it simple?? like using DD03T....some thing like that.......

thanq.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
TABLES: dd02l.

SELECT-OPTIONS: s_tabnam FOR dd02l-tabname.

DATA: BEGIN OF itab_tables OCCURS 0,
        tabname LIKE dd02l-tabname,
        count   TYPE i.
DATA: END OF itab_tables.


START-OF-SELECTION.

  SELECT tabname INTO TABLE itab_tables
                       FROM dd02l
                      WHERE tabname  IN s_tabnam
                        AND tabclass EQ 'TRANSP'.

  LOOP AT itab_tables.
    SELECT COUNT(*) FROM (itab_tables-tabname)
                    INTO itab_tables-count.
    MODIFY itab_tables.
    WRITE:/ itab_tables-tabname,
            itab_tables-count.
  ENDLOOP.

Sorry, I should have removed the extra data declarations.

Message was edited by:

Srinivas Adavi

10 REPLIES 10

Former Member
0 Kudos

Srikar,

declare a parameter for dbtable.

use select count(*) from dbtable.

Reward if it helps,

Satish

Former Member
0 Kudos

As per my knowledge... NO

When we press No. Of Entries, the system uses SQL query to find it out.. but it don't hit some other table to get it.

Former Member
0 Kudos

Hi

goto SE16

enter table name

enter

check <b>number of entries</b> in table

Regards

Anji

0 Kudos

hi,

already, I know ur idea, i always do the same. my requirement is differrent.

but, satish idea is working out.........but, i need to do some changes in sql of the following.........

parameter db_table_name(30) value 'VBAK'.

select count( * ) from vbak into entries.

write sy-dbcnt.

bcoz, here i hard coded the vbak, but, i need to replace it with paremeter_table_entered_by_user..............so,

1 - pls. let me know, how can I concatenate/use variabll for FROM clause in SQL

2 - Where(in which table) Can I find all table names existing in SAP,? is it DD03T?

3- if user wide opens the parameter in selection screen, prog. shuld pull all table name together with # of entories in it!

thanq.

Message was edited by:

Srikhar

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please go to SE16, enter BKPF and hit enter.

Next screen, click on number of entries button.

Regards,

Ferry Lianto

0 Kudos

hi,

already, I know ur idea, i always do the same. my requirement is differrent.

but, satish idea is working out.........but, i need to do some changes in sql of the following.........

parameter db_table_name(30) value 'VBAK'.

select count( * ) from vbak into entries.

write sy-dbcnt.

bcoz, here i hard coded the vbak, but, i need to replace it with select_options_table_entered_by_user..............so,

1 - pls. let me know, how can I concatenate/use variabll for FROM clause in SQL

2 - Where(in which table) Can I find all table names existing in SAP,? is it DD03T?

thanq.

ferry_lianto
Active Contributor
0 Kudos

Hi,

1 - pls. let me know, how can I concatenate/use variabll for FROM clause in SQL.


DATA: ENTRIES TYPE I.
                                              
PARAMETERS: P_TAB LIKE DD02L-TABNAME DEFAULT 'VBAK'.
                            
SELECT COUNT( * )
INTO ENTRIES
FROM (P_TAB). 

WRITE: ENTRIES.

2 - Where(in which table) Can I find all table names existing in SAP,? is it DD03T?

Please use table DD02L.

Regards,

Ferry Lianto

Message was edited by:

Ferry Lianto

Former Member
0 Kudos
TABLES: dd02l.

SELECT-OPTIONS: s_tabnam FOR dd02l-tabname.

DATA: BEGIN OF itab_tables OCCURS 0,
        tabname LIKE dd02l-tabname,
        count   TYPE i.
DATA: END OF itab_tables.


START-OF-SELECTION.

  SELECT tabname INTO TABLE itab_tables
                       FROM dd02l
                      WHERE tabname  IN s_tabnam
                        AND tabclass EQ 'TRANSP'.

  LOOP AT itab_tables.
    SELECT COUNT(*) FROM (itab_tables-tabname)
                    INTO itab_tables-count.
    MODIFY itab_tables.
    WRITE:/ itab_tables-tabname,
            itab_tables-count.
  ENDLOOP.

Sorry, I should have removed the extra data declarations.

Message was edited by:

Srinivas Adavi

0 Kudos

Hi Srinivas Adavi

As a part of my current project I have to do FI table analysis

I am using SE11 (to analyze the nature of table (is it a Customized table or System table or application table or Master Data ) and SE16 (to find out number of entries in that specific table)

I know TAANA can perform table analysis using analysis variant or ad-hoc variant

I am also aware that multiple tables can be analyzed by running TAAN_PROCESS_MULTIPLE program using transaction SA38. But I can not use this program for some security reasons and one of our systems (4.7C) it is not available

I need to analyze 3500 tables and I need some tool/program/report wherein I can get results produced by SE11 and SE16 or may be descriptive report about each table.

Do you have any program to run to analyse multiple tables ?If yes , I sincerely request you to advise me step by step instructions to run the program. (I am sorry I am novice in programming)

I sincerely seek your assistance and guidance in the process

I look forward to hear from you .If possible please responnd on my personal e mail gmilind@rogers.com

Regards

MILIND

former_member195698
Active Contributor
0 Kudos

See the Tcode DB05

Regards,

Abhishek