---
# API: Defect (A2X)
# File: DEFECT_0001.md
# Version: 1.5.0
# Status: ACTIVE
# Protocol: OData V4
# Source URL: https://api.sap.com/api/DEFECT_0001/overview
# Generated: 2026-07-23 14:17:02
---

# Defect (A2X) / 缺陷 API

> **API 版本:** 1.5.0 | **状态:** ACTIVE | **协议:** OData V4  
> **技术名称:** `API_DEFECT`  
> **服务根路径:** `/sap/opu/odata4/sap/defect/srvd_a2x/sap/defect/0001/`  
> **SAP 通信场景:** `SAP_COM_0221`

## 概述 / Overview

该服务支持对缺陷数据进行创建、读取、更新操作。缺陷数据用于质量管理模块，记录检验过程中发现的质量问题。

This synchronous inbound OData V4 service enables CRUD operations on defect data used in Quality Management to record quality issues found during inspection.

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

---

## 实体列表 / Entity List

| # | 实体名称 | 描述 (EN) | 描述 (CN) | 主键 |
|---|----------|-----------|-----------|------|
| 1 | `A_Defect` | Defect | 缺陷 | `Defect` |

---

## 1. A_Defect — 缺陷

**实体集合路径:** `A_Defect`  
**主键 (Key):** `Defect` (CHAR 20)  
**ETag:** 支持

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `DefectInternalID` | String | 20 | Defect Internal ID | 缺陷内部ID |
| `Defect` | String | 20 | Defect ID | 缺陷编号 (主键) |
| `DefectCategory` | String | 2 | Defect Category | 缺陷类别 |
| `DefectClass` | String | 2 | Defect Class | 缺陷等级 |
| `DefectText` | String | 40 | Defect Text | 缺陷文本 |
| `DefectOrigin` | String | 2 | Defect Origin | 缺陷来源 |
| `DefectCodeCatalog` | String | 1 | Code Catalog | 缺陷代码目录 |
| `DefectCodeGroup` | String | 8 | Code Group | 缺陷代码组 |
| `DefectCode` | String | 4 | Defect Code | 缺陷代码 |
| `DefectCodeVersion` | String | 6 | Code Version | 缺陷代码版本 |
| `DefectObjectCodeCatalog` | String | 1 | Object Code Catalog | 对象代码目录 |
| `DefectObjectCodeGroup` | String | 8 | Object Code Group | 对象代码组 |
| `DefectObjectCode` | String | 4 | Object Defect Code | 对象缺陷代码 |
| `DefectiveQuantity` | Decimal | 13,3 | Defective Quantity | 缺陷数量 |
| `DefectiveQuantityUnit` | String | 3 | Unit for Defective Quantity | 缺陷数量单位 |
| `NumberOfDefects` | Integer | - | Number of Defects | 缺陷数 |
| `DefectStatus` | String | 2 | Defect Status | 缺陷状态 |
| `Material` | String | 40 | Material | 物料 |
| `Plant` | String | 4 | Plant | 工厂 |
| `InspectionLot` | String | 12 | Inspection Lot | 检验批 |
| `Batch` | String | 10 | Batch | 批次 |
| `SerialNumber` | String | 18 | Serial Number | 序列号 |
| `Equipment` | String | 18 | Equipment | 设备 |
| `FunctionalLocation` | String | 40 | Functional Location | 功能位置 |
| `ManufacturingOrder` | String | 12 | Manufacturing Order | 生产订单 |
| `ManufacturingOrderOperation` | String | 4 | Operation | 工序 |
| `ManufacturingOrderSequence` | String | 6 | Sequence | 工序序列 |
| `OrderInternalID` | String | 12 | Order Internal ID | 订单内部ID |
| `InspPlanOperationInternalID` | String | 8 | Inspection Plan Operation | 检验计划工序 |
| `InspectionCharacteristic` | String | 6 | Inspection Characteristic | 检验特性 |
| `InspectionSubsetInternalID` | String | 6 | Inspection Subset | 检验子集 |
| `MaterialSample` | String | 10 | Material Sample | 物料样本 |
| `MainWorkCenter` | String | 8 | Main Work Center | 主要工作中心 |
| `MainWorkCenterPlant` | String | 4 | Main Work Center Plant | 主要工作中心工厂 |
| `MainWorkCenterInternalID` | String | 8 | Work Center Internal ID | 工作中心内部ID |
| `WorkCenterTypeCode` | String | 2 | Work Center Type | 工作中心类型 |
| `CatalogProfile` | String | 6 | Catalog Profile | 目录配置文件 |
| `CreatedByUser` | String | 12 | Created By | 创建人 |
| `CreationDate` | DateTime | - | Created On | 创建日期 |
| `CreationTime` | Time | - | Created At | 创建时间 |
| `LastChangedByUser` | String | 12 | Last Changed By | 最后更改人 |
| `LastChangeDate` | DateTime | - | Last Changed On | 最后更改日期 |
| `LastChangeTime` | Time | - | Last Changed At | 最后更改时间 |
| `ChangedDateTime` | DateTimeOffset | - | Changed Date/Time | 更改日期时间 |
| `IsDeleted` | Boolean | - | Deletion Indicator | 删除标识 |

---

## API 信息 / API Information

| 项目 | 值 |
|------|-----|
| API 名称 | API_DEFECT |
| API 版本 | 1.5.0 |
| 状态 | ACTIVE |
| 协议 | OData V4 |
| 服务根路径 | `/sap/opu/odata4/sap/defect/srvd_a2x/sap/defect/0001/` |
| 通信场景 | SAP_COM_0221 |
| 主实体 | A_Defect |