Change documents for a Z table
Hi,
We have a Ztable with 4 fields, Due to some business reasons.. . We have given access to users for changing the contents of the table. Now For audit purpose Customer wants to track the changes made to the table. I came know that this can be achieved by using the change documents concept. I am little confused in using this concept. After clicking on the generate update program, system will ask us to give an include name and functiona group. After giving these two system will create include object as <change document object>_write_document. This Include inturn calls some more includes like F<K4>CDC,F<K4>CDT,F<K4>CDF,F<K4>CDV.
Here my questions are
1. Wher do we need to write our owncoding for capturing the changes?
2. is it possible to share the sample code starting from the First Include <changedocument>_Write_Document to ending.
3. Does this change document functionality will be called automoatically when we use Transaction SM30(Table maintainance) for changing the contents of the tables?
4. What is the difference between single case and Multiple case. My scenario falls into single/Multiple?
Awaiiting for all the expert responses
Thanks and Best Regards
Jagadeesh Ambati
Hi Srinivas,
you can activate in DDIC that your entry changes will be logged.
Go to SE11 -> Your Tablenname -> CHANGE
Button TechnicalSettings -> Activate checkbox Log data changes.
From now on any chenge will be logged in table DBTABLOG.
Kind Regards
Henner
Similar Messages
-
Creating a custom change document for a standard table field
Hi
Is it possible to create a change document for a field in a standard table?
I have searched the forum and only found threads about creating change document to a custom table.
Will the creation of change documents to a standard SAP table be a modification?
Thanks.
Regards
Sowbhagya.LYes it will be a modification on standard table, but you can always create change document for any field by assigning it to custom change object.
Regards,
Krishna. -
Change documents for customer Z table - serious help wanted
Hi all,
I am no beginner and I don't expect any comments from beginners.
Situation: My customer wants to replace the material valuation transactions MRN1 MRN2 MRN3 due to bad performance and locking problems with own developed programs.
The valuation results will be stored in a customer Z-Table on a monthly base. For auditing and transparency purposes, this Z-table has to get a change object and the update routines will have to write change documents.
Due to the expected size of the new Z-table, it is not advisable to simply switsch on table logging.
In this huge project (and in none I participated!) nobody ever implemented the change document process for a Z-table. <b>BUT EVERYBODY CAN TELL YOU THI IS NO PROBLEM AT ALL.</b>
I read some documentation at SAP and serached for threads or blogs here. I could not find anything desribing that in depth.
So before I start, I'd be happy to get some hints from people who created own change documents and implemented the process. Links to documentation and other helpful pages are also welcome.
If I can keep the process simple, I'd like to create a BLOG on this - because I think, in the future it will get more and more difficult to pass the auditing process with undocumented features and uncontrolled table changes.
TIA.
Regards,
ClemensHi,
Please check this thread.
http://www.sapdevelopment.co.uk/tips/changedoc/cd_createch.htm
Once you create your change document object using generate update pgm option then please check the WRITE document fm.
I have done this long back i am updating CDHDR and CDPOS for 2 table YATT and YATTPLANTS. Here YATT have single record (header table) and YATTPLANTS have multiple records (item table)
function yatt_write_document .
call function 'CHANGEDOCUMENT_OPEN'
exporting
objectclass = 'YATT '
objectid = objectid
planned_change_number = planned_change_number
planned_or_real_changes = planned_or_real_changes
exceptions
sequence_invalid = 1
others = 2.
case sy-subrc.
when 0. "ok.
when 1. message a600 with 'SEQUENCE INVALID'.
when 2. message a600 with 'OPEN ERROR'.
endcase.
if upd_yctc ne space.
call function 'CHANGEDOCUMENT_SINGLE_CASE'
exporting
tablename = 'YATT '
workarea_old = o_yatt
workarea_new = n_yatt
change_indicator = upd_yattc
docu_delete = 'X'
exceptions
nametab_error = 1
open_missing = 2
position_insert_failed = 3
others = 4.
case sy-subrc.
when 0. "ok.
when 1. message a600 with 'NAMETAB-ERROR'.
when 2. message a600 with 'OPEN MISSING'.
when 3. message a600 with 'INSERT ERROR'.
when 4. message a600 with 'SINGLE ERROR'.
endcase.
endif.
if upd_yctcauthplnts ne space.
call function 'CHANGEDOCUMENT_MULTIPLE_CASE'
exporting
tablename = 'YATTPLANTS '
change_indicator = upd_yattplants
docu_delete = 'X'
tables
table_old = yyattplants
table_new = xyattplants
exceptions
nametab_error = 1
open_missing = 2
position_insert_failed = 3
others = 4.
case sy-subrc.
when 0. "ok.
when 1. message a600 with 'NAMETAB-ERROR'.
when 2. message a600 with 'OPEN MISSING'.
when 3. message a600 with 'INSERT ERROR'.
when 4. message a600 with 'MULTIPLE ERROR'.
endcase.
endif.
call function 'CHANGEDOCUMENT_CLOSE'
exporting
objectclass = 'YATT '
objectid = objectid
date_of_change = udate
time_of_change = utime
tcode = tcode
username = username
object_change_indicator = object_change_indicator
no_change_pointers = no_change_pointers
exceptions
header_insert_failed = 1
object_invalid = 2
open_missing = 3
no_position_inserted = 4
others = 5.
case sy-subrc.
when 0. "ok.
when 1. message a600 with 'INSERT HEADER FAILED'.
when 2. message a600 with 'OBJECT INVALID'.
when 3. message a600 with 'OPEN MISSING'.
* WHEN 4. MESSAGE A600 WITH 'NO_POSITION_INSERTED'.
* do not abort, if positions are not inserted!!!
when 5. message a600 with 'CLOSE ERROR'.
endcase.
endfunction.
a® -
Activating change documents for standard tables
Hi all,
Can someone please tell me how I can activate change documents for a standard table.
I created a change document object in SCDO and included the standard table I am working with. This table does not have "LOG DATA CHANGES' enabled in its technical settings. I checked the data element of the field I am interested in and it has "Change Document" enabled.
Is there any way to activate change documents for a std table without writing code to create change documents?
Thanks.Hi,
Check this transaction SCU3, this is to activate the change logs for the tables.
Regards,
Satish -
Table to look for change documents for users
Hi friends,
Is there any standard table to look for change documents for a user?change document through SUIM does not give the correct log.
Thanks for you support.Julius
Looking at another of Tracy's other post (http://scn.sap.com/thread/3598947) she's trying to use ACL. Hence needing to know the tables to write joins/queries to hit tables within ACL
I've seen ACL used and have had the fun experience of Auditors using Google to find tables to perform checks on without context of what has actually been implemented in their particular system.
Regards
Colleen -
Using a change document for Z table maintenance generatro to log changes
Hi Forum,
I have created a a change document for one of the Z tables now I want to use it in the table maintenance generator of this table so that any changes made to this table using maintenance generator are logged in table CDHDR and CDPOS.
I am using the event 02 After saving the data in the database
and have created a new FORM..ENDFORM for this event and it is working fine till here.
But I am unable to find any table or structure where the information of the action performed in maintenance generator is kept for eg. what action was performed like add, delete or change and on how many records and contents of those records.
I can update the tables CDHDR and CDPOS only if I have the above information.
Please guide me as to where can I find all this information within the maintenenace generator program?
Thank you,
AnubhavHello Anubhav,
Are you calling the change document function module in your save event ? The function module needs to be first created using SCDO for your Z table, select the fields on which you want to track the changes. Auto generate the programs for this change object. Once the FM is generated, you will have to call this FM in your SM30 event.
The change document tracking also needs to be enabled at the data element level..
Regards,
Jay -
Change Documents for the table EKET
Hi ,
We create a purchase order from ME21N . We do have some data for delivery schedule for the data .
This delivery schedule data gets stored in tabe EKET . When this PO is processed from V_V2 the dates
in the delivery schedule are overwritten and he new values will be even in the table EKET . When I follow
the navigation Environment -> Item Changes I dont see the changes documents for these fate fields . I did
debug through the FM EINKBELEG_WRITE_DOCUMENT to see but it looks like it is not captuirng the fields .
Now my requirement is to find where the change documents can be found for the date changes in the delivery
schedule tab in the PO . The fields of interest are :
EKET-SFLDT , EKET-DAT01, EKET-MBDAT , EKET-LDDAT , EKET-WADAT .
I tried for some OSS notes too, but in vain . Can anyone please help to find out how we find the changes documents for these fields .
<b>Also please tell me if there are any OSS notes which explain us to extend the table EKET .</b>
Thanks and Regards ,
Varun .HI ,
I did check the table CDHDR and CDPOS and also the change document is checked for the data element but no change documents are stored in CDHDR and CDPOS .
<b>Did anyone ever extend the tabke EKET ? Any OSS notes available for this .</b>
Regards ,
Varun .
Message was edited by: varun sonu -
Need to create a Change document for tracking Purpose on standard table
Hi Experts,
I am updating a field in standard table so need to create a change document for tracking the changes being done on the field.
I created the change Document with transaction SCDO but I am stuck at point - How to call that in the report program to enable the change document.
Please advice.
Thanks!!Hi
U can assign your transaction to Z-report like this:
PARAMETERS: TAB1 RADIOBUTTON GROUP R1 DEFAULT 'X',
TAB2 RADIOBUTTON GROUP R1,
TAB3 RADIOBUTTON GROUP R1.
DATA: TABNAME TYPE TABNAME.
START-OF-SELECTION.
CASE 'X'.
WHEN TAB1. TABNAME = 'BSID'.
WHEN TAB2. TABNAME = 'BSAD'.
WHEN TAB3. TABNAME = 'BKPF'.
ENDCASE.
CALL FUNCTION 'RS_TABLE_LIST_CREATE'
EXPORTING
TABLE_NAME = TABNAME
* ACTION = 'ANZE'
* WITHOUT_SUBMIT = ' '
* GENERATION_FORCED =
* NEW_SEL =
* NO_STRUCTURE_CHECK = ' '
* DATA_EXIT = ' '
* IMPORTING
* PROGNAME =
* TABLES
* SELTAB =
EXCEPTIONS
TABLE_IS_STRUCTURE = 1
TABLE_NOT_EXISTS = 2
DB_NOT_EXISTS = 3
NO_PERMISSION = 4
NO_CHANGE_ALLOWED = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
Change documents for created for Customer Master
An existing program makes changes to the Customer master table KNA1. The changes are made at the table level using the UPDATE command. Since the changes are being made at table level, the change documents are not created.
I need to create IDocs for all changes. So the question is, how to create change documents for changes to the particular fields being UPDATEd in the report program.
I understand that a BDC program on XD01 screen should have been the best way for this, but I'm here to break-fix and trying to identify solutions with least development effort.Hi ganadeep,
When an application makes any changes to an object it wrties change documents which are stored in the table CDHDR and CDPOS for each change made.
BDCP table holds the change pointers which point to the change documents in the CDHDR table.
Regards
Parag -
Dear Experts,
I need to create a customizing change event for LIKP,
but I couldn't find the change document for LIKP.
Did anyone has ever create change doc. for LIKP and
share experience ?
thanks in advance.
MinterDear Ramki,
Thanks for ur first reply.But after I create event
for the object LIEFERUNG, I could not see fields for table LIKP in SWEC.
Regards,
Minter -
I know crm_jsto ,crm_jcdo,crm_jest, are table u used to document status changes in crm.Yet the quotation i create its guid is present in all the above tables except crm_jcdo.I need the old and new value of status on that particular day.I dont know y the inner join on crmd_orderadm_h and crm_jcdo returns no common guid.Kindly help.
Hi There,
Please take a look at the following table:
CRM_JCDS - Change Documents for System/User Statuses (Table JEST)
I hope it helps!
Kind Regards,
Gabriel Santana -
We use RAR 5.3 SP 14 and were wondering if there were any tables or reports that can show the change history upon mitigation added to a user. We can see the date that the mitigation was assigned to a user, but we can't seem to find the date when a mitigation was removed from a user.
For those that are questioning, we do use CUP for mitigations too, but we are mainly trying to find the change documents for RAR.
Thank you in advance.SAP Answered
"In 5.3, there is no change log for mitigation control assignment. The only option in 5.3 is if you configure the Workflow option for Mitigation, then a request would have been routed through CUP for
this change and then you could search in CUP for the history of the change. Specifically, under RAR in Configuration - Workflow - Mitigation, if this parameter is set to YES, anytime you would
add, remove or change a mitigation for a user, a workflow item would be sent through to CUP for approval before the change is actually posted.
However, if you don't have this configured, there is no change log of mitigation changes.
There is no change log table in RAR to track mitigation changes, sorry. The change log information is not retained in RAR for changes to mitigations. The only "change log" information in RAR is for
Configuration and rules. This data is stored in table VIRSA_CC_CDHDR and VIRSA_CC_CDPOS. Again, this is only for changes to configuration and changes to rules. This is the only data that RAR tracks
changes for.
Changes to mitigations are NOT stored anywhere in RAR. Please let me know if there is any concern." -
Change Documents for Reservation
Hi Masters
How to find the change documents for the reservation?.I have Checked it in MB22 and tables CDHDR and CDPOS.I found nothing.Is there any other T code for finding this?
Regards
MohanHi
Thank you for your reply
I checked with the Tcode TLR5.I have given user name only and i am not getting the change documents.Could you please tell me what i am missing?
Regards
Mohan -
Change documents for DEFAULTS tab in su01
Hi all!!
Somehow SPOOL CONTROL option-> output device for a user changed(under SU01--> DEFAULTS tab) in my Production system.
Question> can i find out change documents for DEFAULTs TAB in SU01 for a user ID?In fact I was believing the same.
I was wondering if we could add one new column to sap standard tables which will store any change documents specific to defaults tab for users. But no idea how lengthy this could be!!
Any suggestions???
Please do reply if there is any other option to find. -
Dear colleaguesu2019
Iu2019m developing a report and I need to get change documents for IBAN. I found a FM: BAPI_IBAN_GETDETAIL but this gives me the IBAN details, I also want to have when and by whom IBAN is changed.
Although I search the forum but I wasnu2019t able to find a suitable way of getting this requirement.
I need your valuable thoughts
Best regardsHave you checked the table CDHDR/CDPOS ?
I don't remember the object class (Try to pass these info into CDHDR and check)
OBJECTCLAS
OBJECTID
CHANGENR
USERNAME = <== username
UDATE = <==date
May be this hint help you out.
a®
Maybe you are looking for
-
Multiple languages in one Pages document
Hi. I don't know how to use mac software to use several languages on the same document. I regularly write articles and book chapters using sources (including interview stuff and book and article references) from English, Spanish, Italian and French
-
Are GIF, BMP files not supported?
Are GIF, BMP formats not supported? When I hit the import button, GIF and BMP files are not displayed. If I put a *.* into the File Name box, then those file types appear. If I select a BMP or GIF and attempt to import it, I get the message "no photo
-
Been trying to burn a movie onto DVD and get this "The disc can't be burned, because the device failed to calibrate the laser power level for this media" Anybody know what it means and what to do? Help! Thanks
-
How to give alias name for group of columns.
the below is the query to get Columns. But, i need to make single alias name to all the column which i get. I need to get column names also event, domain, entity, bpdid. Above columns should be under single alias name like 'baseMessage'. Please advis
-
I have used below code for keyword updates api. When i try with status it execute correctly & update. if i set bid its not update...there is no changes.. Note: i have set my keyword bid is current adgroup bid. include 'bingads/CampaignManagementCla