ERPClimb logoERPClimb
ABAP Dictionary: Tables, Buffering and Indexes
ABAP Developmentintermediate 8 min read

ABAP Change Documents: SCDO Setup, CDHDR/CDPOS and Auditable Updates

Free sample lesson · open to everyone

Key takeaway

Capture who changed customer business data and what changed through a governed application write path. Application logs, change documents, table logging and external audit trails solve related but different problems. A change document object represents business-field changes made through its supported change-document

In this lessonShow sections

Visual overview

Status change audit trail — learning sheetERPClimb original flow training diagram: Do not INSERT directly into SAP change-document tables. Illustrative SAP process, not a product screenshot.ERPCLIMB · PROCESS FLOWILLUSTRATIVE · CHECK SAP EDITIONStatus change audit trail01Old vs new data imagePENDING → APPROVED02Generated SCDO updateCDHDR object/time/user03Change document headerCDPOS old and new04Field changes in itemsDo not INSERT directly into SAP change-document tables.

The situation: a real project scenario

A quality officer requests an explanation for a warranty status changing from PENDING to APPROVED. The application reads approved change-document history to show operator, time and old/new status without disclosing unrelated personal fields.

Explanation

DIRECT ANSWER

Capture who changed customer business data and what changed through a governed application write path.

WHAT SAP DOES AND WHAT IT DOES NOT DO

Application logs, change documents, table logging and external audit trails solve related but different problems. A change document object represents business-field changes made through its supported change-document update calls, with headers and item details commonly read through CDHDR/CDPOS in classic systems.

PREREQUISITES / PRODUCT EDITION

This is an original synthetic training scenario, not a customer screenshot. Before editing any configuration, verify product edition, relevant scope/entitlements, existing customizing, authorization, business owners and transport approval. Classic SAP GUI transactions are not always available in S/4HANA Cloud Public Edition or restricted ABAP Cloud. Work in an authorized sandbox; protect customer data.

STEP-BY-STEP IMPLEMENTATION AND EVIDENCE

STEP 1 — Scope

Identify a specific authorized change requirement: for a synthetic warranty record, log status changes but do not store customer bank information or free-text secrets. Agree which fields are auditable and how long the entries must be retained.

STEP 2 — Configure

Review data elements in the customer-owned table and the change-document relevance of fields in the chosen implementation. Create a change-document object with SCDO in the supported classic system, or choose an edition-supported logging mechanism; do not assume SCDO is a released ABAP Cloud API.

STEP 3 — Run

Regenerate or inspect change-document update interfaces rather than writing into CDHDR/CDPOS directly. Capture old and new field images consistently inside the application update flow; commit boundaries and update task determine whether business change and audit record are reliably paired.

STEP 4 — Inspect

Simulate a status transition A→B, a no-op B→B and a rejected unauthorized transition B→C. Confirm which events produce change documents and whether the change header links to the correct object key, user and time; ensure sensitive data is minimized.

STEP 5 — Challenge with a failure case

Verify the reader path: report history through an authorized UI/API, inspect the relevant document header and positions in a development system, and confirm archive/retention policy. For a production incident use access-controlled logs rather than copying customer values into emails.

PROJECT SCENARIO: EXPECTED BUSINESS RESULT

A quality officer requests an explanation for a warranty status changing from PENDING to APPROVED. The application reads approved change-document history to show operator, time and old/new status without disclosing unrelated personal fields.

TROUBLESHOOTING AND ROOT CAUSE

If no CDHDR/CDPOS entries appear, determine whether the update route invokes the generated change-document logic at all and whether the relevant field is marked for tracking. If entries exist with wrong keys, inspect object-ID composition and old/new images.

WHAT NOT TO DO

Do not equate DB table logging with a complete functional audit, and do not write directly into SAP change-document tables. The authorization, lifecycle and compliance policy is part of the design.

WORKED EXAMPLE / ACCEPTANCE FIXTURE

Synthetic event specification:
OBJECT_ID = 'WARRANTY-000047'

Field STATUS old = 'PENDING' → new = 'APPROVED'

Record actor, timestamp and change indicator through the supported change-document interface

No event expected for rejected unauthorised save.

RELEASE READINESS: PROOF BEFORE PROMOTION

A successful demonstration requires a known initial state, business approval, a permitted user, a positive case, at least one failed/unauthorized case, and observed documents or API state consistent with the expected outcome. Reconcile cross-system results, record the troubleshooting evidence and retain an approved rollback or containment option. The synthetic identifiers here must never be confused with customer system results.

OFFICIAL SAP/CAP REFERENCE AND VERSION WARNING

https://help.sap.com/docs/SAP_NETWEAVER_AS_ABAP_FOR_SOH_740/c14d25a8f471453590980dbb47a2aa0e/48d1c160f6c96745e10000000a421937.html
This lesson describes general SAP-supported concepts and a version-dependent implementation workflow. Validate transaction availability, data model and released interfaces in the actual software version before production use. Example text is illustrative and has not been executed in a customer tenant.

RELATED ERPCLIMB LESSONS

ABAP Core Part 10: Clean ABAP Basics for Maintainable Code: https://erpclimb.com/lessons/clean-abap-basics-for-maintainable-code
Open SQL Part 10: Open SQL in Real Reports and Interfaces: https://erpclimb.com/lessons/open-sql-in-interfaces-reports-and-odata-services

How the SAP process fits together

SAP PROCESS EXPLORER · ABAP execution & delivery

ERPClimb.com

ABAP execution & delivery

Representative lifecycle of an executable ABAP report; classes, FMs and RFC interfaces follow different call paths.

1/5

Selected process stage

Selection screen or caller

Capture and validate runtime parameters or method inputs

Representative SAP learning flow, not a guarantee of system runtime sequence in every scenario.

Code example

ABAP Code
ILLUSTRATIVE WORKED EXAMPLE — VERIFY IN YOUR SAP RELEASE; NOT DROP-IN EXECUTABLE CODE Synthetic event specification:OBJECT_ID = 'WARRANTY-000047'Field STATUS old = 'PENDING' → new = 'APPROVED'Record actor, timestamp and change indicator through the supported change-document interfaceNo event expected for rejected unauthorised save.

Watch out

Common mistakes

  • Do not equate DB table logging with a complete functional audit, and do not write directly into SAP change-document tables. The authorization, lifecycle and compliance policy is part of the design.
  • If no CDHDR/CDPOS entries appear, determine whether the update route invokes the generated change-document logic at all and whether the relevant field is marked for tracking.
  • If entries exist with wrong keys, inspect object-ID composition and old/new images.

Do this

Best practices

A five-point implementation checklist for this exact SAP workflow:

  • Identify a specific authorized change requirement: for a synthetic warranty record, log status changes but do not store customer bank information or free-text secrets.
  • Review data elements in the customer-owned table and the change-document relevance of fields in the chosen implementation.
  • Regenerate or inspect change-document update interfaces rather than writing into CDHDR/CDPOS directly.
  • Simulate a status transition A→B, a no-op B→B and a rejected unauthorized transition B→C.
  • Verify the reader path: report history through an authorized UI/API, inspect the relevant document header and positions in a development system, and confirm archive/retention policy.

In the interview

Interview angle

Interview scenario: Capture who changed customer business data and what changed through a governed application write path.

What a strong answer should prove:

  • Explain the product boundary. Application logs, change documents, table logging and external audit trails solve related but different problems. A change document object represents business-field changes made through its supported change-document update calls, with headers and item details commonly read through CDHDR/CDPOS in classic systems.
  • Describe the real project example and expected result. A quality officer requests an explanation for a warranty status changing from PENDING to APPROVED. The application reads approved change-document history to show operator, time and old/new status without disclosing unrelated personal fields.
  • Demonstrate diagnostic thinking. If no CDHDR/CDPOS entries appear, determine whether the update route invokes the generated change-document logic at all and whether the relevant field is marked for tracking. If entries exist with wrong keys, inspect object-ID composition and old/new images.
  • State the trade-off or compliance limitation. Do not equate DB table logging with a complete functional audit, and do not write directly into SAP change-document tables. The authorization, lifecycle and compliance policy is part of the design.

Practice this lesson

Quick check

0 of 1 questions attempted

Question 1 of 1

Which action is unsafe for customer change-document implementation?

Try a related Code Lab

This published exercise covers the same SAP topic. Apply the ideas in a hands-on scenario, then return to review your answers.

Open: ABAP DDIC: Internal Table Is Not Database Persistence →

See it in code

Each example starts from a requirement, shows the design, then the code step by step with a plain-language explanation of every part.

Was this lesson helpful?

Keep exploring

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.