Delete CHANGE entries (cdhdr/cdpos)
Hello,
is there a standard Report to delete old entries in CDHDR / CDPOS ?
thanks
Werner
note [183558|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=183558&nlang=EN&smpsrv=https%3a%2f%2fwebsmp208%2esap-ag%2ede] might help.
Similar Messages
-
FOR ALL ENTRIES - CDHDR / CDPOS Tables
Hi,
I know there have been a lot of threads concerning the "for all entries" statement. Nevertheless I got a problem downloading the change document tables CDHDR/CDPOS with this statement and I haven't found anything in this forum regarding this special issue.
While trying the for all entries statement in the below manner for downloading first CDHDR and then the CDPOS for all entries of the selected CDHDR it took 3 days and didn't finish, so we aborted the ABAP. The JOIN statement doesn't work in a 4.6c environment for the Cluster tables, hence this isn't an option.
Can you give me some advise of how to improve downloading those tables in this way:
1. Download CDHDR with limitation of fields OBJECTCLAS and UDATE
2. Then Download CDPOS for all CHANGENR out of the first selection of CDHDR
This was the way I tried it:
SELECT
ACT_CHNGNO CHANGE_IND CHANGENR MANDANT OBJECTCLAS OBJECTID PLANCHNGNR TCODE UDATE USERNAME UTIME WAS_PLANND APPENDING CORRESPONDING FIELDS OF TABLE T_CDHDR FROM CDHDR WHERE UDATE IN s_UDAT1 AND OBJECTCLAS IN s_OBJE0.
ENDSELECT.
SELECT
CHANGENR CHNGIND CUKY_NEW CUKY_OLD FNAME MANDANT OBJECTCLAS OBJECTID TABKEY TABNAME UNIT_NEW UNIT_OLD VALUE_NEW VALUE_OLD INTO gs_CDPOS FROM CDPOS CLIENT SPECIFIED for all entries in T_CDHDR WHERE OBJECTCLAS IN s_OBJE2 AND MANDANT EQ T_CDHDR-MANDANT AND OBJECTCLAS EQ T_CDHDR-OBJECTCLAS AND CHANGENR EQ T_CDHDR-CHANGENR.
ENDSELECT.THis prg might b usefull to u
* Mass display or print Purchase Order History
* You can request report by :
* 1. Change date
* 2. User Name
* 3. Purchase Order Number
* 4. Vendor Code
* Written by : SAP Basis, ABAP Programming and Other IMG Stuff
* http://www.sap-img.com
REPORT ZPOCHANGE LINE-SIZE 132 NO STANDARD PAGE HEADING
LINE-COUNT 065(001)
MESSAGE-ID VR.
TABLES: DD04T,
CDHDR,
CDPOS,
DD03L,
DD41V,
T685T,
VBPA,
TPART,
KONVC,
EKKO.
SELECT-OPTIONS: XUDATE FOR CDHDR-UDATE,
XNAME FOR CDHDR-USERNAME,
XEBELN FOR EKKO-EBELN,
XLIFNR FOR EKKO-LIFNR.
SELECTION-SCREEN SKIP.
* TEXT-001 - Sorting Sequence
SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
PARAMETERS: SUDATE RADIOBUTTON GROUP R1,
SNAME RADIOBUTTON GROUP R1,
SOBID RADIOBUTTON GROUP R1.
SELECTION-SCREEN END OF BLOCK BLK1.
DATA: WFLAG,
WCHANGENR LIKE CDHDR-CHANGENR.
DATA: INDTEXT(60) TYPE C.
DATA: BEGIN OF ICDHDR OCCURS 50.
INCLUDE STRUCTURE CDHDR.
DATA: END OF ICDHDR.
DATA: BEGIN OF ICDSHW OCCURS 50.
INCLUDE STRUCTURE CDSHW.
DATA: END OF ICDSHW.
DATA: BEGIN OF EKKEY,
EBELN LIKE EKET-EBELN,
EBELP LIKE EKET-EBELP,
ETENR LIKE EKET-ETENR,
END OF EKKEY.
DATA: BEGIN OF ITAB OCCURS 50,
BEGIN OF EKKEY,
EBELN LIKE EKET-EBELN,
EBELP LIKE EKET-EBELP,
ETENR LIKE EKET-ETENR,
END OF EKKEY,
CHANGENR LIKE CDHDR-CHANGENR,
UDATE LIKE CDHDR-UDATE,
UTIME LIKE CDHDR-UTIME,
USERNAME LIKE CDHDR-USERNAME,
CHNGIND LIKE CDSHW-CHNGIND,
FTEXT LIKE CDSHW-FTEXT,
OUTLEN LIKE CDSHW-OUTLEN,
F_OLD LIKE CDSHW-F_OLD,
F_NEW LIKE CDSHW-F_NEW,
END OF ITAB.
DATA: OLD_OBJECTID LIKE CDHDR-OBJECTID.
FIELD-SYMBOLS: <F_OLD>, <F_NEW>.
SELECT * FROM EKKO WHERE EBELN IN XEBELN AND
LIFNR IN XLIFNR.
CLEAR CDHDR.
CLEAR CDPOS.
CDHDR-OBJECTCLAS = 'EINKBELEG'.
CDHDR-OBJECTID = EKKO-EBELN.
PERFORM GETCHGDOCS.
ENDSELECT.
IF SUDATE = 'X'.
SORT ITAB BY UDATE EKKEY-EBELN CHANGENR EKKEY-EBELP
EKKEY-ETENR.
ELSEIF SNAME = 'X'.
SORT ITAB BY USERNAME EKKEY-EBELN CHANGENR EKKEY-EBELP
EKKEY-ETENR.
ELSE.
SORT ITAB BY EKKEY-EBELN CHANGENR EKKEY-EBELP EKKEY-ETENR.
ENDIF.
LOOP AT ITAB.
CLEAR: INDTEXT, EKKEY.
CASE ITAB-CHNGIND.
WHEN 'U'.
INDTEXT(50) = ITAB-FTEXT.
INDTEXT+51 = TEXT-020.
CONDENSE INDTEXT.
WHEN 'D'.
INDTEXT = TEXT-021.
WHEN 'E'.
INDTEXT(5) = ITAB-FTEXT.
INDTEXT+51 = TEXT-021.
CONDENSE INDTEXT.
WHEN 'I'.
INDTEXT = TEXT-022.
ENDCASE.
RESERVE 4 LINES.
IF WCHANGENR NE ITAB-CHANGENR.
WCHANGENR = ITAB-CHANGENR.
EKKEY = ITAB-EKKEY.
WRITE:/ ITAB-UDATE UNDER 'Change Date',
ITAB-UTIME UNDER 'Time',
ITAB-USERNAME UNDER 'User Name',
ITAB-EKKEY-EBELN UNDER 'PO No',
ITAB-EKKEY-EBELP UNDER 'Item',
ITAB-EKKEY-ETENR UNDER 'Sch No',
INDTEXT UNDER 'Changes'.
ELSEIF ITAB-EKKEY NE EKKEY.
WRITE:/ ITAB-EKKEY-EBELP UNDER 'Item',
ITAB-EKKEY-ETENR UNDER 'Sch No',
INDTEXT UNDER 'Changes'.
ENDIF.
CASE ITAB-CHNGIND.
WHEN 'U'.
ASSIGN ITAB-F_OLD(ITAB-OUTLEN) TO <F_OLD>.
ASSIGN ITAB-F_NEW(ITAB-OUTLEN) TO <F_NEW>.
WRITE: / TEXT-023 UNDER 'Changes',
<F_OLD>.
WRITE: / TEXT-024 UNDER 'Changes',
<F_NEW>.
WHEN 'E'.
ASSIGN ITAB-F_OLD(ITAB-OUTLEN) TO <F_OLD>.
WRITE: TEXT-023 UNDER 'Changes',
<F_OLD>.
ENDCASE.
SKIP.
ENDLOOP.
TOP-OF-PAGE.
WRITE:/ SY-DATUM,SY-UZEIT,
50 'P U R C H A S E O R D E R H I S T O R Y',
120 'Page', SY-PAGNO.
WRITE: / SY-REPID,
60 'Purchase Orders Changes'.
SKIP.
ULINE.
IF SUDATE = 'X'.
WRITE:/001 'Change Date',
014 'Time',
024 'User Name',
038 'PO No',
050 'Item',
057 'Sch No',
065 'Changes'.
ELSEIF SOBID = 'X'.
WRITE:/001 'PO No',
013 'Item',
020 'Sch No',
028 'Change Date',
041 'Time',
051 'User Name',
065 'Changes'.
ELSE.
WRITE:/001 'User Name',
015 'Change Date',
028 'Time',
038 'PO No',
050 'Item',
057 'Sch No',
065 'Changes'.
ENDIF.
ULINE.
FORM GETCHGDOCS.
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
DATE_OF_CHANGE = CDHDR-UDATE
OBJECTCLASS = CDHDR-OBJECTCLAS
OBJECTID = CDHDR-OBJECTID
TIME_OF_CHANGE = CDHDR-UTIME
USERNAME = CDHDR-USERNAME
TABLES
I_CDHDR = ICDHDR
EXCEPTIONS
NO_POSITION_FOUND = 1
OTHERS = 2.
CHECK SY-SUBRC EQ 0.
DELETE ICDHDR WHERE CHANGE_IND EQ 'I'.
CHECK NOT ICDHDR[] IS INITIAL.
LOOP AT ICDHDR.
CHECK ICDHDR-UDATE IN XUDATE.
CHECK ICDHDR-USERNAME IN XNAME.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING CHANGENUMBER = ICDHDR-CHANGENR
IMPORTING HEADER = CDHDR
TABLES EDITPOS = ICDSHW
EXCEPTIONS NO_POSITION_FOUND = 1
OTHERS = 2.
CHECK SY-SUBRC EQ 0.
LOOP AT ICDSHW.
CHECK ICDSHW-TEXT_CASE EQ SPACE.
MOVE-CORRESPONDING ICDSHW TO ITAB.
MOVE-CORRESPONDING ICDHDR TO ITAB.
MOVE ICDSHW-TABKEY+3 TO ITAB-EKKEY.
APPEND ITAB.
ENDLOOP.
ENDLOOP.
ENDFORM.
* END OF PROGRAM -
No entry in CDHDR & CDPOS for change in Production Order
Hi,
I am unable to get entries in Tables CDHDR & CDPOS for any change in Production Order. Actually I need the Number of times a Production Order has been changed. Please help on this.
Cheers
AbhishekYou can trace the below navigation so that you will get good idea :
goto CO03 -> enter production order # -> enter ->goto -> change management
Thanks
Seshu -
Changes not reflected in table CDHDR/CDPOS using production order(CO02)
Hi experts..
i want to extract all the changed\new entries from table RESB (reservation table). The object class for this table is ORDER. I m using CDHDR/CDPOS tables for retrieving the changes. But the changes reflected in RESB using Service Order transaction (iw32) only is getting updated in CDHDR/CDPOS, not through Production Order transaction (co02). Any idea about this problem ?Hi,
Refer this wiki code ALV Grid Display with checkbox to process selected records at runtime, it will definitely help you:-
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime
Regards,
Tarun -
How to get deleted project definitions information from CDHDR CDPOS tables
Hi,
I want to get project definitions or WBS ELmenets that got deleted from CJ02 or CJ12. We can get this information from CDHDR or CDPOS table by passing PROJ object class but in this table changes (change or deletion) are not captured. so can anybody please let me know how to activate object class PROJ or how to track changes in CDHDR or CDPOS table?
Regards,
M, Manohar
<Contact information removed by moderator>
Edited by: Vinod Kumar on Sep 19, 2011 3:37 PMHi,
If the requirement is to identify when the project / WBS was deleted, then alternate oprion is to pass the WBS OBJNR to JCDS. JCDS will give you the status updates happened on a project and also when and who made the changes.
Regards
Sreekanth -
Need to log entries in CDPOS and CDHDR
We have a custom table and would like to log entries in CDPOS and CDHDR for any changes. Is there any methos or setting where by this can be done?
at the data element level, you should check the checkbox CHANGE DOCUMENT. This appears on FURTHER characteristics tab of any data element.
if this is checked,all the changes will be logged automatically.
regards
srikanth
Message was edited by: Srikanth Kidambi -
Requisition Change History - not showing all records from CDHDR/CDPOS
Hello,
When viewing the Item Changes for a requisition in ME53N, I don't always see all the records that are contained in tables CDHDR / CDPOS. The missing records are related to release strategies. Does anyone have any ideas why this happens?
Thank you,
Regards,
JackieHello Jackie,
check flag "Change document" is set for the data elements.
Start transaction SE11, enter database table, push button "Display".
Check register "Fields" In the following screen, doulbe click on "Data element" for the field you want to check.
Select register "Further Characteristics" in the following screen, here you can find flag for "Change document".
Best Regards, Dirk -
Update the change history for line items in CDHDR/CDPOS
Hi,
I have a problem in updating the sales order and line items in CDHDR/CDPOS when there is change in header level custom field..
Actually i have a custom field in VBAK which added in additional data A in the header level of sales order.When we have change in that field only some line items only updating in the change history tables(CDHDR/CDPOS),but we need to capture all the line items when the custom field in the header level is changed.
i have added change document flag in the data element of the custom field.
Please advice me how to get all the line items will reflect in CDHDR/CDPOS when the header level custom field has change .
Thanks & Regards
KiranThe purpose of CHANGE DOCUMENT tables is to flag the changes with Old and New values. So when Header data is changed only Header details will be tracked and same for Item tables too.
If you need anything addtional from this then that would customizing.
I am not sure what is your requirement but to make it simple and achive requirement add same field with same setting to line item tables VBAP, VBKD.. (as required, if that's doesnt impact your Order. These fields no need to be on screen). While changing your Custom field of Header level change the item level field too. Then CHANGE DOCUMENT will generate automatically for all the line item including header. -
MASS/MM17 don't create change documents in CDHDR/CDPOS?
Hello,
This has probably been answered before, but I've been unable to find it in OSS or on forum searches here.
When I use MASS with object type BUS1001 and make mass changes to materials, the changes are not recorded in CDHDR/CDPOS. Is there any way to fix this? These changes really should be recorded. SAP Version is 4.7.
Thanks,
Randy PoserThe changes will be recorded in the CDHDR but there will not be any document number
to have doc number u have to activate the Eng change management
what ever u do in MASS will get recorded in CDHDR w/o number so check by date u made changes to material and u will see records -
Change Log Table entries without Dates and How to Delete these entries !!
Hello Experts,
I was analyzing Change Log tables of some DSOs and figured out in some tables we don't have Date Column and some tables with date columns but many entries with "00/00/0000" date.
Any ideas on this ? Any idea how records can get into the table without dates and if SAP provides a safe way to remove them (without dates) ?
Many Thanks in advance, Please help.
Regards,
S. PatelHi Sunil
Date fileds 00/00/0000 means date are blank..that means either you did not get them from source system or the transformation is not mapped.
Do not delete change log selectively, that might affect your delta loads.
Rather delete old change log ...
From DSO administration ---use the main menu to choose Environment ® Delete Change Log Data.
For more information you can check the log below.
Cheers
Anindya -
Generic data source. Delta based on the changes in the CDHDR & CDPOS
Hello all,
I need to create a generic data source using fun module. This fun module has to execute delta based on changes in table CDHDR & CDPOS for purchase order info records.
can I use RSAX_BIW_GET_DTA_SIMPLE?
Is there any other way to implement this requirement?
waiting for ur suggestions ...........
Thanks,
zak.hi
check the below extractor... it will extract status from both table.. u may not be required to build a generic one..
0TE_OBJ_STATUS_HIST -
How to use Function module generated to update CDHDR CDPOS
Hi,
I have a Z-table, and I want to tracks the value changes in some fields,
the data elements for those specific fields are marked for "Change document".
I created a Change document object using the transaction SCDO and I got the function module.
now can any one tell me how to use these function modules like ( what values need to be passed to function module. what value do we need to pass for OBJECTID,..value for tables ...etc )
I have a custom program to update/delete entries in the custom table so should I use the function module in my custom program to result an entry in CDHDR & CDPOS.
how to display the old value and new values for the fields specified to changes.
Regards,
Nagu.check in SE37
RV_ORDER_FLOW_INFORMATION
SD_SALES_DOCUMENT_READ
SD_SALES_DOCUMENT_READ_POS
SD_DOCUMENT_PARTNER_READ
SD_DETERMINE_CONTRACT_TYPE
SD_SALES_DOCUMENT_COPY
SD_SALES_DOCUMENT_SAVE
SD_SALES_DOCUMENT_ENQUEUE
SD_PARTNER_READ
RV_DELIVERY_PRINT_VIEW
SD_PACKING_PRINT_VIEW
SD_DELIVERY_VIEW
RV_BILLING_PRINT_VIEW
RV_PRICE_PRINT_HEAD
RV_PRICE_PRINT_ITEM
Rewards if useful...........
Minal -
How to delete duplicate entries in table for the object DNL_CUST_BASIS2
Hi All,
I am trying to download the object DNL_CUST_BASIS2.
In the SMQ2 the status is SYSFAIL.
I checked in the ST22 for dumps.It says about the error while accessing the table T006.
While analysing this,i found some duplicate entries in the related tables of this object.
Can somebody help me how to delete these duplicate entries?
Thanks,
Senthil.Delete them directly from the table using se16:
select the entries in the classic view (not ALV or grid view).
activate the debugger.
press the view button. --> you'll enter in the debugger
press F7
locate the sy-ucomm variable & change it to "DELE".
press F8
delete the entries.
Trick-shots
but it works!
Michael. -
How to track , who has deleted table entry
Hi Experts,
Is there any way so that i can know that who has manually deleted few entries(data records) from my table,actually my table has "Display maintenance allowed" property set.
Can we track it anyway that when and who has deleted that table record.
Regards,
AbhishekHi Abhishek,
Actually the changes made for an entry into table will have two effects.
Changes at the data element level and another at the entire db table level all these changes will have an entry only if the change documentation is activated.
Table logging concept wherein SAP records all insertions, deletions, and changes in tables
OSS note 139418 will gibe you general information on logging user actions.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eaf9446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/Helpdata/EN/7e/c81ebb52c511d182c50000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/a0/7d1020dac8994fa63ff270dbceb87f/content.htm
revert for further clarification,
Thanks and Regards
Srikanth.P -
"WF-USER can only delete this entry" error while deleting entry in tRFC
Hello Experts,
We have a scenario wherein the outbound IDoc from our SAP system consists of lot of IDoc data segments. Becase if this large size, the EAI Middleware is getting out of memory exception while processing it before sending it to the receiving system with an error "Trnasaction XXXXXXXXX rolled back" (Committing is geting failed). And it is not possible from EAI Middleware side to increase the memory. Because of this, other outbound IDocs getting struck in the tRFC (IDoc status = 03, Data Passed to Port OK) queue and thereby delaying the process.
We would like to delete the entry (TID) of this particular IDoc from the tRFC queue. When we try to do taht, we are getting the error message "WF-BATCH can only delete this entry" which is actually the system Workflow user.
Could anyone suggest me the way to delete the entries? We hav one option where we can that system user name to our user name in "Debug Change'. Becasue of some authorozation problems, we would not be getting that.
Could you please suggest me about any alternative. Appriciate your help. Thanks in advance.
Best regards,
Kishore.Hello Kishore,
I also encountered the same problem in transaction SWU2.
I could bypass the message in debuging mode only.
I put a breakpoint in report RSARFCRD, and, in debug mode, I skip the following check:
if sy-lisel+1(12) <> sy-uname.
message e019 with sy-lisel+1(12).
endif.
Best Regards,
Alexandre.
Maybe you are looking for
-
I've been trying to make a text input section on my website for people to submit comments, I can get the text area to work fine and everything but instead of it going to another line when it reaches the edge of the box it just continues horizontally
-
Hi I require a report to show me the following. Customer order Number, date order was entered, date of the required delivery and a Purchase order No thanks all
-
Why can´t I install Itunes 10.5 for windows vista?
"Error durante la instalación del ensamblaje" "policy.8.0.Microsoft VC80.CRT.type="win32-policy".vers ion="8.0.50727.6195".publicKeyToken="1fc8b3b9a1e18e3b".processorArchitecture="x 86"".Consulte Ayuda y soporte técnico para obtener más información.
-
ABAP Code Problem in Start Routine to Fill the value from Look-up Table ???
Hi all, I am trying to fill the values of DOC_NUMBER & PLANT from look-up table /BIC/AZSD_O0700 (Billing Item ODS) for each BILL_NUM in Start Routine for Update Rules of Billing Header ODS and modify the data_package. What is wrong with the belo
-
Unable to create Init Delta InfoPackage.
Hi Experts, I am working on BI 7.0 within Solution Manager (GSB 100). Since I am extracting data from only 2 tables into 2 different InfoCubes, we did not require to create any Master Data loads. In order to load these 2 InfoCubes, I have created 2 T