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 to find out Number of entries in a Huge Table?

Former Member
0 Kudos

Hi,

I would like to know Number of entries in table DFKKOP. when i try to get it through se16, it takes more than 10 minutes in dialogue process so a time out occurs. is there any way to find out number of entries in the table Apart from creating a program for that?

Please guide me to the solution.

Thanks,

Lijo Joseph

Message was edited by: Lijo Joseph Vazhappilly

1 ACCEPTED SOLUTION

Former Member
0 Kudos

DFKKOP is a finance table. And it has many current as well as historical data of all the BP for each transaction.

I guess getting the number of records are you creating a query that the company has done X number of transactions. This is not a business logic.

Anyhow you can try with different logics. Provide any selection criteria and then sum up all records.

Regards

12 REPLIES 12

Former Member
0 Kudos

DFKKOP is a finance table. And it has many current as well as historical data of all the BP for each transaction.

I guess getting the number of records are you creating a query that the company has done X number of transactions. This is not a business logic.

Anyhow you can try with different logics. Provide any selection criteria and then sum up all records.

Regards

former_member181962
Active Contributor
0 Kudos

Change the time out limit setting through your basis team.

Write an abap program with only one statement.

select count(*)

from DFKKOP

into v_count.

endselect.

write:/ v_count.

Regards,

Ravi

Former Member
0 Kudos

Hi,

use this FM

CATT_GET_TABLE_ENTRIES

regards,

LAtheesh

0 Kudos

Hi LAtheesh,

executing a FM is also will get a timeout in the dialogue process. Apart from creating a program for that, do we have any other solution?

Regards,

Lijo Joseph

0 Kudos
REPORT  YCHATEST                                .

Data : begin of itab occurs 0.
        include structure tab512.
data:end of itab.

data : v_count like sy-index,
       tabname like X030L-TABNAME value 'DFKKOP'.

CALL FUNCTION 'RFC_GET_TABLE_ENTRIES'
  EXPORTING
    table_name              = tabname
 IMPORTING
   NUMBER_OF_ENTRIES       = v_count
tables
   entries                 = itab.

write : v_count.

Message was edited by: Sekhar

Former Member
0 Kudos

Hai Lijo

Try with this code

tables : DFKKOP.

data : it_DFKKOP like DFKKOP occurs 0 with header line.

data : v_num type i.

select * from DFKKOP into table it_DFKKOP.

loop at it_DFKKOP.

v_num = sy-tabix.

endloop.

write : / v_num.

Thanks & regards

Sreenivasulu P

0 Kudos

SELECT count( * ) from (tablename)

sy-dbcnt

contains number of records.

(tablename) can be filled dynamically from your selection parameters.

Tables statement is not necessary.

Former Member
0 Kudos

RFC_GET_TABLE_ENTRIES

CATT_GET_TABLE_ENTRIES

Former Member
0 Kudos

Hi Lijo,

Goto SE11

Enter the table name

Click display

Press SHIFTCTRLF10

On the Toolbar there will be a button 'NUMBER OF ENTRIES', click it.

It will return the number of records.

Regards,

Sameena

nishanthbhandar
Contributor
0 Kudos

Lijo,

The database table data i.e number of entries in the table is fetched through Select only.Regardless of the method used the time consumed will be almost the same.What you can do is ..

-- Contact BASIS team and ask them to increase the time out setting for a process.This will avoid the time out that you get when trying to query the number of entries through SE16.

Cheers

Nishanth

0 Kudos

hi,

use <b>se16n</b> here you can count entries per batch

Andreas

0 Kudos

Did no-one read the initial question. They would like to get the number of entries in a table by not doing the 'Number of entries' option on SE16 and also without writing a program.

So why are people replying with code to do this.