11-15-2007 9:43 AM
hi
I have a ztable with some fields..my requiremetn is that there is always some change (update/delete/create) in the data of thsi table, and I need to find out the changed field and display in a file at the end of the day by runnning a program in background..can anyone help in guiding me in thsi program??
Tx
11-15-2007 9:48 AM
Hi,
Goto SE 11
Open the Z table
Click GOTO => TECHNICAL SETTINGS
Select checkbox - LOG CHANGES
<b>
Log data changes</b>
The logging flag defines whether changes to the data records of a tabl
should be logged. <b>If logging is activated, every change (with UPDATE,
DELETE) to an existing data record by a user or an application program
is recorded in a log table in the database</b>.
Note: Activating logging slows down accesses that change the table.
First of all, a record must be written in the log table for each chang
Secondly, many users access this log table in parallel. This could cau
lock situations even though the users are working with different
application tables.
<b>Dependencies</b>
Logging only takes place if parameter rec/client in the system profile
is set correctly. Setting the flag on its own does not cause the table
changes to be logged.
The existing logs can be displayed with Transaction Table history SCU3.
Best regards,
Prashant
11-15-2007 10:04 AM
Thanks Prashant and Jyothi-
I need to develop a program and not use the table maintenance..
Jyothi- I think we cannot use CDPOS table for ztable changes..Can you please suggest something else..
I need to get this programatically..any clues???
11-15-2007 9:50 AM
In technical settings of the z- table (SE11) check the Check Box Log Changes.
Then the cvhanges will be stored in CDHDR and CDPOS tables. So in your report you can read CHHDR and CDPOS to get the chanegs to the table.
11-15-2007 10:13 AM
Hi Shakir,
This will surely help you...
Do the folowing....
1) Include PSHD1 in your table ,
this include consist of the field AEDTM means changed on.
This field AEDTM will have the date of record changed or new record inserted against every record.
So you can write a select Query on the particular date to find the required data:::
Select *
from TABLE
into ZTABLE
Where AETDM = SY-DATUM. " to get the records updated or inserted as of today...
This will fulfill ur requirement,
if any doubt kindly revert back
If useful Pls Reward.
ROHIT G