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.
List of topics in this post:
- SAP Characteristics Customizing
- Access SAP
- Read SAP Customer (customer classification in sap)
- Update SAP Classification Characteristic
- SAP Classification Main Tables ( AUSP, … )
- Classification Tables Join
You will find at the end a Sample ABAP Code how to update the SAP Customer Classification.
SAP Characteristics Customizing
- The path to customize Characteristics is ( or tcode CT04 for Characteristics and CL02 for Class )
- Choose the Data Type: Character Format (fill the numbers of characters) , Currency Format, Date Format, Numeric Format or Time Format.
- Choose the Value Assignment: Single Value or Multiple Values
- Set the list of Value if relevant: the list can be 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
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.
A sample call can be as following
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 is the same process and access path for Vendor Classification in SAP.
SAP Classification Tables
The most importing SAP classification Tables are
- AUSP: this table save 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 are kind of grouping/set of Characteristics.
Find the relevant list for SAP Classification Tables with more information.
|KLAH||Class Header Data|
|KLAT||Classes: Long texts|
|CAWN Characteristic values|
|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|
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 and … )|
|AUSP-ATWRT||Value of Characteristic|
|CABNT-ATBEZ||Description of Characteristic|
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
Material Characteristics Table in sap
In order to retrive Sap Material classification, make a jointure between MARA-MATNR and AUSP-OBJEK.
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.
Found more information about Classification (CA-CL)