This article will cover How Sap Classification is handled.
It starts with SAP Characteristics and Classes Customizing to get an overview of Classification.
The second part is more technical and covers the Master Data for Classification (ex: AUSP).
The last part explains how to handle Characteristics in ABAP Coding: How to read and Update Characteristics.
You will find a link to ABAP Program Update characteristic value in Sap: how to update the SAP Customer Classification.
SAP Characteristics Customizing
Let’s start by the SAP Characteristics Customizing.
The main Tcode for Characteristics Customizing in SAP is CT04 and CL02 for Class Customizing.
Step by Step SAP Class & Characteristic Customizing
The path to customize Characteristics is:
- CT04: Customizing of SAP Characteristics
- CL02: Customizing of SAP Classes
You can access the Customizing Tcodes directly from Standard SAP Menu under:
SAP Men > Cross-Application Components > Classification System > Master Data
Fill a new for the new Characteristic. Then Choose the Data Type.
Characteristic can have the following type:
- Character Format (fill the numbers with characters),
- Currency Format,
- Date Format,
- Numeric Format
- Or Time Format.
Choose the Value Assignment: Single Value or Multiple Values
Set the list of SAP Characteristic Values depending on your scenario to :
- A fixed list,
- for check table,
- for function module
- Or from Catalog Char.
The list of Value can be found in table CAWN.
SAP Classification: Retrieve and Update
Once the Class and its Characteristics are defined in SAP, let’s move how to assign how to assign SAP Classification to SAP object.
In order to illustrate, we will take some real life sample.
The first example deals about handling Customer Classification in SAP.
Moreover, it will explain how to assign Customer Classification in SAP. Then how to retrieve and update SAP Customer Classification’s Characteristics values.
The next example will cover SAP Material Classification.
Customer Classification in SAP
To access Customer classification, go to XD02/3, then to Extra and Classification.
Read SAP Customer Classification
To read Classification, you can use this standard BAPI BAPI_OBJCL_GETDETAIL.
The class type and the class number can be read from the XD02/3 classification screen:
Update SAP Classification Characteristic
Classification Update can be managed by the standard bapi BAPI_OBJCL_CHANGE.
Don’t forget to call a BAPI_TRANSACTION_COMMIT after the update.
Material classification in SAP
Material Classification in SAP is the same process and access path for Vendor Classification in SAP.
SAP Material Characteristics Table in sap
In order to retrieve Sap Material classification, make a join between MARA-MATNR and AUSP-OBJEK.
SAP Classification Tables
Main SAP Classification Tables & Fields
The most importing SAP classification Tables are
AUSP: this table saves the value of characteristic for a single business object (Customer, material, �)
The AUSP-OBJEK refers to business object key for example Customer ID in table KNA1-KUNNR or Material Number from MARA-MATNR.
The value of the Characteristic can be found in AUSP-ATWRT (neutral value).
CABN: This Table contains the property of the Characteristic. It pilots the type, description … of the characteristic.
KLAH: The Class of Characteristic is a kind of grouping/set of Characteristics.
When working in ABAP Code with Characteristic, the most important fields to help out extract classification values:
|AUSP-OBJEK||key of object for Characteristic ( Material and Customer)|
|AUSP-ATWRT||Value of Characteristic|
|CABNT-ATBEZ||Description of Characteristic|
List of related SAP Classification Tables
Find the relevant list for SAP Classification Tables with more information.
The List of Important SAP Classification Tables is:
|KLAH||Class Header Data|
|KLAT||Classes: Long texts|
|KLAH||Class Header Data|
|KLAT||Classes: Long Texts|
|KSML||Characteristics of a Class|
|KSSK||Allocation Table: Object to Class|
|CABNZ||Links between Table Fields and Characteristics|
SAP Classification Query
Useless to try an SQVI for Classification. Actually the AUSP-OBJEK has hardly the same kind and length as the MARA-MATNR or KNA1-KUNNR.
A new view between AUSP and KNA1 or MARA can solved the problem.
To make your life easier, here the join to do in order to retrieve Characteristic data in any ABAP Code.
Join between CABN, AUST and KNA1 can be :
- AUSP-ATINN = CABN-ATINN
- CABNT-ATINN = CABN-ATINN
- KNA1-KUNNR = AUSP-OBJEK
SAP Characteristics Tables and Fields
Characteristic Descriptions can be found at table CABN / CABNT in the field CABNT-ATBEZ
Characteristic Values can be found at table AUSP in the field AUSP-ATWRT for Characteristic Value and AUSP-ATFLV for Data Values.
The field AUSP-OBJEK is Key of Object for Characteristic (Material, Customer, …)
Sample SAP Customer Classification Update code
Here a Sample ABAP Program to maintain customer classification in sap.
Please check this link for a sample code to create or update a characteristic.