SAP Transaction Codes
SAP ME21N Transaction: How to Create a Purchase Order
Learn how to use the SAP ME21N transaction to create a purchase order, complete the required header and item data, validate pricing and delivery details, and troubleshoot common errors.
On this page
The SAP ME21N transaction creates a purchase order in SAP Materials Management. It supports purchase orders for materials, services, stock procurement, and direct consumption, depending on the document type and item data configured in the system.
Use ME21N when a purchasing document must be created directly in SAP GUI. Before saving, collect the vendor, purchasing organization, purchasing group, company code, material or service details, plant, quantity, delivery date, and agreed price. For an overview of related transactions, see the SAP transaction code list.
What the SAP ME21N transaction does
ME21N is the standard transaction for creating a purchase order. The purchase order records the supplier commitment, requested items or services, quantities, prices, delivery requirements, and account assignment information.
The transaction is commonly used after an internal purchasing requirement has been approved. A purchase order can also refer to an existing purchasing document, such as a purchase requisition, contract, or quotation, when the purchasing process is configured to support that reference.
ME21N creates the document. ME22N is used to change an existing purchase order, and ME23N is used to display one. The purchasing document number is assigned when the order is saved successfully.
Information to prepare before creating a purchase order
Prepare the organizational and supplier data before opening ME21N:
- Document type, such as the standard purchase order type configured for the business process
- Vendor or supplier account
- Company code
- Purchasing organization
- Purchasing group
- Currency and payment terms, when they are not derived automatically
- Material or service information
- Plant or delivery location
- Quantity and requested delivery date
- Net price, tax information, and conditions
- Account assignment, such as a cost center, internal order, project, or asset, for consumption items
For material-specific information, the SAP MM03 transaction can help confirm material master data before the purchase order is entered.
How to create an ME21N purchase order
- Open SAP GUI and enter
ME21Nin the command field. - Select the required document type if the system does not already show the correct one.
- Enter the vendor and organizational data in the purchase order header.
- Add an item and enter the material number, short text, quantity, delivery date, plant, and net price as applicable.
- Review the item details, including purchasing data, delivery data, invoice data, texts, conditions, and account assignment.
- Enter an account assignment category and the related account assignment values when the item is purchased for direct consumption.
- Review messages in the status area and correct errors before saving.
- Choose Save. SAP displays the purchase order number after the document is created.
The exact visible fields depend on the document type, item category, account assignment, and configuration used by the organization. Required fields must be completed before the document can be saved.
ME21N header and item data
The purchase order has two main data levels. Header data applies to the overall document, while item data applies to individual materials or services.
Header data typically includes the vendor, purchasing organization, purchasing group, company code, currency, payment terms, and delivery or communication information. Header texts can provide supplier instructions or internal purchasing notes.
Item data includes the material or service, short text, order quantity, unit of measure, plant, storage location where relevant, delivery date, price, tax code, and account assignment. Use the item detail tabs to verify information that is not visible in the main overview.
A purchase order with several materials can contain multiple items. Review each item separately because plants, delivery dates, account assignments, prices, and confirmation requirements can differ across items.
How to validate the purchase order before saving
Use the Check function and review the message area before saving. Validation should cover more than whether all mandatory fields are filled.
Confirm that the vendor is correct, the purchasing organization and company code are consistent, the plant is valid for the process, and the delivery date is realistic. Check the order quantity, unit, net price, currency, tax code, delivery tolerances, and account assignment.
For goods-related purchasing, verify the material and plant combination. For services or consumption items, confirm the short text, service or account assignment data, cost object, and approval requirements. If invoice processing will follow, review the invoice-related data carefully. The SAP MIRO transaction is used later in many purchasing processes to enter a supplier invoice.
Common ME21N errors and troubleshooting
Vendor or purchasing organization error
Confirm that the supplier is valid for the company code and purchasing organization. Check the vendor master data, purchasing data, payment terms, partner functions, and ordering currency. A missing or blocked supplier record requires master-data or purchasing support.
Material or plant error
Verify that the material exists and is extended to the relevant plant and purchasing organization. Confirm the material status, order unit, purchasing group, and delivery data. When the process uses a service or free-text item, complete the required description and account assignment instead of entering a material number.
Price or condition error
Review the item conditions and the source used to determine the price. A missing info record, invalid validity period, incompatible currency, or required condition can prevent correct pricing. Enter an approved price or resolve the source-record issue according to the purchasing process.
Account assignment error
Check the account assignment category and complete every required field. A cost center, internal order, project, asset, or general ledger account may be required depending on the category and configuration. The account assignment must be valid for the company code and posting date.
Authorization error
An authorization message usually identifies the organizational value or activity that is missing. Record the complete message, including the document type and organizational data, and send it to the SAP security or application support team. Do not bypass the control by changing organizational values without business approval.
Release or approval status
Some purchase orders enter an approval workflow or release procedure after saving. Review the release status and resolve the assigned approval step before treating the order as ready for dispatch. A saved document can still require approval before the supplier receives a valid commitment.
Operational checks after saving
Record the purchase order number and verify the saved document in display mode. Confirm the vendor, items, quantities, prices, delivery dates, texts, output or communication status, and release status.
If the order is based on a purchase requisition or another reference document, verify that the reference relationship is present. Check whether output processing has generated the expected supplier communication according to the organization’s configuration.
For changes after creation, use ME22N and review the change history. Changes to quantity, price, delivery date, account assignment, or supplier communication may trigger a new approval or require coordination with receiving and accounts payable.
ME21N usage checklist
Use this short checklist for routine purchase order creation:
- Confirm the correct document type.
- Verify the vendor and purchasing organization.
- Confirm the company code, purchasing group, and plant.
- Enter complete item data for every line.
- Check quantity, unit, delivery date, price, currency, and tax data.
- Complete account assignment for consumption items.
- Run the document check and resolve error messages.
- Save the document and record the purchase order number.
- Review release and output status after saving.
A complete validation pass reduces downstream problems with goods receipt, invoice verification, approvals, and supplier communication.