# CO_LOGQC_ESR_QCERT_INFO_OUT

**SOAP v1.0.0 — ACTIVE**

## Title / 标题
**Quality Certificate Information - Read (B2B) / 质量证书信息 – 读取（B2B）**

## Operation / 操作
`QualityCertificateInformationOut`

---

## Description / 描述
This asynchronous outbound service reads quality certificate data from SAP S/4HANA Cloud and sends it to external systems. It provides quality certificate information including inspection lot results, certificate types, material specifications, and batch characteristics for outbound deliveries.

该异步出站服务从SAP S/4HANA Cloud读取质量证书数据并将其发送到外部系统。它提供质量证书信息，包括检验批结果、证书类型、物料规格和出库交货的批次特性。

---

## Endpoint / 端点
| Environment | URL |
|-------------|-----|
| Production | `https://sap.example.com/sap/bc/srt/rfc/sap/CO_LOGQC_ESR_QCERT_INFO_OUT` |
| Test | `https://sap-test.example.com/sap/bc/srt/rfc/sap/CO_LOGQC_ESR_QCERT_INFO_OUT` |

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `QualityCertificateInformation` | `QCERT_INFO` | Quality certificate info root | 质量证书信息根节点 |
| `?MessageHeader` | `MSG_HEADER` | Message header | 消息头 |
| `??MessageID` | `UUID` | Unique message identifier | 唯一消息标识符 |
| `??CreationDateTime` | `DATETIME` | Message creation timestamp | 消息创建时间戳 |
| `CertificateHeader` | `QCERT_HEADER` | Certificate header data | 证书抬头数据 |
| `?CertificateNumber` | `CHAR(12)` | Quality certificate number | 质量证书编号 |
| `?CertificateType` | `CHAR(4)` | Certificate type (e.g. QM01) | 证书类型（如QM01） |
| `?CertificateProfile` | `CHAR(10)` | Certificate profile | 证书配置文件 |
| `?Material` | `CHAR(40)` | Material number | 物料编号 |
| `?BatchNumber` | `CHAR(10)` | Batch number | 批次编号 |
| `?InspectionLotNumber` | `CHAR(12)` | Inspection lot number | 检验批编号 |
| `?Plant` | `CHAR(4)` | Plant | 工厂 |
| `?CustomerNumber` | `CHAR(10)` | Customer number for certificate | 证书客户编号 |
| `?CertificateStatus` | `CHAR(1)` | Certificate status | 证书状态 |
| `?CertificateDate` | `DATE` | Certificate creation date | 证书创建日期 |
| `?ValidFromDate` | `DATE` | Certificate valid from date | 证书有效期起始日期 |
| `?ValidToDate` | `DATE` | Certificate valid to date | 证书有效期截止日期 |
| `InspectionResults` | Table | Inspection characteristic results | 检验特性结果 |
| `?CharacteristicName` | `CHAR(30)` | Inspection characteristic name | 检验特性名称 |
| `?CharacteristicDescription` | `CHAR(40)` | Characteristic description | 特性描述 |
| `?ResultValue` | `CHAR(30)` | Inspected result value | 检验结果值 |
| `?TargetValue` | `CHAR(30)` | Target specification value | 目标规格值 |
| `?LowerLimit` | `CHAR(30)` | Lower specification limit | 规格下限 |
| `?UpperLimit` | `CHAR(30)` | Upper specification limit | 规格上限 |
| `?UnitOfMeasure` | `UNIT(3)` | Unit of measure for result | 结果计量单位 |
| `?ResultStatusCode` | `CHAR(1)` | Result status (A=accepted, R=rejected) | 结果状态（A=合格，R=不合格） |
| `?ValuationCode` | `CHAR(4)` | Valuation code | 评估代码 |
| `CertificateRecipients` | Table | Certificate recipients | 证书接收方 |
| `?RecipientNumber` | `CHAR(10)` | Recipient partner number | 接收方伙伴编号 |
| `?RecipientName` | `CHAR(40)` | Recipient name | 接收方名称 |
| `?EmailAddress` | `CHAR(241)` | Recipient email address | 接收方电子邮件地址 |
| `?SendMethod` | `CHAR(1)` | Transmission method (1=email, 2=print) | 传输方式（1=电子邮件，2=打印） |

### Response / 响应
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `Return` | `BAPIRETURN` | Processing result | 处理结果 |
| `?Type` | `CHAR(1)` | Message type (S/E/W/I) | 消息类型（成功/错误/警告/信息） |
| `?Code` | `CHAR(20)` | Message code | 消息代码 |
| `?Message` | `CHAR(220)` | Message text | 消息文本 |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <QualityCertificateInformationOut>
      <QualityCertificateInformation>
        <MessageHeader>
          <MessageID>990e8400-e29b-41d4-a716-446655440004</MessageID>
          <CreationDateTime>2026-07-24T08:00:00Z</CreationDateTime>
        </MessageHeader>
        <CertificateHeader>
          <CertificateNumber>QC20260724001</CertificateNumber>
          <CertificateType>QM01</CertificateType>
          <CertificateProfile>PROF_STD</CertificateProfile>
          <Material>M-10001</Material>
          <BatchNumber>B20260701</BatchNumber>
          <InspectionLotNumber>IL202607001</InspectionLotNumber>
          <Plant>PL01</Plant>
          <CustomerNumber>CUST001</CustomerNumber>
          <CertificateStatus>A</CertificateStatus>
          <CertificateDate>2026-07-24</CertificateDate>
          <ValidFromDate>2026-07-24</ValidFromDate>
          <ValidToDate>2026-12-31</ValidToDate>
        </CertificateHeader>
        <InspectionResults>
          <item>
            <CharacteristicName>DIM_LENGTH</CharacteristicName>
            <CharacteristicDescription>Length (mm)</CharacteristicDescription>
            <TargetValue>100.00</TargetValue>
            <LowerLimit>99.50</LowerLimit>
            <UpperLimit>100.50</UpperLimit>
            <ResultValue>100.02</ResultValue>
            <UnitOfMeasure>MM</UnitOfMeasure>
            <ResultStatusCode>A</ResultStatusCode>
            <ValuationCode>ACC</ValuationCode>
          </item>
          <item>
            <CharacteristicName>HARDNESS</CharacteristicName>
            <CharacteristicDescription>Hardness (HRC)</CharacteristicDescription>
            <TargetValue>45.0</TargetValue>
            <LowerLimit>42.0</LowerLimit>
            <UpperLimit>48.0</UpperLimit>
            <ResultValue>44.5</ResultValue>
            <UnitOfMeasure>HRC</UnitOfMeasure>
            <ResultStatusCode>A</ResultStatusCode>
            <ValuationCode>ACC</ValuationCode>
          </item>
          <item>
            <CharacteristicName>TENSILE_STR</CharacteristicName>
            <CharacteristicDescription>Tensile Strength (MPa)</CharacteristicDescription>
            <TargetValue>500</TargetValue>
            <LowerLimit>480</LowerLimit>
            <UpperLimit>520</UpperLimit>
            <ResultValue>505</ResultValue>
            <UnitOfMeasure>MPA</UnitOfMeasure>
            <ResultStatusCode>A</ResultStatusCode>
            <ValuationCode>ACC</ValuationCode>
          </item>
        </InspectionResults>
        <CertificateRecipients>
          <item>
            <RecipientNumber>CUST001</RecipientNumber>
            <RecipientName>ABC Trading Company</RecipientName>
            <EmailAddress>quality@abctrading.com</EmailAddress>
            <SendMethod>1</SendMethod>
          </item>
        </CertificateRecipients>
      </QualityCertificateInformation>
    </QualityCertificateInformationOut>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <QualityCertificateInformationOutResponse>
      <Return>
        <Type>S</Type>
        <Code>QC_000</Code>
        <Message>Quality certificate info transmitted successfully / 质量证书信息已成功传输</Message>
      </Return>
    </QualityCertificateInformationOutResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `QC_001` | Certificate number not found | 未找到证书编号 |
| `QC_002` | Inspection lot has no released results | 检验批没有已放行的结果 |
| `QC_003` | Certificate type is inactive | 证书类型未激活 |
| `QC_004` | Material batch data not found | 未找到物料批次数据 |
| `QC_005` | Invalid certificate profile | 无效的证书配置文件 |
| `QC_006` | Customer number is not maintained for certificate | 未为客户编号维护证书 |

---

## Notes / 备注
- Quality certificates can be generated for inspection lots and batches / 可为检验批和批次生成质量证书
- The service uses output determination to send certificates to specified recipients / 该服务使用输出确定将证书发送到指定的接收方
- Certificate types are defined in SSCUI 102620 (Define Certificate Type) / 证书类型在SSCUI 102620（定义证书类型）中定义
- Communication scenario: SAP_COM_0270 / 通信场景：SAP_COM_0270
- Results are based on inspection lot characteristic valuations / 结果基于检验批特性评估
