🔥 EARLY BIRD SPECIAL:Save 10% on all SAP Online Courses! (Limited Slots)

Migrate Legacy MM-SRV to Lean Services in SAP S/4HANA

E
ERPVITS Team
Author
2026-09-02
8 min read
Migrate Legacy MM-SRV to Lean Services in SAP S/4HANA

Migrating Legacy MM-SRV to Lean Services in SAP S/4HANA: Technical Guide & Best Practices

SAP S/4HANA replaces classic MM-SRV with Lean Services to align service procurement with material procurement within an unifying data model. The main technical mechanism is based upon Product Type Code SERV within the unifying material Master ( MARA) which replaces complex multi-tier hierarchies for service hierarchy with simple line-item purchases that post commitments and reals directly to ACDOCA and MATDOC. Enterprise service migration is executed via standard report RMMSRV_SRVMSTR_MIG_TO_S4, mapping legacy Service Master numbers (ASNUM) directly into S/4HANA Material Masters.

Architecture & Data Model Comparison: MM-SRV vs. Lean Services

The shift from the MM-SRV model into Lean Services in SAP S/4HANA is a major change from a heavily multi-table, nested hierarchy to an uncluttered high-performance model of data that is that is integrated with Universal Journal. Universal Journal.

Legacy MM-SRV Architecture: [Purchase Order (EKKO/EKPO)] --> [Service Package (ESLL)] --> [Service Entry Sheet (ESSR/ESLL)]
S/4HANA Lean Services Architecture: [Purchase Order (EKKO/EKPO)] --> [Fiori SES (F1367/EKKO/EKPO)] --> [Universal Journal (ACDOCA/MATDOC)]

Legacy MM-SRV is based on service packages that are stored in nesting tables ( ESLL for line items, ESSR for header information). Each item of a purchase order ( EKPO) is a header that connects towards a set of service lines within ESLL. This nesting can result in memory overruns which makes reporting more difficult via CDS Views, and creates distinct business processes for service acquisition as opposed to physically procuring material.

Lean Services eliminates the nested model of packages ( ESLL/ ESSR). Planned as well as unplanned service are described as regular item inside EKPO with Specific Products Type Codes ( SERV for Planned Services, 2 for Unplanned/Limit Services). Actual postings and financial commitments bypass buffer tables that were previously used for producing real-time material documents for financial journal entries in the format MATDOC as well as financial journal entry entries within ACDOCA.

Parameter Legacy MM-SRV (ECC / S/4HANA Legacy) S/4HANA Lean Services
Data Structure & Storage Hierarchical service packages that are stored over an ESLL (Service Lines) and ESSR (Service Header). Flat line-item structure that is integrated into the standard purchasing tables (EKPO EBAN). Document logs can be written straight to MATDOC as well as ACDOCA.
Master Data Object dedicated Service master ( ASNUM) was created through AC03. Standard Product Master (MATNR) controlled by MM01, MM02 and Fiori App F1602 that uses the Product Type Code SERV that is that is stored in MARA.
Service Entry & Approval classic GUI transactions The ML81N (Entry/Release) along with M85 (Collective release). Fiori-native applications for managing Sheets of Service Entries (F1367) and approve Service Entry Sheets (F2027).
Financial Integration Direct financial posting through acceptance of service entries; generates lines of GR/IR through the secondary assessment of the package. Direct posting in real-time directly to The Universal Journal (ACDOCA). Integration natively with Asset Accounting, WBS elements as well as Cost Centers at the line-item level.
Purchasing Document Item Category Categories of Items D (Service) with service lines that are nested. The Item Category is Standard (Blank) or the Enhanced Limit (E) when paired with the Product Code Type (Serv (1) or 2.
Limits & Unplanned Services Processed through the complex "Limits" tab in ME21N by utilizing global limit values as well as expected value. Managed via Item Category E (Enhanced Limit) with the global limits and anticipated value at the line-item level.

Technical Data Model Shift: Field & Table Mapping

Understanding the change in the storage of data is crucial to customizing reports, report repair and interface design and migration of analytics.

Legacy Data Flow: MARA (Not Used) ASNUM (Service Master: AC03) --> ESLL (Lines) + ESSR (Header) --> BSEG / MSEG
S/4HANA Data Flow: MARA-MATNR (Product Master: MM01) [Product Type: SERV] | +--> EKPO (PO Line Item) [Product Type Code: 1/2] +--> MATDOC (Material Document) +--> ACDOCA (Universal Journal)

Table Level Changes

ESSR and ESLL (Deprecation) in Lean Services, ESSR and ESLL are omitted. Purchase details are natively stored inside EKPO along with EBAN. Service Entry Sheets generated by Fiori create items and header records that are stored in EKKO or EKPO (with the category A) or directly to the standard receipt tables.

MatDOC (Inventory and Service Receipts): Service entry acceptance now writes a document record directly into MatDOC (with the Movement Typ 101) and creates an operational log that is unifying.

ACDOCA (Universal Journal Integration): Service acceptance results in instant financial postings to ACDOCA. Steps in the service valuation process that require to read an ESLL price conditions have been replaced with straight calls to the standard purchase tables ( KONV / PRCD_ELEMENTS).

Field Mapping Rules

Master Data Master Data (Service Number) MARA-MATNR (Material/Product Number, where MARA-MTART is SERV or a specific client equivalent).

Item Classification: EKPO-PSTYP = D (Legacy Service) - EKPO-PSTYP = (Standard) or E (Enhanced Limit).

Product Type Indication: EKPO-PRODUCT_TYPE = 1 (Service Material) or 2 (Service Limit Item).

Step-by-Step Technical Migration: Executing Report RMMSRV_SRVMSTR_MIG_TO_S4

SAP provides the standard conversion report RMMSRV_SRVMSTR_MIG_TO_S4 to convert legacy Service Masters (ASNUM) created in AC03 into standard S/4HANA Material Masters (MARA) with Product Type SERV.

Migration Execution Workflow: [Phase 1: Readiness & Customizing] --> [Phase 2: Data Cleansing] --> [Phase 3: Dry-Run Execution] --> [Phase 4: Cutover Execution] --> [Phase 5: Post-Validation]

Phase 1: Prerequisites & Customizing Setup

Before you can run the report in your sandbox cutover or development environment, follow these requirements:

Configure Material Type SERV:

  • Navigate to IMG: Logistics - General -> Material Master -> Basic Settings -> Material Types -> Define Attributes of Material Types.
  • Verify that the that the Material Type ensure that the SERV (Service) Make sure that Material Type Server (Service) running. Check that Quantity Updates is disabled as well. Valuation Updating are turned off across all the Valuation Areas of interest (Services are not stocked with physical inventory).

Define Number Ranges for Service Products:

  • Transaction MMNR: Dedicate a number range to the Material Type SERV. If you want to maintain 1:1 mapping to service numbers from the past be sure that the number range is compatible with external numbering ( EXT = X) or is in line with the scope of your previous ASNUM numbers range's area.

Configure Purchasing Item Categories & Product Types:

  • Navigate to IMG: Materials Management -> Purchasing -> Contract / Purchase Order -> Define Item Categories.
  • Make sure that you are in the category A (Enhanced Limit) is set to allow the purchase of services using limit handling.

Implement SAP Notes:

  • Ensure the following base SAP Notes are applied in your system: 2790514 (Lean Services in S/4HANA), 2941981 (Migration Tool for Service Master to Product Master), and 3118941 (Fixes for RMMSRV_SRVMSTR_MIG_TO_S4).

Phase 2: Data Cleansing & Selection Rules

Remove the data of a legacy service master in Table ASMD ( AC03) to determine active service numbers vs. old service numbers.

  • Execute transaction SE16N on the table ASMD.
  • Filter out services that are flagged to be deleted ( ASMD-LVORM = 'X').
  • Group services according to the Service Category ( ASMD-ASKOT) to link old categories to S/4HANA material groupings ( MARA-MATKL) and Valuation Classes ( MBEW-BKLAS).

Phase 3: Technical Execution of RMMSRV_SRVMSTR_MIG_TO_S4

Test the conversion mode before you commit the changes to your database.

Execution Parameters (Transaction SE38 / SA38)

Report Name: RMMSRV_SRVMSTR_MIG_TO_S4

Selection Criteria:

  • Service Number: Range of ASNUM (e.g., 1000000 to 1999999).
  • Target Material Type: SERV.
  • Target Plant: Input key operational plants in which buying views need to be made.
  • The Target Value Area Define target value areas to allow automatic account determination ( OBYC).
================================================================================
REPORT: RMMSRV_SRVMSTR_MIG_TO_S4 (Service Master to Product Master Conversion)
================================================================================
[X] Test Run (Simulation)
[ ] Production Run (Database Commit)

SELECTION PARAMETERS:
Service Number (ASNUM): 10000000 TO 10099999
Service Category: SERV_MAINT
Target Material Type: SERV
Target Industry Sector: M (Mechanical Engineering)

MAPPING DEFINITIONS:
Keep Legacy Service Number: [X] Yes (External Number Assignment)
Target Valuation Class: 3200 (Services)
Target Material Group: 008 (Maintenance Services)
Base Unit of Measure Mapping: HUR -> HUR | JOB -> JOB | AU -> AU

LOG OUTPUT SELECTION:
[X] Display Detailed Error Log
[X] Show Material Master Mapping Table Preview
================================================================================

Step-by-Step Execution Sequence

Perform Test Run The report is run by selecting an test run checkbox checked.

analyze log output The report looks for:

  • Number range conflicts exist between the old ASNUM and MARA table. MARA.
  • Incorrect Unit of Measure (UoM) conversions (e.g. mapping of old or HUR as well as JOB to ISO standard codes).
  • Lacking G/L account mapping dependencies missing dependencies on G/L account mapping OBYC (specifically value key WRX and transaction key BSXor GBB).

Perform Database Update Remove the checkmark the Test Run box and run with background access ( JOB_OPEN, JOB_SUBMIT) for databases that exceed 50k records.

Phase 4: Post-Migration Technical Validation Checks

When the background task is complete Verify data consistency by with the following SQL/SE16N queries:

1. Material Master Creation Verification

Verify that the converted records are on MARA that match the Material Type.

SELECT MATNR, MTART, MATKL, MEINS, MSTAE
FROM MARA
WHERE MTART = 'SERV'
AND MATNR IN (SELECT ASNUM FROM ASMD WHERE LVORM = '');

2. Plant & Valuation Data Verification

Verify the plant-level information ( MARC) and valuation details ( MBEW):

SELECT MATNR, BWKEY, BKLAS, VPRSV, VERPR, STPRS
FROM MBEW
WHERE MATNR IN (SELECT MATNR FROM MARA WHERE MTART = 'SERV');

Validation Criteria for Validation: BKLAS should point to your class of service (e.g. 3200, 5000) and price control VPRSV must be equal to the value of V (Moving Average) or S (Standard Price) in accordance with accounting standards.

3. Update Custom Mapping Tables

If you are running a phased migration that has the open POs remain in the legacy MM-SRV while the new POs utilize Lean Services, store mapping pairs ( ASNUM - MATNR) in an individual Z-table ( ZMM_SRV_MIG_MAP) to look up historical reports:

INSERT INTO ZMM_SRV_MIG_MAP (LEGACY_ASNUM, NEW_MATNR, MIG_DATE, MIG_USER)
SELECT ASNUM, MATNR, SY-DATUM, SY-UNAME
FROM MARA
WHERE MTART = 'SERV';

Fiori User Experience Transformation

S/4HANA is a step in the right direction to move the users of procurement away from traditional GUI transaction ( ME21N, ML81N) towards specific SAP Fiori apps.

Procurement Interface Evolution:
Legacy SAP GUI --> Modern S/4HANA Fiori
ME21N: Create Purchase Order --> F0842A: Manage Purchase Orders
ML81N: Service Entry Sheet --> F1367: Manage Service Entry S.
ML85: Collective SES Release --> F2027: Approve Service Entry S.

Procurement App Mapping & Functional Shift

1. Purchase Order Creation & Maintenance

  • Legacy GUI T-Codes: ME21N / ME22N / ME23N
  • Fiori App Name: Manage Purchase Orders
  • Fiori App ID: F0842A

Operational Shift Users are no longer able to select Item category D and then navigate to the lower "Services" tab. Instead they type in their Lean Service material number (Product Type SERV) directly on the main overview of the item. To limit service usage that is not planned Users can choose Item Category A (Enhanced Limit) and set the overall values from the main screen.

2. Service Entry Sheet Processing

  • Legacy GUI T-Codes: ML81N (Entry) / ML85 (Release)
  • Fiori App Name: Manage Service Entry Sheets
  • Fiori App ID: F1367

Operational Shift replaces the traditional hierarchical tree structure found in the ML81N. Buyers and contractors search for open line items in the PO and enter the quantities that have been used or values, add digital proof of work documents and then submit the information to be approved.

3. Service Entry Approval Workflow

  • Legacy GUI T-Codes: ML85 / ME28
  • Fiori App Name: Approve Service Entry Sheets
  • Fiori App ID: F2027

Operational Shift It integrates seamlessly to SAP Fiori Flexible Workflow. Approvers are notified via Fiori Launchpad or Mobile App. They can access the Fiori Launchpad and Mobile App View attachments of performance proofs and then approve or deny entries on a line item basis.

4. Service Requisitioning

  • Legacy GUI T-Codes: ME51N
  • Fiori App Name: Create Purchase Requisition - Advanced / Touchless
  • Fiori App ID: F1639A / F0384A

Operational Shift Offers a shopping experience for users of businesses seeking external or internal services, eliminating the need to explore complex catalogues of services.

Technical Handling of Limit Services (Unplanned Services)

In the old MM-SRV system, non-planned services were controlled through the definition of"Overall Limit" and an "Overall Limit" and "Expected Value" within the Limits tab of the Service Limits Tab of an item category D line item.

In S/4HANA's Lean Services, non-planned services are dealt with through the Item category E (Enhanced Limit) without requiring a Service Master record.

Enhance Limit Architecture (Item Category E):

  • Line item Header Category 'E' The Product Type Code is 2 (Service Limit)
  • Limit Parameters: Total Limit of $50,000 (Maximum expenditure allowed)
  • Expected Value of $30,000 (Encumbered in budget/commitment)
  • Execution: The Service Entry Sheet documents actual consumption in relation to the limit

Technical Setup for Limit Items in Purchasing Documents

  • Item Category Selection: Set EKPO-PSTYP = E (Enhanced Limit).
  • Product Type Code: Set EKPO-PRODUCT_TYPE = 2 (Unplanned/Limit Service).

Define Limits:

  • Total Limit ( EKPO-SUM_LIMIT): The maximum dollar amount that can be charged on this line item.
  • Expected Value (EKPO-EXPECTED_VALUE): The estimated financial obligation used for budget encumbrance and commitment tracking in ACDOCA.

Service Entry Sheet generation When you post actual work to the Fiori Application F1367 against an item of the Enhanced Limit PO The system checks to ensure that the accumulated receipts do NOT over the EKPO SUM_LIMIT. When saved, ACDOCA converts the commitment record to an actual post-financial posting.

Clean Core & Extensibility Considerations

Custom enhancements built around classic MM-SRV typically rely on ABAP user exits, Customer Exits, and Function Groups in the KL and ML packages (e.g., EXIT_SAPLMLEB_001 or BAPI_ENTRYSHEET_CREATE). These old objects are in violation of Clean Core principles and break when S/4HANA Cloud updates.

Classic vs. Clean Core Extensibility Architecture:

Legacy Customization (Unclean): [ME21N / ML81N] --> Legacy ABAP User Exits (EXIT_SAPLMLEB_001) --> Modification to ESLL/ESSR

Clean Core Architecture: [Fiori App F1367] --> Key User Extensibility (Custom Fields & Logic)

  • Custom Fields added to Business Context: Procurement Item
  • Business Add-Ins (BAdIs) via Cloud ABAP: MM_PUR_S4_PR_MODIFY_ITEM
  • Business Add-Ins (BAdIs) via Cloud ABAP: MMPUR_SAS_ENTRY_SHEET_CHECK

Key User Extensibility Path (No-Code / Low-Code)

Make use of the Fiori Application to customize fields and logic ( F1481) to add Lean Service procurement documents across the stack (UI, CDS Views, APIs, OData services, and Database Tables):

1. Adding Custom Fields to Service Purchase Orders and Entry Sheets

Business Contexts:

  • Procurement: Purchase Order Item (MM_PURH_PO_ITEM)
  • Procurement: Service Entry Sheet Item ( MMPUR_SAS_ITEM)

Execution Steps:

  • Open Fiori App Custom Fields.
  • Create a new field (e.g., YY1_ServiceLocation_SRV).
  • Enable field usage across target UI applications (Manage Purchase Orders, Manage Service Entry Sheets) and APIs (API_SERVICE_ENTRY_SHEET_SRV).
  • The extension is published. The structural enhancements that are underlying make changes to the table targets ( EKPO, ACDOCA) instantly.

Developer Extensibility Path (On-Stack Developer Extensibility / SAP BTP)

For business rules that are complex Replace old User Exits with updated, upgraded-stable BAdIs that use modern ABAP syntax ( ABAP for Cloud Development):

1. Validation Logic for Service Purchase Orders

  • Legacy Exit: EXIT_SAPMM06E_012 / BADI ME_PROCESS_PO_CUST
  • Released Clean Core BAdI: MM_PUR_S4_PO_MODIFY_ITEM (Business Context: Procurement: Purchase Order)
CLASS zcl_bs_mm_po_service_val DEFINITION
  PUBLIC
  FINAL
  CREATE PUBLIC .

  PUBLIC SECTION.
    INTERFACES if_badi_interface .
    INTERFACES if_mm_pur_s4_po_modify_item .
ENDCLASS.

CLASS zcl_bs_mm_po_service_val IMPLEMENTATION.
  METHOD if_mm_pur_s4_po_modify_item~modify_item.
    " Access purchase order item details safely using released interfaces
    DATA(ls_item) = item->get_data( ).

    " Validate Lean Service items (Product Type SERV)
    IF ls_item-producttype = '1'. " Planned Lean Service
      IF ls_item-plant IS INITIAL.
        DATA(ls_message) = VALUE badi_mm_pur_s4_po_item_msg(
          id         = 'ZMM_MSG'
          number     = '001'
          type       = 'E'
          message_v1 = 'Plant configuration is mandatory for Lean Services.'
        ).
        item->add_message( ls_message ).
      ENDIF.
    ENDIF.
  ENDMETHOD.
ENDCLASS.

2. Service Entry Sheet Validation BAdI

  • Legacy Exit: EXIT_SAPLMLEB_001 / EXIT_SAPLMLSR_001
  • Released Clean Core BAdI: MMPUR_SAS_ENTRY_SHEET_CHECK (Business Context: Procurement: Service Entry Sheet)

Goal: Enforce custom header/item validations (e.g. stopping submissions for service entries when the total amount exceeds the pre-approved milestone budgets) without altering core SAP code.

Cutover Strategy & Historical PO Management

The transition into Lean Services requires a clear cutover plan for managing active, partially fulfilled and obsolete Service purchase order.

Cutover Execution Timeline: Pre-Cutover (T-14 Days) --> Go-Live (T-0) --> Post Go-Live (T+1 Day)

  • Pre-Cutover: Run Cleansing Queries, Finalize Mapping Table
  • Go-Live: Flag Legacy Services, Freeze Open MM-SRV POs
  • Post Go-Live: Create New POs with Product Type SERV, Complete Partial Entry, Enforce Fiori Entry

Strategic Cutover Guidelines

1. In-Flight Purchase Orders (Legacy MM-SRV)

Do not migrate Open MMSRV POs into Lean Services Items: In-flight MMSRV Purchase Orders that have Item category D are not able to be converted into Lean Service line items mid-flight due to structural table incompatibilities ( ESLL vs direct EKPO).

Recommended Action:

  • Allow active MM-SRVPOs to close using traditional interfaces, or demand immediate submission the outstanding service entry sheets ( ML81N) prior to the cutover.
  • Balances that remain open after short-closing are credited to PO line items using MM-SRV. This is done using the setting of the final entry indicator ( EKPO-EGLWE = 'X').
  • Reissue any balances of service that remain unpaid on new PO line items for S/4HANA by using the product type SERV (or Item Category E for limitations).

2. Master Data Freeze & Legacy Service Deactivation

  • Make sure to set the indicator for deletion ( ASMD-LVORM = 'X') on migrated old Service Master records in AC03 to stop users from creating obsolete MM-SRV purchase documents after cutting over.
  • Limit access to authorization objects M_SRV_ASNUM (Service Master) for users who use procurement and locking roles in Fiori Apps by using objects M_BANF_EKG and M_BEST_EKO for Lean Services.

Checklist for Implementation Teams

  • Setup: Verify Material Type SERV is in operation with updates to Quantity/Value disabled in all Valuation areas.
  • Master Data Conversion: Run simulation of report RMMSRV_SRVMSTR_MIG_TO_S4 in pre-production environments and validate mapping rules.
  • Account Determination Verify that the OBYC setting for the Valuation Class 3200 (or the desired service valuation class) is correct over WRX, GBB, and BSX.
  • Custom Code Remediation: Scan custom programs using standard SAP Code Inspector (SCI) or ABAP Test Cockpit (ATC) for queries referencing ESLL / ESSR. Replace them with CDS Views (I_PurchaseOrderItem, I_ServiceEntrySheetItem).
  • Fiori Deployment: Assign standard Fiori Catalog SAP_PRC_BC_PURCHASER_DSP and SAP_MM_BC_SES_PROCESS_PC to procurement role profiles.
  • Cutover Execution Set up an exact cutover window for short-close MM-SRV purchases and enforce the new Lean Service creation via Product Type SERV.