Utilizing standard CDS Views for Change Document Tables – CDHDR & CDPOS
This blog post provides information on reading or viewing data of change documents tables information through standard CDS views. Using these views, we can read most of the standard SAP master and transactional data object changes like Purchase order, Purchase Requisition, Material, Plant, Internal order etc.,
What is a Change Document –
A change document logs changes to a business object. The document is created independently of the database changes. In SAP, any change log information of an SAP documents or objects captured in tables CDHDR and CDPOS
- CDHDR: It contains the header data of the change to an object ID in an object class and change document number is automatically assigned.
- CDPOS: It contains the old and new value of a field in a change and a change flag.
Both header and item tables capture changes such as change data in Material Master, changes to Purchase orders/ Purchase Req (PR), Purch Orders, Contracts, Sales Orders, Internal orders etc.,
More info about Change Document:
In general, ECC or R/3 systems we will read change documents or change log information of SAP Objects using tables CDHDR & CDPOS.
In addition, we have to create custom views and custom reports as per business requirements through SQVI. Developer or user must put some efforts for getting this information. We must know the Change document object, Object value and the transaction details used for that SAP object to get details of a particular object.
Example – for Purchase order Object value is EINKBELEG and transaction ME22N.
In S4 Hana, we have some standard CDS views using them we can get the change document information of any SAP Objects easily by simply running the standard view in SE16n.
- Material Change Log – CGRCMATLMSTRCHG
- PO change Log – IPURGCHGDOCITM
- PR Change Log – CMMPRIDOCCHNG
This blog post has covered most of the standard CDS views which are available for change document tables as listed below. These views have additional attributes it can be helpful from business perspective and developers to track change history details.
All these views can be accessed either in Eclipse or sql views in SE16n or SE11.
Hope this blog post helps.
Any suggestions or comments welcome.