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: 

Get last time that a DB tab has been used.

Former Member
0 Kudos

Hi,

Is there any way to know when was the last time that a database table has been used? I mean, red/written new registries into it? or deleted registries? I tried DD02L but it just gives me the dates refering to the proper table!

Thx in advance,

André Costa

1 ACCEPTED SOLUTION

former_member583013
Active Contributor
0 Kudos

AFAIK the only way is to activate the table log....But it consumes a lot of memory...So it must be handled with care....

Greetings,

Blag.

9 REPLIES 9

former_member583013
Active Contributor
0 Kudos

AFAIK the only way is to activate the table log....But it consumes a lot of memory...So it must be handled with care....

Greetings,

Blag.

Clemenss
Active Contributor
0 Kudos

Hi Andr,

if you want to know when a table field has been read the last time, even aking the table field will not know for sure. It is like I ask you what time a certain person looked at you. Do you know for sure? - maybe it was from your back.

Field contents changes are recorded only if it is regarded necessary. Most master data changes are recorded in change logs, for customizing changes the change log can be switched on or off. Changes are recorded in tables CDHDR (change object header, i.e. MAT_FULL for material master) with user date and time and table CDPOS with change details like table and field name, old and new value.

Ask specific: What change are you interested in?

Regards,

Clemens

Former Member
0 Kudos

Hi Clemens,

basicly I want to know when I can call a table as "obsolete" or not... Imagine I say, "whenever a table hasn't been red or written for more than 2 years I will call it "obsolete", so if it is a Z table I can delete it"...

Clemenss
Active Contributor
0 Kudos

Hi Andr,

for this purpose, you should do a where-used on the table. In the found programs insert a line writing an entry to a protocol table and check the protocol.

And then wait two yeras

Regards,

Clemens

... or just forget it: It's wasted time to think about wasted space.

Message was edited by:

Clemens Li

Former Member
0 Kudos

LOLOL....

Even if you're joking... maybe I could do a where-used with the table name, get the report names and the get the last time they run!?!?!?!?!?! =D

... or maybe there is no way to know when was the last time they run, right?

Former Member
0 Kudos

So if you delete it, there may be non-obsolete programs that reference, but don't use it. So activation of this program will fail.

I'd just look for programs that haven'r run for a while and mark <i>them</i> as obsolete.

Rob

0 Kudos

Hi Andr,

Have a look at the transaction ST04 and see if it is of any use to you.

Regards,

Ravi

former_member181962
Active Contributor
0 Kudos

Hi Andr,

As Clemens has rightly put, there is no way you can tell when was the table last read, but most of the tables will have table fields like Change date and changed time.

This information is at a record level.

If you want to track all the changes that were made to a particular field, you have to look in change master tables(If the change number is activated for that particulat Object).

Regards,

Ravi

0 Kudos

yup... I think I've got the idea... I just wanted to do it dynamicly... And in this way I cannot know which field have the info I need (specialy because there are tables without that info!)

Thx everybody!