Sub topic 7
Purchasing view
This chapter assumes you can navigate SAP GUI and run MM01, MM02, and MM03. It also assumes you know what a plant and a purchasing organization are, and that you have read the chapters on organizational levels and the views overview. ABAP reading skills help for the final example but are optional.
What the Purchasing view is for
The Purchasing view holds the data that procurement needs when it buys a material. The system reads it when a buyer creates a purchase requisition or purchase order, when it converts requisitions to orders, and when it posts a goods receipt against an order.
Most of its fields are defaults. A field in the Purchasing view proposes a value to the purchasing document, and the buyer can change it there. This explains a common error: if you change the material master, existing purchase orders do not change. Only new documents pick up the new default.
Where the data is stored
The view mixes two organizational levels. Most fields are plant-level, but a few are client-level.
| Field | Table and field | Level |
|---|---|---|
| Order unit | MARA-BSTME | Client |
| Purchasing value key | MARA-EKWSL | Client |
| Purchasing group | MARC-EKGRP | Plant |
| Goods receipt processing time (days) | MARC-WEBAZ | Plant |
| Automatic purchase order allowed | MARC-KAUTB | Plant |
| Source list requirement | MARC-KORDB | Plant |
| Plant-specific material status | MARC-MMSTA | Plant |
The mix matters when you extend a material. The Purchasing view cannot exist without a plant, so you must extend the material to a plant before purchasing can use it. Fields such as the order unit are shared by every plant. If you change MARA-BSTME in one plant's screen, you change it everywhere.
A purchasing organization does not store a separate set of material master fields. Purchasing-organization-specific data, such as prices and delivery times, belongs in the purchasing info record. The material master only supplies defaults.
Key fields
Order unit
The order unit is the unit of measure in which you buy the material, for example carton (CAR) when the base unit is each (EA). The material needs a conversion between the two units on the Additional Data screen of the Basic Data view. If the conversion is missing, the system rejects the order unit. When the order unit is empty, the system proposes the base unit.
Variable order unit
This indicator controls whether a buyer may use a unit other than the order unit in a purchase order. The values are:
- Blank: variable order units are not active.
- 1: variable order units are active, and the order unit defaults from the material master.
- 2: variable order units are active, and the order unit defaults from the info record.
Purchasing group
The purchasing group is the buyer or buying team responsible for the material in this plant. It proposes the purchasing group on requisitions and orders. MRP also copies it onto the requisitions it creates, so a missing value here leads to requisitions without a responsible buyer.
Purchasing value key
The purchasing value key bundles reminder days and delivery tolerances. It lets you apply the same reminder schedule and tolerance limits to many materials. You configure the keys in Customizing, so the available values differ between systems.
Goods receipt processing time
This is the number of working days the plant needs after delivery to make the material available, for example for inspection or putaway. MRP adds it to the planned delivery time when it calculates order dates. A value that is too high pushes order dates earlier than necessary.
Automatic purchase order and source list
Setting "Automatic PO" allows the system to create purchase orders from requisitions automatically. This only works if the source of supply is unambiguous, for example one valid info record or source list entry. Setting "Source list" makes a valid source list entry mandatory for purchasing the material in this plant. Without such an entry, the system blocks the order.
Plant-specific material status
The plant-specific status can block or warn on procurement for one plant, independently of other plants. The status lifecycle chapter covers the values. For purchasing, the point is that a blocking status on the plant record stops new purchase orders even when the Purchasing view is otherwise complete.
How the data flows into procurement
The following diagram shows how the Purchasing view fields reach purchasing documents.
In practice, the requisition takes its purchasing group from the plant record. The purchase order takes the order unit from the info record or the material master, depending on the variable order unit setting. The goods receipt processing time is not in the order itself. It enters the scheduling that MRP does before the order exists.
Prerequisites for the view to appear
Seeing the Purchasing view in the view selection dialog depends on three settings:
- The material type must allow it. For example, a raw material (ROH) and a trading good (HAWA) are usually purchased. A finished product (FERT) normally has no Purchasing view unless Customizing allows external procurement.
- The user's authorization must cover the view and the plant.
- Field selection can hide or make fields mandatory per material type and plant. Those rules are in a later chapter.
If a user cannot see the Purchasing view in MM01, check the material type's user department attribute first.
What changed in S/4HANA
The Purchasing view still works as described above, but a few surrounding changes affect it. The supplier is a business partner, so the supplier you reference in source lists and info records must exist as a business partner with a supplier role. The material number can be up to 40 characters. Fiori apps such as Manage Product Master Data offer the same data in a different layout. Finally, the manufacturer part number moved to a separate concept, so check your release's documentation before relying on old field locations.
Reading purchasing data with ABAP SQL
Because the data spans MARA and MARC, you read it with a join, as the spine example does for the general and plant data.
REPORT zdemo_purchasing_view.
SELECT mara~matnr,
mara~bstme,
mara~ekwsl,
marc~werks,
marc~ekgrp,
marc~webaz,
marc~kautb,
marc~kordb
FROM mara
INNER JOIN marc ON marc~matnr = mara~matnr
WHERE marc~werks = '1010'
AND marc~ekgrp <> @space
INTO TABLE @DATA(lt_purchasing)
UP TO 50 ROWS.
cl_demo_output=>display( lt_purchasing ).The query returns only materials that have a purchasing group in plant 1010. MARC rows exist for every material extended to the plant, so the filter on EKGRP is a quick way to find materials where the Purchasing view is probably not maintained.
Common errors
- Order unit rejected: the conversion to the base unit is missing in the Basic Data view.
- Requisitions without a buyer: the purchasing group is empty in MARC.
- Order dates too early: the goods receipt processing time is larger than needed.
- Automatic PO does not run: no unique source of supply exists, or the source list requirement is set without an entry.
- Expected change missing in an open order: the field is only a default and applies to new documents.
Exercise
A buyer changes the purchasing group in the material master of plant 1010. A purchase order created last week still shows the old group. Why, and which table holds the new value?
Show answer
The Purchasing view only supplies defaults to new documents, so existing purchase orders keep the value they were created with. The purchasing group is a plant-level field stored in MARC-EKGRP.
Exercise
You need a list of materials in plant 1010 that have no purchasing group. Which tables do you join, and which condition on which field finds them?
Show answer
Join MARA and MARC on the material number, restrict MARC-WERKS to 1010, and select rows where MARC-EKGRP is empty.