# CO_MMCM_ESR_PURG_PRICING_COND

**SOAP v1.0.0 — ACTIVE**

## Title / 标题
**Condition Record for Pricing in Purchasing - Replicate / 采购定价条件记录 - 复制**

## Operation / 操作
`ConditionRecordPricingPurchasingReplicateOut`

---

## Description / 描述
Replicate condition records for pricing that are used in Purchasing using this asynchronous outbound service.

使用此异步出站服务复制采购中使用的定价条件记录。

---

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

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `ConditionRecord` | `PRICING_COND` | Pricing condition record header | 定价条件记录抬头 |
| `?ConditionType` | `CHAR(4)` | Condition type (e.g. PB00, RA00) | 条件类型（如 PB00、RA00） |
| `?ConditionTable` | `CHAR(3)` | Condition table | 条件表 |
| `?ConditionRate` | `DECIMAL` | Condition rate / amount | 条件费率/金额 |
| `?ConditionCurrency` | `CUKY(5)` | Condition currency | 条件货币 |
| `?ScaleQuantity` | `DECIMAL` | Scale quantity | 阶梯数量 |
| `?ScaleUnit` | `CHAR(3)` | Scale unit of measure | 阶梯单位 |
| `?ValidFrom` | `DATE` | Validity start date | 有效期起始日期 |
| `?ValidTo` | `DATE` | Validity end date | 有效期结束日期 |
| `?Supplier` | `CHAR(10)` | Supplier account number | 供应商账户号 |
| `?Material` | `CHAR(40)` | Material number | 物料编号 |
| `?Plant` | `CHAR(4)` | Plant | 工厂 |
| `?PurchasingOrg` | `CHAR(4)` | Purchasing organization | 采购组织 |
| `?PricingScale` | Table | Pricing scale levels | 定价阶梯级别 |
| `?ScaleQuantity` | `DECIMAL` | Scale base quantity | 阶梯基准数量 |
| `?ScaleRate` | `DECIMAL` | Scale condition rate | 阶梯条件费率 |

### Response / 响应
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `Return` | `BAPIRETURN` | Application log message | 应用程序日志消息 |
| `?Type` | `CHAR(1)` | Message type (S/E/W/I) | 消息类型（成功/错误/警告/信息） |
| `?Message` | `CHAR(220)` | Message text | 消息文本 |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ConditionRecordPricingPurchasingReplicateOut>
      <ConditionRecord>
        <ConditionType>PB00</ConditionType>
        <ConditionTable>005</ConditionTable>
        <ConditionRate>150.00</ConditionRate>
        <ConditionCurrency>CNY</ConditionCurrency>
        <ValidFrom>2026-01-01</ValidFrom>
        <ValidTo>2026-12-31</ValidTo>
        <Supplier>0010001000</Supplier>
        <Material>M-10001</Material>
        <Plant>1000</Plant>
        <PurchasingOrg>1000</PurchasingOrg>
      </ConditionRecord>
      <PricingScale>
        <item>
          <ScaleQuantity>100</ScaleQuantity>
          <ScaleRate>145.00</ScaleRate>
        </item>
        <item>
          <ScaleQuantity>500</ScaleQuantity>
          <ScaleRate>140.00</ScaleRate>
        </item>
      </PricingScale>
    </ConditionRecordPricingPurchasingReplicateOut>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ConditionRecordPricingPurchasingReplicateOutResponse>
      <Return>
        <Type>S</Type>
        <Message>Condition record replicated / 条件记录已复制</Message>
      </Return>
    </ConditionRecordPricingPurchasingReplicateOutResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `PRC_001` | Invalid condition type | 无效的条件类型 |
| `PRC_002` | Missing condition table key | 缺少条件表键值 |
| `PRC_003` | Duplicate condition record | 重复的条件记录 |
| `PRC_004` | Validity date overlap | 有效期日期重叠 |

---

## Notes / 备注
- Supports condition types PB00 (gross price), RA00 (discount), and others / 支持条件类型 PB00（总价）、RA00（折扣）等
- Scale pricing levels are optional / 阶梯定价级别为可选项
- The service replicates purchasing pricing condition records to external systems / 该服务将采购定价条件记录复制到外部系统