HomeAboutBlog ContactSAPHTML SQLPython AI
🔍 SAP Audit Trail · Real Scenarios · 2026–27

Audit Trail in SAP – Real Scenario:
How SAP Tracks Every Change Across All Modules

2026–27 Guide Pramod Behera 25 min read MM · SD · FI · CO · HR · QM · PS

🔍 What is an Audit Trail in SAP?

Audit trail in SAP ECC and S4/HANA is the complete, safe record of every change made to any bit of data in the SAP system - who changed it, when they changed it, what the old value was, and what the new value is. SAP builds audit trail capability into every module automatically. When a vendors bank account is changed, when a purchase order price is modified after approval, when an employee salary is updated, when a production order quantity is revised - SAP records every one of these changes permanently using its Change Document framework (CDHDR + CDPOS), FI document history, HR infotype change logs, and module-specific audit tables. This is not optional - it is the foundation of financial compliance, regulatory audit readiness (SOX, GDPR, GMP, IS0 9001), and internal controls in every SAP implementation world-wide.This tutorial or document breaks down the process step by step, using simple language and real-world examples to help you master the skill.

📋

Change Documents

CDHDR + CDPOS track every field-level change to master data and transactional documents across MM, SD, FI, and HR.

🔒

Immutable FI Documents

FI accounting documents can never be changed - only reversed. Every posting in BKPF/BSEG is permanent with full timestamp and user ID.

👁️

Regulatory Compliance

SAP audit trails meet SOX Section 404, FDA 21 CFR Part 11, GMP Annex 11, GDPR, and ISO 9001 audit requirements out of the box.

FI Document Trail
PO Change History
HR Infotype Log
Material Master Changes
WBS Audit Log
QM Electronic Signature
ABAP Change Doc Query

📋 The CDHDR / CDPOS Framework - SAP's Universal Audit Engine

The Change Document framework is SAP's universal audit trail engine. It applies to virtually every master data object and many transactional documents across all modules. Think of it as SAP's internal black box recorder - whenever a user saves a change to a vendor master, a purchase order, a material master, a customer record, or a sales order, SAP writes a header record to CDHDR and one detail record per changed field to CDPOS. Auditors can then reconstruct the exact history of any data record - field by field, date by date, user by user - going back years.

Imagine the internal audit team at Precision Components Pvt Ltd, a tier-2 automotive supplier in Pune, has been asked by their external auditors to prove that no purchase order was modified after it was approved and converted to a legal obligation. The audit manager needs to provide a complete field-level change history for every PO raised in FY2025. Here is exactly how this is done in SAP using the Change Document framework:

SCENARIO 01

Atul Precision Components - PO Post-Approval Change Audit

1
Purchase Order 4500012347 Created - ME21N

On 03-Apr-2025, buyer Pramod Behera creates PO 4500012347 for 200 units of Alloy Steel Rods (Part ASTR-220) from vendor Pooja Metals Ltd at ₹1,800/unit = ₹3,60,000 total. PO is approved by the plant manager. PO header data is saved in EKKO (EBELN = 4500012347) and item data in EKPO. The original approved price ₹1,800 is now legally committed.

T-Code: ME21N · Tables: EKKO (header) · EKPO (item) · CDHDR/CDPOS (change record)
2
Price Changed After Approval - ME22N

On 18-Apr-2025, senior buyer Sujata Sharma opens the PO in ME22N and changes the unit price from ₹1,800 to ₹2,050 citing "market rate revision." This single change immediately creates two records in SAP: a header in CDHDR (change document header: document number, object class EKKO, date 18-Apr-2025, time 14:32:11, user ANITA.SHARMA) and a detail in CDPOS (field NETPR, old value 1800.00, new value 2050.00, table EKPO, PO number 4500012347). The system records this permanently - it cannot be deleted.

T-Code: ME22N · Tables: CDHDR (header) · CDPOS (field-level old/new values)
3
Audit Manager Runs Change Document Report - ME2M / SE16N

The audit manager pulls the change document report. In SE16N on table CDHDR: filter OBJECTCLAS = 'EINKBELEG' (purchasing document), UDATE between 01-Apr-2025 and 31-Mar-2026. Result: 47 change records found across all POs. Join CDHDR to CDPOS on CHANGENR to see exactly which field was changed on each PO. Alternatively, display PO 4500012347 in ME23N and click the "Changes" button (Environment → Document Changes) to see the complete field-level history in a formatted view.

T-Code: ME23N → Environment → Document Changes · SE16N on CDHDR + CDPOS
4
ABAP Query to Extract All PO Price Changes - SE16N / SQVI

For a bulk extraction of all PO price changes in FY2025, the ABAP team runs a query joining CDHDR (filter: OBJECTCLAS = 'EINKBELEG', FNAME = 'NETPR') with CDPOS. The query returns: PO number, line item, change date, changing user, old price, new price, and delta amount. 47 PO price changes identified. Of these, 12 were changed without a fresh approval workflow - flagged as a control deficiency in the audit report. Root cause: approval workflow was not configured to re-trigger on price changes.

T-Code: SQVI (Quick Viewer) · SE16N · Custom ABAP report on CDHDR + CDPOS
5
Audit Finding Closed - Workflow Enhancement Implemented

Based on the audit finding, the SAP BASIS / workflow team configures the approval workflow (transaction SWI2_ADM1) to re-trigger the approval chain whenever the NETPR (net price) field in EKPO increases by more than 5% after initial approval. Change is transported to production. Going forward, any price change exceeding the threshold requires fresh manager approval before the PO can be saved - and the CDHDR/CDPOS trail will show both the change attempt and the approval response, giving auditors complete end-to-end visibility.

T-Code: SWI2_ADM1 (Workflow) · SWDD (Workflow Builder) · Transport via SE10
CDHDR + CDPOS - Change Document Framework Structure
TableFieldDescriptionExample Value
CDHDRCHANGENRChange document number (primary key)0000000187634
CDHDROBJECTCLASObject class - identifies which SAP object was changedEINKBELEG (PO) · KRED (Vendor) · DEBITOR (Customer)
CDHDROBJECTIDObject key - the document or master record number4500012347 (PO number)
CDHDRUDATE / UTIMEDate and time of change18.04.2025 / 14:32:11
CDHDRUSERNAMEUser ID who made the changeANITA.SHARMA
CDPOSCHANGENRLinks to CDHDR on this key0000000187634
CDPOSTABNAMETable where the field was changedEKPO
CDPOSFNAMEField name that was changedNETPR
CDPOSVALUE_OLDValue before the change1800.00
CDPOSVALUE_NEWValue after the change2050.00
💡

Key CDHDR Tip: Different SAP objects use different OBJECTCLAS values in CDHDR. The most important ones to know: EINKBELEG = Purchasing document (PO/PR), KRED = Vendor master, DEBITOR = Customer master, MATERIAL = Material master, AUFK = Order (production/internal), PROJ = Project definition. Always filter CDHDR by OBJECTCLAS first - this instantly narrows your audit query from millions of rows to just the relevant object type.

💰 FI Document Audit Trail - Every Rupee Permanently Recorded

In SAP Financial Accounting, the audit trail philosophy is fundamentally different from the Change Document approach. FI accounting documents are immutable - they can never be changed, only reversed. When a journal entry is posted in FB01, an invoice in MIRO, or a payment in F110 - that accounting document is locked permanently in tables BKPF and BSEG with the user ID, timestamp, and exact financial amounts. Any error correction must be done by posting a reversal document - which itself creates a new permanent record. This gives auditors a complete, unbreakable chain of every financial event in the company.

Imagine the CFO of Pramod Textile Mills Ltd has received an urgent query from SEBI regarding some suspicious inter-company transfers posted in the FI ledger during October 2024. The company's internal auditor must reconstruct the complete audit trail - who posted the entries, when, through which transaction, and what approval existed - within 48 hours of the query.

SCENARIO 02

Luxi Textile Mills Ltd - SEBI Query on Suspicious FI Postings

1
Pull All Manual Journal Entries - FBL3N / FB03

The auditor opens FBL3N for G/L account 198000 (Inter-Company Transfers) for company code NTM1, period October 2024. The report reads BSIS (open items) and BSAS (cleared items) joined to BKPF on BUKRS + BELNR + GJAHR. Results show 14 postings totalling ₹4.2 crore. Key BKPF fields: BLART (document type), USNAM (posting user), CPUDT (entry date), CPUTM (entry time), TCODE (transaction code used). Three entries show document type AB (accounting document) posted at 11:45 PM by user SYSADMIN - immediately suspicious.

T-Code: FBL3N (Line Items) · FB03 (Display FI Document) · Tables: BKPF + BSEG + BSIS
2
Trace the Exact Document - FB03

The auditor double-clicks on suspicious document 1900000445 in FBL3N to open it in FB03. Every field in BKPF is visible: document date 31-Oct-2024, posting date 31-Oct-2024, entry time 23:47:32, user SYSADMIN, reference text "Month-end provision", transaction code FB01. The line items in BSEG show: ₹1.8 crore debit to account 198000 (Inter-Company), ₹1.8 crore credit to account 400000 (Sales Revenue). Crediting sales revenue via a late-night manual journal entry is a major red flag. The document is permanently visible - it cannot be hidden or deleted.

T-Code: FB03 (Display Document) · Tables: BKPF (header) · BSEG (line items)
3
Check the Parking and Approval History - FBV3 / FV60

A properly controlled FI document should first be parked (saved incompletely for approval) before being posted. The auditor checks whether document 1900000445 was ever parked and approved. Table VBKPF stores parked document headers. Result: no parked document exists with matching reference - meaning this ₹1.8 crore journal entry was posted directly using FB01 without any parking or dual approval workflow. This is a second control failure that supports the SEBI query findings.

T-Code: FBV3 (Display Parked Document) · Tables: VBKPF (parked header) · VBSEG (parked items)
4
Check System Log for User Activity - SM20 / SU53

The security team runs the SM20 security audit log to check all activities performed by user SYSADMIN on 31-Oct-2024. SM20 shows every transaction executed, every authorisation check, and every logon/logoff event. Result: SYSADMIN logged in at 23:41, executed FB01 three times (posting ₹1.8Cr, ₹0.9Cr, ₹1.5Cr to account 198000), and logged off at 23:58. Total suspicious posting in 17 minutes: ₹4.2 crore. The SM20 log proves the exact sequence of events and is admissible as digital evidence.

T-Code: SM20 (Security Audit Log) · SM21 (System Log) · SU53 (Auth Check)
5
Reversal of Incorrect Documents - FB08

The CFO decides the three documents must be reversed after SEBI review. The auditor uses FB08 to reverse each document with reversal reason 01 (Reversal in current period). SAP creates three new mirror-image documents - same amounts, opposite signs - permanently clearing the incorrect entries. Both the original document and its reversal remain in BKPF/BSEG forever with clear cross-references. The FI audit trail now shows: original posting by SYSADMIN at 23:47 + reversal authorised by CFO at 09:15 on 05-Nov-2024. The complete story is permanently on record.

T-Code: FB08 (Reverse Document) · Tables: BKPF.STBLG (reversal document) · BKPF.STJAH (reversal year)
FI Audit Trail - Key BKPF Fields Every Auditor Must Know
BKPF FieldDescriptionAudit RelevanceExample
USNAMUser who posted the documentIdentifies the individual responsible - non-repudiationSYSADMIN / RAMESK
CPUDTEntry date (date document was created in system)Detects backdating - compare CPUDT vs BUDAT31.10.2024
CPUTMEntry time (time of system posting)Late-night postings flag suspicious activity23:47:32
TCODETransaction code used to post the documentShows HOW the document was created (FB01, MIGO, VF01)FB01
BLARTDocument type (SA=GL, KR=Vendor inv, DR=Customer inv)Unexpected document types on accounts reveal anomaliesAB (Accounting doc)
STBLGReversal document numberLinks original document to its reversal - complete audit chain1900000448
BKTXTDocument header textVague texts like "adjustment" need investigationMonth-end provision
WAERSCurrencyForeign currency documents require FX rate validationINR / USD

Key FI Audit Principle: In SAP FI, document date (BLDAT), posting date (BUDAT), and entry date (CPUDT) are three different fields. A suspicious pattern is when CPUDT (when it was physically entered) is significantly later than BUDAT (the accounting period). For example: BUDAT = 31-Mar (quarter-end) but CPUDT = 15-Apr - the entry was backdated to the previous quarter. SAP records CPUDT automatically from the system clock - it cannot be manipulated by end users. This makes it the most reliable audit field in the entire FI module.

📦 MM Audit Trail - Tracking Every Material Movement And Master Change

In SAP MM, the audit trail operates on two levels. The first is goods movement history - every goods receipt, goods issue, transfer, and adjustment creates a permanent material document in MKPF/MSEG that can never be modified. The second is master data change history - every change to a vendor master, material master, or purchasing info record is recorded in CDHDR/CDPOS. Together these two layers give supply chain auditors complete visibility into what stock moved, when, and how master data supporting that movement was configured.

Picture the quality and compliance team at Pramod Pharmaceuticals Ltd in Hyderabad. A batch of raw material API-PARA-500 (Paracetamol API) has been recalled by their vendor after a contamination issue was discovered. The compliance team must trace every kilogram of that batch - where it was received, what happened to it in stock, which production batches used it, and whether any finished goods containing it were already dispatched to customers. This is a regulatory batch traceability audit - and SAP provides the complete answer.

SCENARIO 03

Pramod Pharmaceuticals Ltd - Contaminated Batch Regulatory Traceability Audit

1
Locate All GRs for the Recalled Batch - MB56 / MB51

The compliance manager opens MB56 (Batch Where-Used List) and enters batch number B-API-2025-0301 for material API-PARA-500. MB56 reads MSEG filtered by MSEG.CHARG = 'B-API-2025-0301' and traces every goods movement involving this batch. Result: 2 GRs found - 15-Mar-2025 (500 kg received against PO 4500009876, movement 101) and 22-Mar-2025 (200 kg received against PO 4500009901, movement 101). Total received: 700 kg of potentially contaminated API. Both material documents permanently recorded in MKPF (header) and MSEG (items).

T-Code: MB56 (Batch Where-Used) · MB51 (Material Doc List) · Tables: MSEG (filter: CHARG)
2
Trace Batch Through QM Inspection - QA32 / QALS

The compliance team checks whether QM inspected this batch on arrival. QA32 shows inspection lot 1000045 was created on 15-Mar-2025 for batch B-API-2025-0301 (origin 01 - incoming inspection). Usage Decision = ACCEPTED on 17-Mar-2025 by user QA.SURESH. The acceptance allowed the batch into unrestricted stock. Table QALS (inspection lot header: MATNR, CHARG, PRUEFDAT) and QAVE (test results: all parameters passed). The QM audit trail is complete - showing who released the batch and based on what test values.

T-Code: QA32 (Inspection Lot) · Tables: QALS (lot header) · QAVE (results) · QASR (summary)
3
Trace Goods Issues to Production Orders - MB56 / COOIS

MB56 continues tracing: batch B-API-2025-0301 was issued to production orders PO-800345 (18-Mar, 300 kg, mvt 261), PO-800367 (24-Mar, 250 kg, mvt 261), and PO-800389 (28-Mar, 100 kg, mvt 261). Total issued to production: 650 kg. Each GI created a material document in MSEG (BWART = 261). The 50 kg remaining in stock is identified via MMBE (still shows 50 kg in quality batch B-API-2025-0301 in storage location QC-HOLD). The three production orders produced finished good batches FG-20250320, FG-20250326, and FG-20250402 - all must be quarantined.

T-Code: MB56 · COOIS (Prod Order Info) · MMBE (Stock) · Tables: MSEG · AFKO · MKPF
4
Check Customer Deliveries of Affected FG Batches - MB56 / VA05

MB56 extended to finished goods: batch FG-20250320 - 10,000 tablets despatched to hospital customer HOSP-Chennai-07 via delivery 80001234 on 25-Mar-2025. Batch FG-20250326 - 8,000 tablets in warehouse (not yet despatched, can be recalled immediately). Batch FG-20250402 - 12,000 tablets despatched to HOSP-Bengaluru-03 on 05-Apr-2025. Sales delivery documents in LIKP/LIPS with confirmed GI in MKPF/MSEG. Two hospitals must be notified for product recall. The complete forward trace from raw material GR to customer delivery is done in under 30 minutes using SAP audit trail.

T-Code: MB56 (forward trace) · VL03N (Delivery) · Tables: LIKP · LIPS · MSEG · CHVW (batch ledger)
5
Block Remaining Stock and Document the Recall - MMBE / QA11 / MIGO

The compliance manager blocks the remaining 50 kg of batch B-API-2025-0301 using MIGO (movement type 344 - transfer to blocked stock). FG-20250326 (8,000 tablets in warehouse) is blocked using a Quality notification (QM02) setting batch status = BLOCKED in the batch master (table MCH1: ZUSTD = blocked). A formal Q2 vendor complaint notification (QM01) is raised against the API supplier with the recall details, test evidence, and corrective action request. All actions permanently recorded in SAP - complete regulatory dossier ready for FDA/CDSCO inspection within 4 hours of the recall trigger.

T-Code: MIGO (344) · QM01 (Notification) · Tables: MSEG · MCH1 · QMEL · QMMA

Key MM Audit Principle: In SAP MM, the material document (MKPF/MSEG) is the permanent, immutable record of every physical stock movement. It can never be changed or deleted - only reversed with a counter-movement. Table CHVW (Batch Where-Used List) is the master batch traceability table - it links batches across the entire supply chain from GR to customer delivery. For pharmaceutical, food, and chemical companies, the ability to complete a forward and backward batch trace in under 1 hour is a core GMP compliance requirement - and SAP provides this capability out of the box.

👥 HR Infotype Audit Trail - Every Salary Change Tracked

SAP HR has one of the most comprehensive audit trail frameworks in the entire SAP system. Every change to every infotype - salary, personal data, bank account, leave entitlement, organisation assignment - is tracked using the infotype's built-in validity period mechanism (BEGDA/ENDDA) combined with change documents in CDHDR/CDPOS. When a salary is changed, SAP does not overwrite the old record. It creates a brand new PA0008 row for the new salary and sets the ENDDA of the old row to the day before the change - preserving the complete salary history forever.

Consider the payroll audit scenario at Pramod Infrastructure Projects Ltd in Bengaluru. The company's HR compliance officer has received a whistleblower complaint alleging that a payroll administrator made unauthorised salary increases for three employees linked to a supervisor during the last financial year. The HR Director must investigate and provide a complete, irrefutable audit trail of all salary changes in FY2025 and who authorised them - within 24 hours for a board meeting.

SCENARIO 04

Pramod Infrastructure Projects Ltd - Whistleblower Salary Change Investigation

1
Pull Complete Salary History for Employees - PA20 / PA03

The HR compliance officer opens PA20 (Display HR Master Data) for the three employees flagged by the whistleblower - personnel numbers E-10234, E-10289, E-10312. For Infotype 0008 (Basic Pay), all historical records are displayed - SAP shows every single salary change since the employee's hire date, with BEGDA (effective date), ENDDA (end date), BSGRD (pay grade), LGART (wage type), and BETRG (amount). Employee E-10234 shows three salary changes in FY2025 - unusual. Standard practice is one annual revision in April. The two additional changes (July and November) are immediately suspicious.

T-Code: PA20 (Display IT) · PA03 (Display Change Documents) · Tables: PA0008 (all records for PERNR)
2
Identify Who Made the Change - PA03 / CDHDR

PA03 (Display Change Documents for an Employee) shows the complete audit log for a specific personnel number. For PERNR E-10234, Infotype 0008: Change 1 (01-Apr-2025, ₹45,000→₹52,000, user HR.RAMAIAH - legitimate annual increase, approved in PA40 action). Change 2 (15-Jul-2025, ₹52,000→₹63,000, user HR.NAGESWARA - no corresponding PA40 action found, no manager approval workflow triggered). Change 3 (01-Nov-2025, ₹63,000→₹71,000, user HR.NAGESWARA - same user, no approval). CDHDR for OBJECTCLAS = 'PERSDATA', OBJECTID = 'E-10234' confirms same user, same 11:30 PM time pattern for both changes.

T-Code: PA03 (Employee Change Doc) · SE16N on CDHDR (OBJECTCLAS = 'PERSDATA')
3
Cross-Check with Payroll Results - PC_PAYRESULT

To confirm the salary increases were actually paid (not just data-entered but not processed), the compliance officer checks payroll results for periods July–November 2025 using PC_PAYRESULT. Payroll cluster table PCL2 shows wage type M010 (basic pay) with the increased amounts in the July and November payroll runs for E-10234. The unauthorised salary increases of ₹11,000 and ₹8,000 per month were processed and paid - actual financial loss to the company from mid-July to December = ₹19,000 × 5.5 months = ₹1,04,500. This amount is now a quantified audit finding for the board report.

T-Code: PC_PAYRESULT (Payroll Results) · Tables: PCL2 (cluster - not SE16N queryable directly)
4
Check Authorisation - SU53 / SUIM

The security team runs SUIM (User Information System) to check whether HR.NAGESWARA's authorisation profile allowed changes to Infotype 0008 without workflow approval. Result: the user had authorisation object P_ORGINCON with access to Infotype 0008 for all personnel areas - a segregation of duties failure. The user should only have READ access to salary infotypes, not WRITE access without approval workflow. SU53 confirms the exact authorisation objects used during the salary change postings. SAP security remediation: remove P_ORGINCON write access from all payroll data entry users and mandate workflow approval for IT 0008 changes.

T-Code: SU53 (Auth Check Display) · SUIM (User Info System) · AUTH object: P_ORGINCON

Key HR Audit Principle: In SAP HR, the authorisation object P_ORGINCON (HR: Master Data - Organisational Key) controls who can read or write salary data (Infotype 0008). The most important internal control in HR is Segregation of Duties - the person who ENTERS a salary change must be different from the person who APPROVES it. In practice, use a Structural Authorisation Profile (table T77PR) to restrict HR users so they can only maintain data for employees in their own organisational area - never for employees outside their scope or above their own pay grade.

🏦 Vendor Bank Account Change Audit - The One Fraud Risk in SAP

One of the highest-risk audit scenarios in any SAP system is an unauthorised change to a vendor's bank account number. This is a classic payment fraud vector - a fraudster with access to the vendor master (transaction FK02) changes the bank account number of a genuine vendor to a fraudulent account. The next APP (F110) payment run then sends money to the fraudster's account instead of the real vendor. SAP records every such change in CDHDR/CDPOS, and many companies add a Dual Control configuration that requires a second person to confirm any bank account change before it becomes active. This scenario shows how to detect, investigate, and prevent this attack.

This is a real risk pattern at Pramod Ceramics Manufacturing Ltd in Visakhapatnam, which processes over ₹12 crore in vendor payments every month. An internal audit spot-check reveals that vendor V-00456 (Andhra Clay Suppliers) received ₹48 lakh in a payment run on 07-Jun-2025 - but the actual vendor is calling to say they never received it.

SCENARIO 05

Pramod Ceramics Manufacturing Ltd - Vendor Bank Account Fraud Investigation

1
Check Vendor Bank Account Change History - FK03 / CDHDR

The auditor opens FK03 (Display Vendor) for vendor V-00456 and navigates to Payment Transactions tab - the current bank account shows account 9876543210 at a private bank. The original account registered during vendor onboarding was 1234567890 at State Bank. Change Document query: SE16N on CDHDR with OBJECTCLAS = 'KRED' (vendor master), OBJECTID = '0000V-00456'. Result: one change record found, date 04-Jun-2025 at 22:15, user AP.TRAINEE01. CDPOS shows field BANKN (bank account number) changed from 1234567890 to 9876543210. A trainee user changed a vendor bank account at 10 PM three days before a ₹48 lakh payment run - clear fraud pattern.

T-Code: FK03 (Display Vendor) · SE16N on CDHDR (OBJECTCLAS='KRED') + CDPOS (FNAME='BANKN')
2
Trace the Payment Document - F110 / FBL1N

The auditor opens FBL1N for vendor V-00456 and finds payment document 2500008901 dated 07-Jun-2025 for ₹48,02,400. FB03 on this document shows: posted by F110 (automatic payment), bank HDFC, house bank main account, cleared against 4 open invoices. BKPF.USNAM = F110 (system), BKPF.TCODE = F110. The payment run (LAUFD = 07-Jun-2025) details are in table REGUH (payment run header: bank, payment method, amount) and REGUP (payment items: vendor, invoice, clearing document). The bank transfer file was sent to HDFC on 07-Jun - the fraudulent account number was on the NEFT file.

T-Code: FBL1N · FB03 · Tables: BKPF · BSAK · REGUH (run header) · REGUP (run items)
3
Investigate AP.TRAINEE01 - SM20 / SUIM

SM20 Security Audit Log for user AP.TRAINEE01 on 04-Jun-2025: logged in at 22:08, executed FK02 at 22:14, changed bank account of V-00456 at 22:15, logged off at 22:19. No other activity. The user's access log shows this was their first ever FK02 execution - they had never accessed FK02 before. SUIM shows AP.TRAINEE01 was assigned authorisation profile SAP_ALL (full system access) - a catastrophic access control failure. A trainee with SAP_ALL can change any master data in the entire system without restriction or oversight.

T-Code: SM20 (Security Log) · SUIM (User Auth Report) · Tables: USR02 · AGR_USERS · UST04
4
Implement Dual Control for Vendor Bank Changes - SPRO

Post-incident, the SAP security team configures Dual Control for Vendor Master via SPRO → FI → AP → Vendor Accounts → Master Data → Define Sensitive Fields for Dual Control. Field BANKN (bank account) and BANKL (bank key) are added as sensitive fields. Now, when any user changes the bank account of a vendor in FK02, the record is saved in a pending/unconfirmed state - the change does NOT become active until a second authorised user confirms it in FK08 (Confirm Vendor Changes). Table VBKNA stores the pending change. This single configuration change would have prevented the entire fraud.

T-Code: SPRO (Dual Control Config) · FK08 (Confirm Changes) · Tables: VBKNA (pending vendor changes)

Key Vendor Fraud Prevention: SAP's Dual Control for Vendor Master (activated via SPRO → FI → AP → Define Sensitive Fields) is the single most important anti-fraud control in any SAP FI implementation. Once activated, any change to a sensitive field (bank account, IBAN, SWIFT code) creates a pending record in VBKNA that must be confirmed by a second user in FK08. A report on pending vendor changes (S_ALR_87012086) should be checked daily by the treasury team. Combined with the CDHDR/CDPOS audit trail, this configuration makes vendor payment fraud detectable and preventable in real time.

🔬 QM Electronic Signature Audit Trail - FDA 21 CFR Part 11

For pharmaceutical, biotechnology, and medical device companies operating under FDA regulations, the quality management audit trail must meet the requirements of 21 CFR Part 11 (Electronic Records and Electronic Signatures). This regulation requires that any action affecting product quality - entering a test result, making a usage decision, approving a batch - must be authenticated with an electronic signature that is attributable, legible, and contemporaneous. SAP QM's Digital Signature framework meets these requirements by requiring users to authenticate (enter their user ID and password) before any QM action is saved, and recording the authentication in a tamper-proof log.

At Pramod Biotech Research Ltd in Hyderabad, an FDA pre-approval inspection is scheduled for their facility. The FDA investigator requests a demonstration that the electronic batch record for Batch QA-INSULIN-2025-0412 complies with 21 CFR Part 11. The QA manager must produce a complete, unbroken audit trail for every quality action taken on this batch - from raw material testing to finished product release.

SCENARIO 06

Pramod Biotech Research Ltd - FDA Pre-Approval Electronic Batch Record Audit

1
Raw Material QM Inspection with E-Signature - QA32

Inspection Lot IL-2025-0401 for API batch B-API-0401 arrives. QA analyst Dr. Priya Nair opens QA32 to record results. For each characteristic (Assay 99.3%, Moisture 0.08%, Heavy Metals ND, Microbial Count within spec), Dr. Priya enters the measured values. On saving the results, SAP displays the Digital Signature dialog: "Please authenticate - User ID: [priya.nair] Password: [****] Reason: [Results entered from laboratory notebook LNB-2025-041 page 34]." The signature is saved in the DRAD (digital signature log) table with timestamp 09:23:14, user priya.nair, transaction QA32, and the reason text. This meets 21 CFR Part 11 Section 11.50 (signature manifestation).

T-Code: QA32 (Results Recording) · Tables: QALS · QAVE · DRAD (digital signature log)
2
Usage Decision with Dual Signature - QA11

After reviewing all results, QA Supervisor Mr. Arjun Mehta makes the Usage Decision in QA11 for IL-2025-0401: UD Code A (Accept). SAP requires a second digital signature here since the Usage Decision is a GMP-critical action configured for dual-role authentication. Signature 1: arjun.mehta enters password + reason "All results within specification, batch released for production." Signature 2: QA Manager dr.sridhar also authenticates: "Reviewed and independently verified - Release approved." Both signatures recorded in DRAD with timestamps. The batch moves to unrestricted stock via movement 321. The UD cannot be changed once signed - only reversed with a new, separately signed UD.

T-Code: QA11 (Usage Decision) · Tables: QALS (UD field QKENNZ) · DRAD (dual sig log)
3
In-Process Inspection Points with Timestamp Trail - QA32

During tablet compression, 16 inspection points are recorded every 30 minutes (weight, hardness, disintegration, friability). Each inspection point save in QA32 requires a digital signature from the production analyst present at the machine. Each of the 16 signatures is logged in DRAD: user ID, exact time, machine ID in reason text, and the measured values in QAVE. The FDA investigator can see that every 30-minute measurement was signed by a physically present analyst - there are no retroactive entries (CPUDT = actual measurement time, not hours later). This demonstrates real-time data integrity under 21 CFR Part 11 Section 11.10(e) (audit trail for GMP records).

T-Code: QA32 (Inspection Points) · Tables: QAVE (results) · DRAD (16 individual signatures)
4
Batch Record Report for FDA - QGA4 / Custom

The QA manager generates the complete Electronic Batch Record for Batch QA-INSULIN-2025-0412 using custom batch record report QGA4 (or a smartform built on QALS + QAVE + DRAD + MKPF). The report shows: all incoming material QM results with analyst signatures, all in-process inspection point data with operator signatures, finished product release results with QA manager dual signatures, batch disposition (UD = Accept, released 22-Apr-2025 14:45), and equipment calibration status at time of manufacture. The FDA investigator reviews the 47-page electronic batch record - all entries are time-stamped, user-attributed, and unchangeable. Zero observations on data integrity. Facility approved.

T-Code: QGA4 (Batch Record) · Tables: QALS · QAVE · DRAD · MCH1 · MSEG

21 CFR Part 11 SAP Configuration Checklist: (1) Activate Digital Signature in SPRO → QM → Quality Inspection → Digital Signature. (2) Assign signature strategies to QM transactions (QA11, QA32, QF01). (3) Configure dual-role signatures for UD and final release. (4) Activate SM20 Security Audit Log with event classes DL (Dialog Logon) and AU (User Change). (5) Disable back-dating of QM documents. (6) Test the signature log (DRAD) is populated and cannot be deleted via any standard transaction. (7) Document all configurations in the GxP System Validation dossier. These 7 steps make SAP QM compliant with 21 CFR Part 11 and GMP Annex 11.

💻 ABAP Code - Querying the SAP Audit Trail Programmatically

Every SAP consultant and developer should know how to query the CDHDR/CDPOS tables using ABAP to extract audit trail data for any object. The code below shows the standard pattern for pulling all field-level changes to purchase orders in a given period - the exact same logic used in thousands of SAP compliance reports worldwide.

ABAP - Query CDHDR + CDPOS for PO Change Audit
"═══════════════════════════════════════════════════════════
" SAP Audit Trail - Purchase Order Change Document Extractor
" Object Class : EINKBELEG (Purchasing Documents)
" Tables used  : CDHDR (Change Doc Header) + CDPOS (Field Detail)
"═══════════════════════════════════════════════════════════

REPORT z_po_audit_trail.

"──── Selection screen ────────────────────────────────────
SELECT-OPTIONS: s_date  FOR sy-datum DEFAULT sy-datum,
                s_uname FOR sy-uname,
                s_ebeln FOR ekpo-ebeln.

"──── Data declarations ───────────────────────────────────
TYPES: BEGIN OF ty_result,
  changenr  TYPE cdhdr-changenr,
  objectid  TYPE cdhdr-objectid,
  udate     TYPE cdhdr-udate,
  utime     TYPE cdhdr-utime,
  username  TYPE cdhdr-username,
  tabname   TYPE cdpos-tabname,
  fname     TYPE cdpos-fname,
  value_old TYPE cdpos-value_old,
  value_new TYPE cdpos-value_new,
END OF ty_result.

DATA: lt_result TYPE TABLE OF ty_result.

"──── Read change documents (CDHDR → CDPOS join) ──────────
SELECT
  h~changenr  h~objectid  h~udate  h~utime  h~username
  p~tabname   p~fname     p~value_old  p~value_new
  INTO TABLE @lt_result
  FROM cdhdr AS h
  INNER JOIN cdpos AS p ON p~changenr = h~changenr
  WHERE h~objectclas = 'EINKBELEG'           "PO / SA / Contract
    AND h~udate       IN s_date              "Date range
    AND h~username    IN s_uname             "User filter
    AND h~objectid    IN s_ebeln             "PO number filter
    AND p~chngind     = 'U'.                  "U=Update, I=Insert, D=Delete

"──── Sort and output ─────────────────────────────────────
SORT lt_result BY objectid udate utime.

LOOP AT lt_result INTO DATA(ls).
  WRITE: / ls-objectid, ls-udate, ls-utime,
           ls-username, ls-tabname, ls-fname,
           ls-value_old, '→', ls-value_new.
ENDLOOP.
CDHDR.OBJECTCLAS Values - Key Object Classes for Audit Queries
OBJECTCLAS ValueSAP ObjectModuleCommon Audit Use
EINKBELEGPurchasing document (PO, contract, SA)MMPO price / quantity changes after approval
KREDVendor masterMM / FIBank account, payment terms, address changes
MATERIALMaterial masterMMPrice control, MRP type, valuation class changes
DEBITORCustomer masterSD / FICredit limit, payment terms, bank changes
AUFKProduction / PM / internal ordersPP / PM / COQuantity, dates, cost centre assignment changes
PROJProject definitionPSProject dates, responsible person changes
PSPHIWBS elementsPSWBS budget, responsible, account assignment changes
PERSDATAHR personnel data (infotypes)HRSalary, bank account, leave entitlement changes
LSMW_OBJECTData migration objectsABAPAudit mass data loads via LSMW
KAUFBELEGSales documents (SO, quotation)SDPrice, quantity, delivery date changes after creation
💡

ABAP Performance Tip: CDHDR and CDPOS are among the largest tables in any SAP production system - CDHDR can have hundreds of millions of rows in a mature system. Always filter CDHDR first with OBJECTCLAS (indexed field) before joining to CDPOS. Never start a query on CDPOS directly - it has no efficient index on FNAME alone. The correct pattern is: SELECT from CDHDR WHERE OBJECTCLAS = 'xxx' AND UDATE IN range → collect CHANGENR values → SELECT from CDPOS WHERE CHANGENR IN collected list. This reduces runtime from hours to seconds.

📋 SAP Audit Trail - Complete Module Reference

Use this table as your definitive reference for every audit trail mechanism across all SAP modules - which tables to query, which T-codes to use, and what each trail proves to an auditor.

SAP Audit Trail - All Modules Quick Reference
Module Audit Trail Type Key Tables T-Code to View What It Proves
ALLMaster Data ChangesCDHDR + CDPOSSE16N / PA03 / ME23N → ChangesWho changed which field, when, from what value to what value
FIFI Document TrailBKPF + BSEGFB03 / FBL3N / FBL1NImmutable record of every financial posting - user, time, T-code
FIParked Document HistoryVBKPF + VBSEGFBV3 / FV60What was saved before final posting - approval workflow state
FIPayment Run AuditREGUH + REGUPF110 Display / PAYRWhich invoices were selected, which bank account paid, run parameters
FI-AAAsset Change HistoryANLA + ANLZ + ANEPAW01N / S_ALR_87011963Asset acquisition, retirement, transfer, depreciation history
MMGoods Movement HistoryMKPF + MSEGMB51 / MB56Every kg / unit of material moved - mvt type, batch, user, date
MMPO Change HistoryCDHDR + CDPOS (EINKBELEG)ME23N → Environment → ChangesPrice, quantity, delivery date changes after PO approval
MMVendor Master ChangesCDHDR + CDPOS (KRED)FK03 → Display ChangesBank account, IBAN, payment terms, address modifications
MMBatch TraceabilityCHVW + MSEGMB56 / MCHBForward and backward trace of every batch through supply chain
SDSales Document FlowVBFA + VBAK + VBRKVA03 → Document FlowComplete chain from quotation to SO to delivery to billing to payment
SDPricing Condition ChangesKONV + CDHDRV/LD / ME23NManual price overrides, discount additions after order creation
HRInfotype HistoryPA000x (all records per PERNR)PA03 / PA20Every salary, bank, position, and leave change with effective dates
HRHR Change DocumentsCDHDR (PERSDATA)PA03 → Change DocumentsUser and timestamp for every infotype modification
QMDigital Signature LogDRADQA32 / QA11 → Signature Log21 CFR Part 11 / GMP Annex 11 - who signed what, when, with what reason
QMInspection Results HistoryQALS + QAVE + QASRMCXC / QA32Complete test history per batch, characteristic, and time period
PSProject / WBS ChangesCDHDR (PROJ / PSPHI)CJ20N → Change DocumentsBudget increases, date changes, responsible person modifications
SYSUser Access LogSM20 / STADSM20 / SUIM / SM21Every logon, T-code executed, authorisation failure - all users
SYSTransport ChangesE07T + E071SE10 / STMSConfiguration changes promoted to production - who approved, when
SAP Audit Trail - Scenario Interview Questions
Audit Scenario QuestionKey SAP ApproachTables / T-Codes
A vendor invoice was paid twice. How do you investigate?Check BSAK for duplicate clearing docs. Check REGUP for payment run. Identify the FI document and reversal history in BKPF.FBL1N · BSAK · REGUP · FB03
A PO price was changed after GR but before invoice. Who changed it and when?Query CDHDR (OBJECTCLAS=EINKBELEG) + CDPOS (FNAME=NETPR) for the PO number. Compare UDATE vs GR date from MKPF.SE16N on CDHDR + CDPOS · ME23N Changes
An employee claims their salary was reduced without approval. How do you prove it?Display all PA0008 records for the PERNR - history shows old and new values. PA03 shows which user made the change and when.PA20 · PA03 · CDHDR (PERSDATA)
How do you prove a material document cannot be modified after posting?Open any MSEG record in SE16N - try to modify it (system blocks). Show that only a counter-movement (reversal) via MIGO creates a new document - original remains intact.SE16N on MSEG · MB51 · MIGO (102 reversal)
An external auditor wants proof that no config was changed in production without approval.All production config changes require a transport request (SE10). The STMS log shows every transport released, approved by whom, and imported when.SE10 · STMS · E07T · E071

📘 Related SAP Tutorials

SAP ABAP

SAP All Tables List

Complete reference to 100+ SAP database tables across all modules with key fields, descriptions and primary keys.

Read Tutorial
SAP Real Scenarios

SAP Real Business Scenarios

End-to-end SAP business process walkthroughs - P2P, O2C, R2R, H2R, Plan-to-Produce and more with full T-codes.

Read Tutorial
SAP FICO

SAP FICO Interview Questions

Top 50 advanced SAP FICO interview questions with real examples covering GL, AP, AR, Asset Accounting and CO.

Read Tutorial