Sub topic 6
Groupings and number ranges
This chapter assumes you know basic SAP GUI navigation, the idea of customer and vendor master data, and how relational tables and keys work. It covers how a grouping decides the number a new business partner receives.
What a grouping does
A grouping is a customizing value that you choose when you create a business partner. It controls three things:
- The number range the partner key is drawn from.
- Whether the number is assigned internally by the system or entered externally by the user.
- Which number range the linked customer and supplier receive under CVI.
Grouping is not the same as category or role. The category says whether the partner is a person, an organization or a group. A role says what the partner does, for example customer or supplier. The grouping only decides numbering and, in some systems, which fields are required.
Number ranges in two layers
The business partner has its own number range. Each grouping points to one such range. The classic customer and supplier numbers come from separate number ranges, and CVI uses them when it creates the customer and supplier records.
| Layer | Object | Typical use |
|---|---|---|
| Business partner | Number range object BU_PARTNER | Key of the partner in BUT000 |
| Customer | Number range object DEBITOR | Customer number in KNA1 |
| Supplier | Number range object KREDITOR | Supplier number in LFA1 |
A common design is to keep the three numbers identical. That works only if the ranges cover the same interval and the same assignment type (internal or external). If they do not match, CVI cannot reuse the partner number as the customer or supplier number.
Internal and external assignment
With internal assignment, the system picks the next free number when you save. With external assignment, you type a number that must fall inside the range. A range is one or the other, not both.
If you use external assignment and the number is already taken, saving fails. This is the most common source of number conflicts after a migration.
Choosing a grouping
Pick the grouping from the scenario. For example, a one-time customer, an employee and a normal trading partner often get different groupings, because they need different ranges.
GET /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner?$filter=BusinessPartnerCategory eq '2'&$select=BusinessPartner,BusinessPartnerFullName,BusinessPartnerGrouping,Customer,Supplier&$top=5
Accept: application/jsonThe response shows BusinessPartnerGrouping next to the Customer and Supplier keys. Compare them to see which grouping produced which numbers.
Common errors
- The grouping is not assigned to a customer or supplier number range, so CVI cannot create the linked record.
- The partner number is outside the customer range, so the customer number differs from the partner number or creation fails.
- Internal and external settings differ between the partner range and the linked range.
Exercise
A new partner is saved with grouping X, but the CVI customer is not created because the partner number does not fit the customer range. Name two settings you should compare.
Show answer
Compare the number intervals and the assignment type (internal or external) of the partner range and the customer range, and check that grouping X is assigned to a customer range.