SAP MM Contract T-Codes: ME31K, ME32K, ME33K and Release Orders
sap mm contract tcode
Also searched as
- me31k create contract sap
- sap quantity contract vs value contract
- sap contract release order me21n
- me33k display contract
Short answer
In SAP MM a contract is an outline agreement with a vendor. ME31K creates it, ME32K changes it, ME33K displays it. A quantity contract (document type MK) caps total quantity, a value contract (WK) caps total value, and purchase orders created in ME21N reference the contract as release orders against it.
Applies to: SAP ECC 6.0 and S/4HANA on-premise. Document type keys MK and WK are the SAP standard; your system may add custom types.
How to create a contract in ME31K and release against it
- 1Open ME31K. Enter the vendor, the agreement type (MK quantity or WK value), purchasing organization, purchasing group and, if prompted, plant.
- 2Enter the validity start and end dates in the header, plus payment terms and Incoterms. These default into every release order.
- 3Add items. For an MK contract enter material, target quantity, net price and plant. For a WK contract enter the target value for the agreement and item descriptions.
- 4Save. The system issues a contract number from the contract number range.
- 5Release the contract if your system uses a release procedure (ME35K for release of contracts).
- 6Create release orders: in ME21N choose the contract through the Document Overview selection (outline agreements) and adopt the item, or reference it from the contract via the follow-on functions.
- 7Monitor consumption in ME33K (release documentation) or with the contract lists ME3N, ME3M and ME3L.
Quantity versus value contracts
A quantity contract fixes a total target quantity per material at an agreed price. Each release order consumes part of that quantity, and the system can warn or stop you when releases exceed the target. This fits repeat items such as raw material bought at a negotiated price for a year.
A value contract fixes a total monetary amount. It is item-level flexible, since each release order can cover different materials or services, and it suits blanket arrangements, MRO or services. Release orders draw down the value rather than a quantity.
How contracts connect to POs, sourcing and tables
Contract headers and items are stored in the same tables as purchase orders: EKKO for the header and EKPO for items, distinguished by document category. The consumption record (release documentation) lives in EKAB. A release order is simply a normal PO whose items carry a reference to the contract.
For automatic sourcing, maintain a source list (ME01) and quota arrangements as needed. When the contract is valid and the material has a source list entry, MRP can create purchase requisitions assigned to the contract and ME59N can turn them into release orders automatically.
ME31K Create contract
ME32K Change contract
ME33K Display contract
ME35K Release (approve) contract
ME3N Contracts by contract number
ME3M Contracts by material
ME3L Contracts by vendor
ME01 Maintain source list
Tables: EKKO, EKPO, EKAB
Changes, expiry and closing
Use ME32K to change prices, validity and target values. Price changes only affect new release orders, not those already issued. If a contract is extended, change the validity end date; an expired contract will not default into new POs.
To stop further releases, set the deletion indicator or block the contract through ME32K. Check open release orders in ME2N before closing so you do not orphan commitments.
Try it here, free
SAP MM Standard Reports and Report T-Codes
Search SAP MM standard report t-codes for POs, RFQs, stock, GR/IR and audit, with the use case for each.
Common pitfalls
- !Assuming a contract is a PO: it is not sent to the vendor and does not create commitments until release orders exist.
- !Letting validity dates lapse, which makes the system ignore the contract during source determination.
- !Using a quantity contract for services, where a value contract is the right fit.
- !Changing contract price and expecting open POs to update automatically; they keep the old price.
- !Skipping the source list, so MRP never assigns requisitions to the contract.
How an ERP-grounded AI assistant handles this
A grounded assistant can tell a buyer 'how much of contract 4600001234 is consumed, which release orders drew it down and when does it expire?' by reading EKKO, EKPO and EKAB with the user's own authorizations. Netray's ERPray layer does this read-only and can run on-prem, so commercial terms stay inside your landscape.
Frequently asked questions
What is the T-code to create a contract in SAP MM?
ME31K creates a purchasing contract (outline agreement). ME32K changes it and ME33K displays it. For scheduling agreements, which are a different type of outline agreement, the equivalent transactions are ME31L, ME32L and ME33L.
What is the difference between a contract and a scheduling agreement?
A contract fixes terms and a total quantity or value, but delivery timing comes from individual release orders. A scheduling agreement fixes terms and also carries delivery schedule lines that the vendor receives, so it works like a standing order with dates.
How do I create a release order against a contract?
In ME21N, use the document overview to select the contract and adopt its items, or create the PO with reference to the contract. The PO item then points at the contract, picks up its price and terms, and reduces the remaining target quantity or value.
How do I see how much of a contract has been used?
Display the contract in ME33K and open the release documentation, or use ME3N and related lists. The data comes from the release records in EKAB, so the figures match the POs that reference the contract.
Related
SAP MM Order Creation: ME21N Step by Step and the Procure-to-Pay Process
To create a purchase order in SAP MM, open ME21N, enter the vendor and organizational data in the header, add items with material, quantity, plant and price, then save. The PO sits inside the procure-to-pay flow: purchase requisition (ME51N), PO (ME21N), goods receipt (MIGO), invoice verification (MIRO) and payment (F110).
How-toSAP open purchase orders report: ME2N, ME2M, ME2L and the underlying tables
Use ME2N for a flexible open PO list, ME2M by material and ME2L by vendor, with the selection parameter Still to be delivered. The open quantity is the scheduled quantity in EKET minus goods received in EKBE, excluding deleted and delivery-completed items. For custom reports, read EKKO, EKPO, EKET and EKBE.
Error fixPO Not Released in SAP: Release Strategy, ME28 and ME29N Fixes
A purchase order that stays unreleased almost always has a release strategy that is assigned but cannot advance: the release code is not given to the approver, the prior release step is still open, the approver or workflow agent does not exist, or a change reset the strategy. Check the Release Strategy tab in ME23N, then fix the code assignment, the workflow, or the value that triggered the strategy.
How-toSAP MM BAPI for PO Create and Change: BAPI_PO_CREATE1 and BAPI_PO_CHANGE
Use BAPI_PO_CREATE1 to create a purchase order and BAPI_PO_CHANGE to change one. Each takes a data structure and a matching X-structure that flags which fields to apply, returns messages in the RETURN table, and only persists after you call BAPI_TRANSACTION_COMMIT when no error message came back.
Error fixSAP M7 021: Deficit of SL Stock Quantity
M7 021 fires during a goods issue, delivery, or confirmation when SAP checks the unrestricted-use (SL) stock for the exact plant, storage location and batch combination and finds less than what you are trying to post out. Fix the entry (batch, storage location, quantity) first; only enable negative stock or downgrade the message to a warning if the business genuinely needs to post ahead of a receipt.
Error fixSAP IDoc Status 51: Application Document Not Posted
Status 51 tells you the IDoc reached the application layer and failed to post, but the status text itself is not the error - the real cause sits in the status record's long text or the linked application log. Fix the underlying data or configuration, then reprocess the IDoc through BD87 rather than editing the status.
AI for ERPAI for SAP S/4HANA, Running On-Prem or in Your Private Cloud
Run AI on SAP S/4HANA without sending ERP data to a public API. On-prem and private-cloud architecture, CDS views, OData, and honest deployment trade-offs.
Stuck on SAP ECC / S/4HANA?
Talk to engineers who work inside SAP ECC / S/4HANA every week, and who build private AI that answers these questions from your own ERP data.
Keep exploring
Free tools
- SAP MM Standard Reports and Report T-CodesSearch SAP MM standard report t-codes for POs, RFQs, stock, GR/IR and audit, with the use case for each.
- SAP Outline Agreement Expiry ABAP SELECT GeneratorGenerate an ABAP report that lists purchasing contracts and scheduling agreements expiring in a window, from EKKO and EKPO.
- SAP Batch Management GMP T-Codes and Tables ReferenceA lookup of SAP transactions, tables and movement types for batch genealogy, inspection and release.
ERP fixes and how-tos
- Contract, MMBE and PPV Reports in SAP MMRun contract reports in SAP MM with ME2M and ME2N, check stock with MMBE, report purchase price variance and build custom MM reports with SQ01 and CDS views.
- SAP MM Pricing Procedure Configuration (Calculation Schema, M/08)Configure the SAP MM pricing procedure (calculation schema): condition types, M/08, schema groups and determination, MEK1 condition records and account keys.
- How to Create a Purchase Order in SAP MM (ME21N)Step-by-step purchase order creation in SAP MM with ME21N: manual PO, PO from requisition, account assignment, release and the order-to-invoice flow.
AI on your ERP
- AI for SAP S/4HANA Procurement (MM) That Reads POs, Receipts and Invoices TogetherAI for SAP S/4HANA procurement: query purchase orders, goods receipts and invoice matching in plain English, on-prem if needed, read-only by default.
- AI for Salesforce Manufacturing Cloud: Sales Agreements Reconciled with ERP ActualsConnect Salesforce Manufacturing Cloud sales agreements and forecasts to ERP actuals with private AI: run-rate variance, rebate checks and account planning.