Query to track changes to a particular table data
Hi,
Do we have some query to track the chnages to a particular table data?how we can do that...please helppp
Regards
Aswathy
The answer can only be as good as the question.
Your question is not good: there is no detail.
Say exactly what version of Oracle you have.
Say for how long in the past you need to track the changes.
Partial answer: for changes in the last few hours, read Flashback Queries
Message was edited by: Stew Ashton
P.S. I forgot to ask: do you want to know WHO and WHEN data was changed, or WHAT data was changed? Hoek answered the first question, I gave a partial answer to the second.
Similar Messages
-
Tracking Changes for Single record in Data Dictionary
Hi Experts,
I encountered with this question in an interview. I was asked how to maintain/track changes for a particular single record in a Data Dictionary table. I knew that for an entire table we can do it using table maintenance events. But I was confused when the interviewer asked for one particular record in table. Kindly input your thoughts on this.
Thanks.Hi Radhika,
In case of record in a table we can use "log data changes" option (Table DBTABLOG) in Technical Settings > Log data changes. It enable writing of change documents in Tables CDHDR/CDPOS.
Hope this helps.
Regards,
Naveen -
How to track changes to longtexts (in tables STXH, STXL) ?
Hello everybody,
I need to track changes made to the long texts in sales orders.
Reading change documents tables (CDHDR, CDPOS) does not work for the long texts tables STXH, STXL as no relevant data is written.
Only the latest entry is stored in STXH and STXL.
Where to look for changes made to the text tables ?
Many thanks and kind regards,
Chris.Hello Carsten,
Thanks for the tip, it was very helpful !
kind regards,
Krzysztof. -
How to track changes in a custom table
HI all,
Requirement is
1. In custom table instead of using table maintence generator ALV gird has to be display to see table entries. But where i have to write the code when user press CONTENTS button?
2. In alv gird there shuld be one button which shows the change history of selected record and modify the content of selected record. For track changes i have registered custom table name in SCDO. so that changes made will reflect in CDPOS/CDHDR.
but how can i track changes thru dis table? i didnt find field contents of custom table in CDPOS/CDHDR tables?
Please help me with these Ques.Hello,
SAP has provided many changes tracking related programs for Sales order, Vendor changes etc.
They all use the standard function Module
call function 'CHANGEDOCUMENT_READ_HEADERS'
call function 'CHANGEDOCUMENT_READ_POSITIONS'
so with these you can get the changed records
Let me know if this helps you
Thanks and Regards
Pushkar Joshi -
Track changes made to the master data
How do I track changes according to the users, made in master data files like the item master, Business partners, tax codes, item groups ?
Hi Vivek,
If you want to trace the changes that have been made to the masters, oprn that particular master and go to Tools> Chnage log> show differences. Similarly you can trace the same for any marketing document. Hope this helps.
Regards,
Joseph -
To get the PO data changed on a particular given date.
hi,
i want to get the PO data of all PO's changed on a particular day.
when i am selecting from CDHDR
SELECT objectclas
objectid
changenr
FROM cdhdr INTO TABLE i_cdhdr
WHERE objectclas = 'EINKBELEG' AND
udate = p_date.
1.Are the above condtions enough.?
2.with the above conditions give me all the changes(Create,Change,Release,Delete..etc...)
and as i will be getting multiple records...i can delete the adjacent duplicates..please confirm.
2.Should i fetch CDPOS also...or can i ignore if i am not interested in type the change made to a PO?Hi Sravan,
You can also think about using the field CHANGE_IND (Modification type) which I believe in your case would be 'U' (Update). This way you will exclude also those POs created, deleted, etc. and you will consider only those ones changed.
If you are not interested in the type of the change it has been done through those POs, you don't need to consider the CDPOS table.
Hope it helps you.
Regards,
Daniel -
How to track changes in a custom table and based on that run an interface
I have an interface. The pre-condition for running the interface is "Run the interface only if there is new entry added to the table( a custom table). Now I have created a change document object using tcode SCDO for the custom table. Now how do i proceed further. Please tell me the steps which i need to follow to check if the custom table has been changed and also the entries changed before running the interface.
Hello,
SAP has provided many changes tracking related programs for Sales order, Vendor changes etc.
They all use the standard function Module
call function 'CHANGEDOCUMENT_READ_HEADERS'
call function 'CHANGEDOCUMENT_READ_POSITIONS'
so with these you can get the changed records
Let me know if this helps you
Thanks and Regards
Pushkar Joshi -
Tracking changes done to particular in SU01
Gurus,
Through an interface the cost centers of SAP users are changed in TCODE SU01 everyday if a user changes the department within the company under 'logon data' tab in 'other data'
I have to trigger certain emails if the changes occur in cost center values of a given user in SU01. How can I track the changes for this ? Is there any table which stores old and new values for cost center changes.
Regards,
Rajesh.Hi
The cost center details resides in table USR03 field KOSTL.
The data element assocaited with it is XUKOSTL.
XUKOSTL does not have change document enabled.
so here is your design,
1. Take the access key for dataelement- XUKOSTL
2. Enable the change document check mark in the definition tab of the data element.
3. Write a program and check for changes in fields KOSTL by checking the entries in CDPOS and CDHRD.
4. If changes are done to fileds KOSTL then trigger mail.
5. Schedule the program everday at midnight.
or
1. Search for user exits which will get triggered during SU01
2. check the new and old value of KOSTL.
3. if there is a change then trigger your mails.
Thanks
Krishnan -
Query Question: Sum of master and monthly table data
Hi All,
I have two tables that store financial data about programs. The PROGRAM table has the following columns (for purposes of this discussion):
ID, INITIAL_BUDGET, COST_CENTER
The PROGRAM_MONTHLY table has the following (abbreviated list of) columns:
ID, PROGRAM_ID (FK to PROGRAM.ID), CURRENT_FORECAST, RECORD_DATE
Every month, a copy of the program_monthly records for last month is made to new records in the PROGRAM_MONTHLY table and we use RECORD_DATE for our filters and comparisons. This way we have historical data, plus current month data that can be updated by our financial systems and program managers.
I am using Application Express and would like to create a dashboard chart that shows the summary of the INITIAL_BUDGET and the CURRENT_FORECAST for a selected month. Obviously, the INITAL_BUDGET doesn't change, but the CURRENT_FORECAST (and similar columns such as the amount committed to purchase orders, which were omitted to simplify the discussion) change monthly.
My goal is to create a chart that can display the initial budget, current forecast, amount committed on purchase orders, etc. for all cost centers, or just one at a time as the user requires, that is filtered by the month of the PROJECT_MONTHLY record. If I can come up with the statement for a view or query, then I can manage the rest.
The required syntax for the chart is "SELECT link, label, value FROM...", where "link" can be NULL, since is it an optional link to another URL. The "label" and "value" portion are the important parts.
For example, I have another chart that shows the project status (which is a Varchar 2 constrained to values such as, Active, On-Hold, Completed, etc.) with the status as the label and the count of the rows as the value. It starts:
select null link, pjm.PROJECT_STATUS label, COUNT(pjm.ID) value FROM ... However, I have been unable to come up with a query that generates the desired results for these PROGRAM and PROGRAM_MONTHLY tables. I have played with various types of joins and sub-queries, but my SQL just isn't up to the challenge yet. I realize that I might have to re-work the table structure to accomodate this requirement.
I would greatly appreciate any guidance in approaching this problem.
Many thanks for your time and help,
PetieCertainly, Warren, thanks so much for your willingness to look at my problem.
To keep things simple, I will put the fundamentals of the tables with sample data. Please let me know if you would like more and I would be happy to provide it.
Table: PROGRAM
ID PROGRAM_NUMBER INITIAL_BUDGET COST_CENTER
1 10001 100000 500-001
2 10002 125000 500-001
3 10003 150000 500-002
4 10004 175000 500-002
5 10005 10000 500-003
6 10006 200000 500-004Table: PROGRAM_MONTHLY
ID PROGRAM_ID CURRENT_FORECAST RECORD_DATE
1 1 95000 02-FEB-06
2 2 125000 02-FEB-06
3 3 145000 02-FEB-06
4 4 180000 02-FEB-06
5 5 9000 02-FEB-06
6 6 225000 02-FEB-06
7 1 97500 02-MAR-06
8 2 120000 02-MAR-06
9 3 145000 02-MAR-06
10 4 185000 02-MAR-06
11 5 10000 02-MAR-06
12 6 215000 02-MAR-06
Report Example 1
When a user would like to see the current summary data for all cost centers, they would see a chart with the following data:
INIT_BUDGET CURRENT_FORECAST
760000 772500
Report Example 2
When a user would like to see the summary data for all cost centers for last month, they would see a chart with the following data:
INIT_BUDGET CURRENT_FORECAST
760000 779000
Report Example 3
When a user would like to see the current summary data for cost center 500-001, they would see a chart with this following data:
INIT_BUDGET CURRENT_FORECAST
225000 220000I hope this better illustrates the solution I seek.
Thank you again for your time and assistance
Petie -
Hi,
We have a requirement that to track changes on our Z tables. Could any one help me in process of doing this ?
Thank you,
SuryaHI,
U Read follow this for clarifies u r doubt..........
As with business objects, we recommend that you activate the logging of changes to table data for those tables that are critical or susceptible to audits. (See the SAP Audit Guidelines R/3 FI, in Section 4.3.5, for examples of important tables. This document is available at
http://www.sap.com/germany/aboutSAP/revis/infomaterial.asp. You must also explicitly activate this logging. Note the following:
· You must start the SAP System with the rec/client profile parameter set. This parameter specifies whether the SAP System logs changes to table data in all clients or only in specific clients. We recommend setting this parameter to log all clients in your productive system.
· In the technical settings (use transaction SE13), set the Log data changes flag for those tables that you want to have logged.
If both of these conditions are met, the database logs table changes in the table DBTABPRT. (Setting the Log data changes flag only does not suffice in recording table changes; you must also set the rec/clientparameter.)
You can view these logs using the transaction SCU3.
Although we do deliver pre-defined settings, you generally have to modify them to meet your own requirements. Use the report RSTBHIST to obtain a list of those tables that are currently set to be logged. Use transaction SE13 to change the Log data changes flag for these or other tables.
For more information, also see SAP Notes 1916 and 112388.
regards,
sudheer. -
How to Hide Track changes according to Specific user?
Hello All,
We are developing plugin and we have to hide the changes according to specific user. We are setting the track change preferences using the methods provided by ITrackChangeAppSettings interface.
But as this interface is aggregated on kWorkspaceBoss it is applying the changes for all users.
Will anyone please suggest how can I apply changes according to particular users? any help is appretiated.
Thanks & Regards,
PraveenHello All,
For hiding the tracked changes according to particular user,i have accept the changes according to specific user.But i have undo the changes it means before saving i have to undo the accepted changes.I am using VOS_RedlineObject::UndoSimpleChange() method but it is not working.
Can anyone tell me other way for doing that?
Thanks & Regards,
Megha -
Track Changes Power Query - After Refresh
Hi,
Is there a way to get informed when the value or string of a cell changes after the query was refreshed.
BRexample:
I have a json file with two Sites:
"SiteA": {
"Color": "blue",
"Date": "24.12.2014"
"SiteB": {
"Color": "red",
"Date": "25.12.2014"
after Reload:
"SiteA": {
"Color": "green",
"Date": "24.12.2014"
"SiteB": {
"Color": "red",
"Date": "26.12.2014"
How can I track that the color of SiteA has changed to green and the Date of SiteB after refreshing?
BR,
Bernd -
How do I get pages to track changes in tables
I downloaded he new pages for iPad and edited a word document. I switched track changes on but it did not track any changes I made in the tables on the text outside of tables. How can I resolve this?
I downloaded the new pages for iPad and edited a word document. I switched track changes on but it did not track any changes I made in the tables only for the text outside of tables. How can I resolve this?
-
Track user changes in customized transparent table
Greetings..
How do i to track user changes in my table ? is there any master table that keep track changes made by user on the specific field.? Is there possible if the table have the original and changed data.i got the below explanation from other thread, which has explained by an expert, so, take it as reference and interprete according to ur req.
BEGIN
Table Events:
Go to SE11 and open your Ztable
click on the Table maintenance generator.
you can find the function group. right
Take the Function group name and go to Tcode SE37
and open the Function Group.
In the Status of the small window of the Function
group display
you can find out change requests , Main program and
Function group Docu tabs.
Click on Main program and create user defined Include.
check the sample code below
Click on main program
Create user defined include
User-defined Include-files (if necessary). *
INCLUDE LZPHIRF... " Subprograms
INCLUDE LZPHIRO... " PBO-Modules
INCLUDE LZPHIRI... " PAI-Modules
Create the below include.
INCLUDE LZPHIRI01. " PAI-Modules
Double click on the Include name. you have the below
code
Loop at Extract.
module liste_init_workarea.
chain.
field fild1
field fild2
field fild n
module set_update_flag on chain_request.
You have to add a new module here
check the below code
*----User defind module
Module user_defind_validation.
endchain.
Double click on module write code in that.
Include <Include Name> *
*& Module user_defind_validation
Module user_defind_validation.
Here you can write your own validations.
field2 = field1 /2.
field4 = field1 /4.
if field4 field3.
message.
endif.
EndModule. "user_defind_validation
Events allow you to change the generated table
maintenance dialog at predefined positions, which
cannot be reached by user modules in the screen flow
logic.
The user routines are called dynamically at runtime.
For this reason, the routines must be in a user include
in the table/view maintenance dialog function group.
All extended table maintenance global data is available.
An interface is only required for events 22 and AF.
The events can be additions or replacements.
Additional events
Event 01 before saving the data in the database
This event occurs before new, changed or deleted
entries are written to the database
FORM abc.
DATA: F_INDEX LIKE SY-TABIX. "Index to note the
lines found
LOOP AT TOTAL.
IF <ACTION> = desired constant.
READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
IF SY-SUBRC EQ 0.
F_INDEX = SY-TABIX.
ELSE.
CLEAR F_INDX.
ENDIF.
(make desired changes to the line TOTAL)
MODIFY TOTAL.
CHECK F_INDX GT 0.
EXTRACT = TOTAL.
MODIFY EXTRACT INDEX F_INDX.
ENDIF.
ENDLOOP.
SY-SUBRC = 0.
ENDFORM.
END
thanq -
Track Changes colors not working when story contains table
Can anyone duplicate this problem/bug, or let me know if it is just my machine?
Steps to reproduce
Make sure your Edit > Preferences > Story Editor has non-black text colors defined for Added Text, Deleted Text, and Moved Text.
Create document, and draw a text box
Inside the text box, Right-click > Fill with Placeholder Text
With the cursor in the text box, turn on Track Changes and Show Changes from the Track Changes pallette:
Open the Story Editor with Ctrl/Cmd-Y
Cut/paste, delete, and insert some text.
Confirm colors appear in Story Editor as defined in step 1:
Now insert a table anywhere in the story. For me, all non-black text coloring (bg stays fine) disappears:
Is this an InDesign bug, or something I'm experiencing on my own machine? I've been able to duplicate the issue in InDesign CS6, InDesign CC and InCopy CC on my Win7 Pro 64-bit machine.I'd recommend filing a bug report here to make sure it gets reported:
Adobe - Feature Request/Bug Report Form
Maybe you are looking for
-
External Hard Drive Mac/PC Partition
Hello, I'm wondering if it's possible to partition my Maxtor One Touch hard drive, with a DOS partition and a OSX partition. I don't think it's possible with Disk Utility, does anybody know if there is another free application that would do this? I n
-
I have a G5 with two 23" aluminum case displays, that I use primarily for video editing. The primary display, which is older, has just started showing orange and turquoise static. The static can be especially noticeable on start-up, when it looks lik
-
Saprouter doesn't start as service
Hello! We faced with some troubles with our system (based on MSWin2003). Our saprouter worked correct before using SNC connect to SAP. Now, when we try to start saprouter via services.msc we get error 1053 the service did not respond to the start or
-
Basic table relationship question
Just getting started working with primary and foriegn key relationships. I have a main table called fruitPicking and one of the columns is fruitID (a foriegn key linked to a primary key in a table called fruit). Anyhow for a single row in the fruit
-
Dreamweaver doesn't start but shows as running in taskmanager processes but not in taskmanager applications. I can then end the process and restart the program but the same thing happens. It doesn't even show the startup screen, it just shows the Dre