Application Development and Automation 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: 
Read only

data in Table

Former Member
0 Likes
685

Hello Friends,

I have around 2000 tables and would like to find out all the tables that would have data in it.

Is there any short cut way for it or do I need to write any querry for this to do all at once.

Thanks,

Ster...

4 REPLIES 4
Read only

Former Member
0 Likes
636

IN addition to the above concern, I would be intrested if There is data in those tables for a certain field.

Ster

Read only

Former Member
0 Likes
636

hi for get the data in the tables use the function module ...

RFC_GET_TABLE_ENTRIES

regards,

venkat

Read only

0 Likes
636

THanks Venkat.

Again there is a samll issue in this. I have to go table by table, one at a time. I want to inout all 2000 at once and figure out all at once if they have data in it.

Thanks for the previous reply.

Ster.

Read only

0 Likes
636

data: entries type sy-index .

data:begin of itab occurs 0,

tabname like X030L-TABNAME ,

end of itab .

select tabname from X030L into table itab up to 100 rows .

loop at itab .

CALL FUNCTION 'RFC_GET_TABLE_ENTRIES'

EXPORTING

BYPASS_BUFFER = ' '

FROM_KEY = ' '

GEN_KEY = ' '

table_name = itab-tabname

IMPORTING

NUMBER_OF_ENTRIES = ENTRIES

EXCEPTIONS

INTERNAL_ERROR = 1

TABLE_EMPTY = 2

TABLE_NOT_FOUND = 3

OTHERS = 4

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

write:/ itab-tabname ,entries .

endloop.

regards,

venkat