# CO_LEIDW_WAREHOUSE_SHIP_ORDER

**SOAP v1.5.0 — ACTIVE**

## Title / 标题
**Warehouse Shipping Order – Send to Warehouse (B2B) / 仓库运输订单 – 发送到仓库（B2B）**

## Operation / 操作
`WarehouseShippingOrder_In`

---

## Description / 描述
This asynchronous outbound service informs a third-party logistics provider to send a shipment of product to a buyer. It transmits the warehouse shipping order containing delivery details, items, parties, and deadlines from SAP S/4HANA Cloud to an external warehouse management system.

该异步出站服务通知第三方物流提供商向买方发送产品装运。它将包含交货详情、行项目、参与方和截止日期的仓库运输订单从SAP S/4HANA Cloud传输到外部仓库管理系统。

---

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

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `WarehouseShippingOrder` | `LEIDW_SHIP_ORDER` | Shipping order root | 运输订单根节点 |
| `?MessageHeader` | `MSG_HEADER` | Message header metadata | 消息头元数据 |
| `??MessageID` | `UUID` | Unique message identifier | 唯一消息标识符 |
| `??CreationDateTime` | `DATETIME` | Message creation timestamp | 消息创建时间戳 |
| `Delivery` | `DELIVERY_DATA` | Delivery document data | 交货单据数据 |
| `?DeliveryDocument` | `CHAR(10)` | Outbound delivery number | 出库交货编号 |
| `?DeliveryDocumentItem` | `NUMC(6)` | Delivery item number | 交货行项目编号 |
| `?DeliveryType` | `CHAR(4)` | Delivery type (e.g. LF) | 交货类型（如LF） |
| `?ShippingPoint` | `CHAR(4)` | Shipping point | 装运点 |
| `?WarehouseNumber` | `CHAR(3)` | Warehouse number | 仓库编号 |
| `Party` | Table | Party information | 参与方信息 |
| `?PartyFunction` | `CHAR(2)` | Partner function (SH=shipper, SP=ship-to) | 伙伴功能（SH=发货方，SP=收货方） |
| `?PartyID` | `CHAR(10)` | Partner ID | 伙伴ID |
| `?PartyName` | `CHAR(40)` | Partner name | 伙伴名称 |
| `Deadlines` | `DEADLINE_INFO` | Shipping deadlines | 装运截止日期 |
| `?PlannedGoodsIssueDate` | `DATE` | Planned goods issue date | 计划发货日期 |
| `?PlannedGiTime` | `TIME` | Planned goods issue time | 计划发货时间 |
| `?RequestedDeliveryDate` | `DATE` | Customer requested delivery date | 客户请求交货日期 |
| `DeliveryItem` | Table | Delivery item details | 交货行项目详情 |
| `?ItemNumber` | `NUMC(6)` | Item number | 行项目编号 |
| `?Material` | `CHAR(40)` | Material number | 物料编号 |
| `?MaterialDescription` | `CHAR(40)` | Material description | 物料描述 |
| `?Quantity` | `QUANTITY` | Shipping quantity | 装运数量 |
| `?UnitOfMeasure` | `UNIT(3)` | Unit of measure | 计量单位 |
| `?BatchNumber` | `CHAR(10)` | Batch number | 批次编号 |
| `?StorageLocation` | `CHAR(4)` | Storage location | 存储地点 |
| `References` | Table | Document references | 单据参考 |
| `?ReferenceDocument` | `CHAR(10)` | Reference document (e.g. sales order) | 参考单据（如销售订单） |
| `?ReferenceItem` | `NUMC(6)` | Reference item | 参考行项目 |

### 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 | 消息文本 |
| `?LogID` | `CHAR(32)` | Application log ID | 应用程序日志ID |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <WarehouseShippingOrder_In>
      <WarehouseShippingOrder>
        <MessageHeader>
          <MessageID>770e8400-e29b-41d4-a716-446655440002</MessageID>
          <CreationDateTime>2026-07-24T06:00:00Z</CreationDateTime>
        </MessageHeader>
        <Delivery>
          <DeliveryDocument>80000200</DeliveryDocument>
          <DeliveryType>LF</DeliveryType>
          <ShippingPoint>PL01</ShippingPoint>
          <WarehouseNumber>W01</WarehouseNumber>
        </Delivery>
        <Party>
          <item>
            <PartyFunction>SH</PartyFunction>
            <PartyID>1000</PartyID>
            <PartyName>SAP Shanghai Co., Ltd.</PartyName>
          </item>
          <item>
            <PartyFunction>SP</PartyFunction>
            <PartyID>CUST001</PartyID>
            <PartyName>ABC Trading Company</PartyName>
          </item>
        </Party>
        <Deadlines>
          <PlannedGoodsIssueDate>2026-07-25</PlannedGoodsIssueDate>
          <PlannedGiTime>14:00:00</PlannedGiTime>
          <RequestedDeliveryDate>2026-07-28</RequestedDeliveryDate>
        </Deadlines>
        <DeliveryItem>
          <item>
            <ItemNumber>10</ItemNumber>
            <Material>M-10001</Material>
            <MaterialDescription>Electronic Component X</MaterialDescription>
            <Quantity>500</Quantity>
            <UnitOfMeasure>EA</UnitOfMeasure>
            <BatchNumber>B20260701</BatchNumber>
            <StorageLocation>SL01</StorageLocation>
          </item>
          <item>
            <ItemNumber>20</ItemNumber>
            <Material>M-10002</Material>
            <MaterialDescription>Packaging Material Y</MaterialDescription>
            <Quantity>1000</Quantity>
            <UnitOfMeasure>EA</UnitOfMeasure>
            <StorageLocation>SL02</StorageLocation>
          </item>
        </DeliveryItem>
        <References>
          <item>
            <ReferenceDocument>SO100001</ReferenceDocument>
            <ReferenceItem>10</ReferenceItem>
          </item>
        </References>
      </WarehouseShippingOrder>
    </WarehouseShippingOrder_In>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <WarehouseShippingOrder_InResponse>
      <Return>
        <Type>S</Type>
        <Code>SHIP_000</Code>
        <Message>Shipping order transmitted successfully / 运输订单已成功传输</Message>
      </Return>
    </WarehouseShippingOrder_InResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `SHIP_001` | Delivery document not found | 未找到交货单据 |
| `SHIP_002` | Warehouse number not maintained | 仓库编号未维护 |
| `SHIP_003` | Shipping point is inactive | 装运点未激活 |
| `SHIP_004` | Material not available in sufficient quantity | 物料可用数量不足 |
| `SHIP_005` | Invalid partner function | 无效的伙伴功能 |
| `SHIP_006` | Message header is missing | 缺少消息头 |

---

## Notes / 备注
- This service is part of scope item 3BS (Outbound Delivery to Warehouse) / 该服务是范围项3BS（向仓库的出库交货）的一部分
- Communication scenario: SAP_COM_0440 / 通信场景：SAP_COM_0440
- The WMS must acknowledge receipt using the Warehouse Shipping Advice inbound service / WMS必须使用仓库运输建议入库服务确认接收
- Maximum 999 delivery items per shipping order / 每个运输订单最多999个交货行项目
