05-29-2008 2:24 PM
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...
05-29-2008 2:25 PM
IN addition to the above concern, I would be intrested if There is data in those tables for a certain field.
Ster
05-29-2008 2:31 PM
hi for get the data in the tables use the function module ...
RFC_GET_TABLE_ENTRIES
regards,
venkat
05-29-2008 2:38 PM
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.
05-29-2008 2:56 PM
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