Back to blog
    KVKK
    8 min readJune 02, 2026

    A Guide to KVKK Compliance in SAP Systems

    Key actions within SAP for data masking, authorization management, retention periods, and handling deletion requests.

    A Guide to KVKK Compliance in SAP Systems – KVKK | Smartia

    Compliance with data protection legislation is not just about a checkbox or a privacy policy on your website. Especially when it comes to enterprise resource planning (ERP) systems, compliance begins and ends in the deepest technical layers. Systems like SAP, where companies' most valuable data—customer, employee, and supplier information—is stored, form the most critical fortress for the Law on the Protection of Personal Data (KVKK). Therefore, ensuring KVKK compliance in SAP systems requires continuous governance and a proactive strategy rather than a reactive task.

    Why Are ERP Systems at the Heart of KVKK Compliance?

    For many organizations, SAP is the digital backbone of their operations. All business processes, from finance to human resources, from sales to production, are managed through this central system. This naturally makes SAP the company's largest and most sensitive repository of personal data. A significant portion of the data protected under KVKK is found in these systems:

    • Employee Data (HCM Module): Information such as national ID numbers, addresses, phone numbers, bank account details (IBAN), salary details, performance reviews, and even sensitive personal data like health reports or union memberships are stored in the Human Resources module.
    • Customer Data (SD/CRM Modules): Data belonging to sole proprietorship customers or the officials of legal entity customers, such as names, surnames, contact information, tax numbers, and delivery addresses, are located in the Sales and Distribution or Customer Relationship Management modules.
    • Supplier Data (MM Module): Contact information, bank account details, and other personal information of sole proprietorship suppliers or business partners are kept in the Material Management module.

    This centralized structure makes SAP systems an attractive target for data breaches. The damage from a leaked email list from a web server is incomparable to the financial and reputational loss that would result from a leak of thousands of employees' salary and identity information from SAP. Therefore, it is an unavoidable necessity for institutions acting as Data Controllers to begin their KVKK compliance efforts with their SAP systems.

    Step 1: Comprehensive Data Discovery and Inventory

    The first and most fundamental step of KVKK compliance is knowing what personal data you store and where you store it. Any other steps taken without a clear answer to the question, "Which table holds which personal data?" will be ineffective. This process must cover not only standard SAP tables but also custom "Z-coded" tables and programs developed specifically for the company.

    At this stage, SAP Information Lifecycle Management (ILM) plays a critical role. ILM is not just an archiving tool, but a powerful governance platform with the ability to classify data objects, define retention periods, and create automation rules based on these periods.

    Some key tables to focus on when creating a data inventory include:

    ModuleSample TablesType of Personal Data Contained
    FIKNA1, LFA1Customer and Supplier Master Data, Addresses
    HCMPA0001, PA0002Personnel Organizational and Personal Information
    SDVBAK, VBAPSales Documents (Contain Customer Information)
    MMEKKO, EKPOPurchase Documents (Supplier Information)

    This inventory should be created in collaboration with legal and functional teams and should clarify the legal basis (contract, legal obligation, legitimate interest, explicit consent, etc.) for processing each piece of data. This classification will form the foundation for the subsequent steps of retention and deletion policies.

    Step 2: Access Control and Authorization Management

    After discovering the personal data, the next most important step is to control who can access this data, for what purpose, and to what extent. The principle of "purpose limitation" in KVKK corresponds to the "Least Privilege" Principle in SAP terminology. A user's role should contain the minimum authorizations required to perform their job, and no more.

    In SAP, authorization management revolves around the following key transaction codes (T-Codes):

    • PFCG (Role Maintenance): Used to create and edit the roles that bundle user authorizations. In a KVKK-compliant structure, granular and task-specific roles like "only enters invoices" or "only displays payment lists" should be designed instead of broad roles like "performs all FI transactions."
    • SU01 (User Maintenance): Used to manage user accounts and assign them the roles created with PFCG.
    • SU24 (Authorization Object Defaults): Manages the default values for authorization objects associated with a transaction (T-Code). This ensures that roles are created more consistently and securely.

    Furthermore, the Segregation of Duties (SoD) principle is also critical. For example, a user who creates supplier master data should not have the authorization to make payments to that supplier. Controls that prevent such conflicts of interest play a vital role in preventing fraud and data leaks.

    Another point to remember is the logging of access. With tools like SM19 (Audit Profile Configuration) and SM20 (Audit Log Analysis), access to critical tables (e.g., PA0002 - personal employee data) or transactions should be monitored and regularly audited.

    Step 3: Securing Test Environments with Data Masking

    One of the most frequently overlooked areas in KVKK compliance is non-production environments. Development (DEV), quality assurance (QAS), and training systems are often populated with data copied from the production (PRD) system. This results in sensitive customer and employee data being exposed to a wide audience—such as developers, consultants, and test users—in these environments where access controls may be weaker.

    To manage this risk, SAP offers powerful data masking solutions:

    1. SAP UI Masking: This solution allows for masking data "on-screen" even in the production environment. For example, a call center operator might see a customer's national ID number as 123*****890, while an accounting manager with full authorization for this data can see the complete data in the same field. This is effective for applying the "need-to-know" principle in the production environment.

    2. SAP Test Data Migration Server (TDMS): This is a much more comprehensive solution designed for non-production systems. TDMS automatically anonymizes or masks personal data while copying it from production. For example, it can replace all names with meaningless characters (AAAAA BBBBB), phone numbers with random digits (555-123-4567), or IBAN numbers with invalid formats. This allows test teams to work with realistic but fake data, ensuring complete data security.

    These tools provide 360-degree protection by extending the data breach risk mitigation beyond just the production environment to the entire SAP lifecycle.

    Step 4: Automating Retention, Archiving, and Deletion Processes

    KVKK grants data subjects the "right to be forgotten." However, this right can conflict with legal retention periods arising from other laws. For example, when a customer no longer wants to do business with you and requests the deletion of all their data, you may be legally required by the Turkish Commercial Code or Tax Procedure Law to retain that customer's invoice information for 6 to 10 years.

    This is where SAP ILM comes in to manage this complex process. ILM uses a rule-based engine to automate the data lifecycle:

    • Rule Definition: Retention periods for each data object (e.g., customer master data, sales order) are defined in ILM. These rules can take into account multiple legal requirements (e.g., "10 years for TCC, 6 years for TPL") and automatically apply the longest period.
    • Blocking and Archiving: When data is no longer actively needed for business processes but its legal retention period has not yet expired, it can be "blocked" by ILM. This prevents the data from being used in new business processes. The data is then moved to a lower-cost storage unit (archive) but remains accessible for reporting and auditing.
    • Destruction (Deletion): Once all defined legal retention periods have expired, ILM triggers the permanent and irreversible deletion of the data from the system. This process is logged, and proof of destruction is created.

    This automation makes it possible to both manage "right to be forgotten" requests (by blocking the data) and fulfill legal retention obligations (by preventing deletion before the period expires). It eliminates the risks and workload associated with manual processes.

    Practical Implementation Checklist

    1. Identify Data Controllers: Form a KVKK compliance committee consisting of representatives from Legal, IT, and relevant business units (HR, Finance, Sales).
    2. Conduct a Data Discovery Workshop: Work with SAP functional consultants to identify which tables and fields contain personal data and create an inventory (Data Matrix).
    3. Initiate ILM Configuration: Activate basic objects like ILM_NOTIFICATION. Define data retention and destruction rules in the system with the approval of the legal department.
    4. Review Authorization Roles: Analyze existing roles in PFCG according to the "least privilege" principle. Create a Segregation of Duties (SoD) matrix for critical authorization objects.
    5. Develop a Test Data Management Strategy: Prepare a project plan to anonymize the data flowing into your non-production systems using TDMS or a similar tool.
    6. Activate Audit Logs: Configure audit profiles via SM19 to monitor access to sensitive data and define a process for periodically reviewing SM20 logs.
    7. Design Your "Right to be Forgotten" Process: Clearly document the steps to be followed when a deletion request is received from a data subject (e.g., blocking in ILM, tracking the legal period, and subsequent destruction).

    Common Mistakes and Pitfalls to Avoid

    • Seeing Compliance as Solely a Technical Task: Setting up ILM or narrowing roles is not enough. KVKK is a governance issue that requires the combined management of technology, processes, and people.
    • Uncontrolled Use of SAP_ALL and SAP_NEW Profiles: Leaving these superuser profiles, often granted temporarily for emergencies or consultant access, active is one of the biggest security vulnerabilities.
    • Neglecting Test and Development Environments: A significant number of data breaches originate from poorly protected non-production systems. Failing to secure these systems is like locking the door but leaving the window open.
    • Overlooking Custom Developments ("Z-coded" Programs): Focusing only on standard SAP tables and failing to include custom tables and reports developed for internal needs that hold personal data in the inventory means incomplete compliance.

    Conclusion

    Ensuring KVKK compliance in SAP systems is not a one-time project but a living program that requires continuous improvement. Every step, from creating a data inventory to managing authorizations, from masking test data to automating retention and deletion policies, is part of a whole. Technological tools like SAP ILM, TDMS, and UI Masking are powerful allies in this process; however, ultimate success comes from combining these tools with a sound strategy, clear processes, and a supportive corporate culture. With a proactive, disciplined, and holistic approach, you can transform your SAP systems from a source of risk into a secure digital fortress.