---
# API: Characteristic Data for Classification (A2X)
# File: API_CLFN_CHARACTERISTIC_SRV.md
# Version: 1.0.0
# Status: ACTIVE
# Protocol: OData V2
# Source URL: https://api.sap.com/api/API_CLFN_CHARACTERISTIC_SRV/overview
# Generated: 2026-07-23 14:17:02
---

# Characteristic Data for Classification / 分类特征数据 API

> **API 版本:** 1.0.0 | **状态:** ACTIVE | **协议:** OData V2  
> **技术名称:** `API_CLFN_CHARACTERISTIC_SRV`  
> **服务根路径:** `/sap/opu/odata/sap/API_CLFN_CHARACTERISTIC_SRV`  
> **SAP 通信场景:** `SAP_COM_0163`

## 概述 / Overview

该服务支持对分类系统使用的特征主数据进行创建、读取、更新和删除操作。特征描述了被分类对象的属性，包括特征抬头数据、描述、引用、限制和值。

This synchronous inbound OData V2 service enables you to create, read, update, and delete characteristic master data for classification. Characteristics describe attributes of objects to be classified. You can maintain header data, descriptions, references, restrictions, and values.

**API 业务加速器中心:** [https://api.sap.com/api/API_CLFN_CHARACTERISTIC_SRV/overview](https://api.sap.com/api/API_CLFN_CHARACTERISTIC_SRV/overview)

---

## 实体列表 / Entity List

| # | 实体名称 | 描述 (EN) | 描述 (CN) | 主键 |
|---|----------|-----------|-----------|------|
| 1 | `A_ClfnCharacteristic` | Characteristic Header | 特征抬头 | `CharacteristicName` |
| 2 | `A_ClfnCharcValue` | Characteristic Value | 特征值 | `CharacteristicName`, `CharacteristicValue` |
| 3 | `A_ClfnCharcDescription` | Characteristic Description | 特征描述 | `CharacteristicName`, `Language` |
| 4 | `A_ClfnCharcRestriction` | Characteristic Restriction | 特征限制 | `CharacteristicName`, `RestrictionType` |

---

## 1. A_ClfnCharacteristic — 特征抬头

**实体集合路径:** `A_ClfnCharacteristic`  
**主键 (Key):** `CharacteristicName` (CHAR 30)  
**ETag:** 支持

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `CharacteristicName` | String | 30 | Characteristic Name | 特征名称 (主键) |
| `CharacteristicStatus` | String | 1 | Status (1=Released, 2=In Preparation, 3=Locked) | 特征状态 (1=已发布, 2=准备中, 3=锁定) |
| `CharacteristicDescription` | String | 40 | Description | 特征描述 |
| `CharcDataType` | String | 3 | Data Type (NUM=Numeric, CHAR=Character, DATE=Date, TIME=Time, CURR=Currency) | 数据类型 |
| `NumberOfDecimalPlaces` | Int16 | - | Number of Decimal Places | 小数位数 |
| `MeasureUnit` | String | 3 | Unit of Measurement | 计量单位 |
| `ValueEntryDataType` | String | 1 | Value Entry Type (1=SINGLE, 2=MULTIPLE, 3=INTERVAL) | 值输入类型 |
| `CharcValueLength` | Int16 | - | Characteristic Value Length | 特征值长度 |
| `Currency` | String | 5 | Currency Key | 货币代码 |
| `Template` | String | 30 | Template | 模板 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |
| `CreatedByUser` | String | 12 | Created By | 创建人 |
| `CreationDate` | DateTime | - | Created On | 创建日期 |
| `LastChangedByUser` | String | 12 | Last Changed By | 最后更改人 |
| `LastChangeDate` | DateTime | - | Last Changed On | 最后更改日期 |
| `CharcValueIsUpperCase` | Boolean | - | Values in Uppercase | 值大写标识 |
| `InterpretationOfCharacteristic` | String | 1 | Characteristic Interpretation | 特征解释方式 |
| `ListOfAllowedValuesIsFixed` | Boolean | - | Fixed Value Set | 固定值集标识 |
| `DecimalPlacesIsVariable` | Boolean | - | Variable Decimal Places | 可变小数位数标识 |

### 导航属性 / Navigation Properties

| 属性名 | 目标实体 | 基数 | 描述 |
|--------|----------|------|------|
| `to_CharcValue` | A_ClfnCharcValue | 0..* | 特征值 |
| `to_CharcDescription` | A_ClfnCharcDescription | 0..* | 特征描述 |

---

## 2. A_ClfnCharcValue — 特征值

**实体集合路径:** `A_ClfnCharcValue`  
**主键 (Key):** `CharacteristicName` (CHAR 30), `CharacteristicValue` (CHAR 30)

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `CharacteristicName` | String | 30 | Characteristic Name | 特征名称 (主键) |
| `CharacteristicValue` | String | 30 | Characteristic Value | 特征值 (主键) |
| `CharcValueDescription` | String | 40 | Value Description | 值描述 |
| `CharcValueSortOrder` | String | 4 | Sort Order | 排序顺序 |
| `ValueIsDefault` | Boolean | - | Default Value | 默认值标识 |
| `AuthorizaionGroup` | String | 4 | Authorization Group | 授权组 |
| `CreationDate` | DateTime | - | Created On | 创建日期 |
| `LastChangeDate` | DateTime | - | Last Changed On | 最后更改日期 |

### 导航属性 / Navigation Properties

| 属性名 | 目标实体 | 基数 | 描述 |
|--------|----------|------|------|
| `to_Characteristic` | A_ClfnCharacteristic | 1 | 所属特征 |

---

## 3. A_ClfnCharcDescription — 特征描述

**实体集合路径:** `A_ClfnCharcDescription`  
**主键 (Key):** `CharacteristicName` (CHAR 30), `Language` (CHAR 2)

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `CharacteristicName` | String | 30 | Characteristic Name | 特征名称 (主键) |
| `Language` | String | 2 | Language Key | 语言代码 (主键) |
| `CharcDescription` | String | 40 | Characteristic Description | 特征描述文本 |

---

## CRUD 端点 / CRUD Endpoints

| 操作 | HTTP 方法 | 端点路径 |
|------|-----------|---------|
| 读取集合 | GET | `/{EntityCollection}` |
| 读取单个 | GET | `/{EntityCollection}(...key...)` |
| 创建 | POST | `/{EntityCollection}` |
| 更新 | PATCH | `/{EntityCollection}(...key...)` |
| 删除 | DELETE | `/{EntityCollection}(...key...)` |

各实体集合路径与实体名称一致。

---

## 认证 / Authentication

### OAuth 2.0 (推荐)
```
Authorization: Bearer <access_token>
```

### 基本认证 (Basic Auth)
```
Authorization: Basic <base64(username:password)>
```

### CSRF Token 处理
```http
GET /sap/opu/odata/sap/API_CLFN_CHARACTERISTIC_SRV/A_ClfnCharacteristic
X-CSRF-Token: Fetch
```

---

## 错误码 / Error Codes

| HTTP 状态码 | 描述 (EN) | 描述 (CN) |
|-------------|-----------|-----------|
| 200 | OK | 请求成功 |
| 201 | Created | 创建成功 |
| 204 | No Content | 无返回内容 |
| 400 | Bad Request | 请求参数错误 |
| 401 | Unauthorized | 未授权 |
| 403 | Forbidden | 禁止访问 |
| 404 | Not Found | 资源不存在 |
| 500 | Internal Server Error | 服务器内部错误 |

---

## 相关资源 / References

| 资源 | 链接 |
|------|------|
| SAP API Business Hub | [https://api.sap.com/api/API_CLFN_CHARACTERISTIC_SRV/overview](https://api.sap.com/api/API_CLFN_CHARACTERISTIC_SRV/overview) |
| SAP Help Portal | [https://help.sap.com/docs/SAP_S4HANA_CLOUD/9f047b05da4545ca8f9ebfc22acefd06/5c3fb6b558b1482491fd786ec7fa0c26.html](https://help.sap.com/docs/SAP_S4HANA_CLOUD/9f047b05da4545ca8f9ebfc22acefd06/5c3fb6b558b1482491fd786ec7fa0c26.html) |
| SAP Cloud SDK Java VDM | [https://javadoc.io/static/com.sap.cloud.sdk.s4hana/s4hana-api-odata/4.5.0/com/sap/cloud/sdk/s4hana/datamodel/odata/services/DefaultCharacteristicDataForClassificationService.html](https://javadoc.io/static/com.sap.cloud.sdk.s4hana/s4hana-api-odata/4.5.0/com/sap/cloud/sdk/s4hana/datamodel/odata/services/DefaultCharacteristicDataForClassificationService.html) |
