Aiden WMS

Production Order

TL;DR — Aiden WMS Production Order Mappers (Outbound)
  • Purpose: Turn SAP B1 Production Orders into WMS work:

    • Issue-to-production picking (components) → OutgoingDocument.

    • Receipt-from-production (finished goods) → IncomingDocument.

  • When documents are created:

    • If any component line’s warehouse has U_AEN_WHS_Picking = Y → create OutgoingDocument (picking).

    • If the header warehouse is released for receiving (U_AEN_ReleasedForReceiving) → create IncomingDocument (receiving).

    • If both apply → emit both documents.

    • If neither applies → emit nothing.

    • Warehouse configuration is refreshed hourly; decisions rely on current SAP warehouse flags.

  • Enrichment used by the mappers:

    • Warehouses: WarehouseCode, DefaultBin, EnableBinLocations, U_AEN_WHS_Picking (hourly load).

    • Items for component lines: ItemCode, InventoryItem, InventoryUOM (per-message) to refine uomCode on pick lines.

  • Routing & preconditions:

    • Store the original order, evaluate picking/receiving eligibility, then run the appropriate mapper(s).

    • correlation.correlationId is copied from the Kafka message key into every emitted WMS document.

  • Receipt From Production → IncomingDocument (finished product):

    • Header:

      • data.documentId ← DocumentNumber (as text).

      • data.baseType = ProductionOrder; data.status = Open.

      • Business partner: businessPartnerId ← ItemNo; name ← ProductDescription.

      • data.receiveDate ← DueDate; data.details includes remarks (PickRemarks/remarks).

      • customFields.externalId ← AbsoluteEntry; customFields.objectType = ProductionOrders.

    • Lines (single-line receipt of finished item):

      • warehouseId ← Header Warehouse.

      • itemId ← Header ItemNo.

      • quantity ← PlannedQuantity.

      • uomCode ← InventoryUOM (or UoMEntry fallback).

      • receiveDate ← DueDate.

      • documentLine and customFields.lineNum are generated/retained.

  • Issue To Production → OutgoingDocument (component picks):

    • Header:

      • data.documentId ← DocumentNumber (as text).

      • data.baseType = ProductionOrder; data.status = Open.

      • businessPartnerId ← ItemNo; name ← ProductDescription.

      • data.address.addressId = Production (fixed).

      • data.pickDate ← StartDate; data.details ← PickRemarks.

      • customFields.externalId ← AbsoluteEntry; customFields.objectType = ProductionOrders.

    • Lines (one per component line that lives in a picking-enabled warehouse):

      • documentLine and customFields.lineNum ← ProductionOrderLines[].LineNumber.

      • warehouseId ← ProductionOrderLines[].Warehouse.

      • itemId ← ProductionOrderLines[].ItemNo.

      • quantity ← ProductionOrderLines[].PlannedQuantity.

      • uomCode ← Enriched InventoryUOM or line UoM fallback.

      • pickDate ← ProductionOrderLines[].StartDate.

      • details ← ProductionOrderLines[].LineText.

      • customFields.productionOrderIssueType ← ProductionOrderLines[].ProductionOrderIssueType.

  • What implementers should expect:

    • WMS picking work is driven by component warehouses flagged U_AEN_WHS_Picking = Y.

    • WMS receiving work is driven by the production header warehouse and the “released for receiving” flag.

    • Both documents can be produced from the same production order if both conditions are met.

    • Every WMS document includes externalId (AbsoluteEntry), objectType = ProductionOrders, and correlation.correlationId for reliable traceability back to SAP.

This integration receives SAP Business One production orders and maps them to Aiden WMS document messages. The incoming SAP production order is checked against SAP warehouse configuration before any WMS document is emitted.

Input condition

Mapper result

Target endpoint header

At least one production component line is in a warehouse flagged for picking

Issue-to-production picking document

OutgoingDocument

Header production warehouse is released for receiving

Receipt-from-production receiving document

IncomingDocument

Both conditions are true

Two WMS documents are emitted from the same production order

OutgoingDocument and IncomingDocument

Neither condition is true

No WMS document is emitted

None

Warehouse configuration is refreshed hourly from SAP Business One:

Warehouses?$select=WarehouseCode,DefaultBin,EnableBinLocations,U_AEN_WHS_Picking

For issue-to-production, item master data is also fetched from SAP Items for the production-order component lines, selecting ItemCode, InventoryItem, and InventoryUOM. This enriches WMS line UOM behavior.

The checked-in output_*.json files show the target shape, but the generated MapForce Java under mappings/output/com/mapforce/ is the source of truth for current field behavior.

Routing And Preconditions

The route stores the original production order, runs a picking/receiving check, then conditionally invokes one or both mappers.

Input field or lookup

Output decision

Business rule

U_AEN_ReleasedForReceiving

Receiving eligibility

Receiving can be created when the production order is released for receiving.

Header Warehouse matched to SAP WarehouseCode

Receiving warehouse match

Header warehouse is used to decide whether a receipt document is relevant.

ProductionOrderLines[].Warehouse matched to SAP WarehouseCode

Picking warehouse match

Component line warehouses are checked individually.

Matching warehouse U_AEN_WHS_Picking = "Y"

Picking eligibility

If any component line warehouse is picking-enabled, an OutgoingDocument is created.

Kafka message key

correlation.correlationId

The same correlation id is copied into every created WMS document.

Receipt From Production

The receipt mapper creates an IncomingDocument for the finished product. It represents the expected receipt of the production order header item into WMS.

SAP production order input

WMS output

Business rule

Kafka message key

correlation.correlationId

Preserves message traceability.

DocumentNumber

data.documentId

Converted to text for the WMS document id.

Constant

data.baseType = "ProductionOrder"

Marks the WMS document as production-order based.

ItemNo

data.businessPartner.businessPartnerId

Finished item code is used as the WMS business partner id.

ProductDescription

data.businessPartner.name

Finished item description is used as the business partner name.

DueDate

data.receiveDate

Due date becomes the expected receive date.

Constant

data.status = "Open"

New WMS document is opened for processing.

PickRemarks / remarks fields

data.details

Production remarks are carried as operational details where present.

AbsoluteEntry

data.customFields.externalId

SAP production order entry is retained for later callback/mapping.

Constant

data.customFields.objectType = "ProductionOrders"

Identifies the source object type for return flows.

Lines

SAP production order input

WMS output

Business rule

Header Warehouse

data.lines[].warehouseId

The finished product is received into the production order header warehouse.

Header ItemNo

data.lines[].itemId

The finished product becomes the receipt line item.

PlannedQuantity

data.lines[].quantity

Planned production quantity becomes the expected receipt quantity.

InventoryUOM or UoMEntry fallback

data.lines[].uomCode

Mapper uses available SAP UOM information for WMS.

DueDate

data.lines[].receiveDate

Line receive date follows the production due date.

Generated line number

data.lines[].documentLine and customFields.lineNum

WMS line numbering is generated while retaining the source line number in custom fields.

Issue To Production

The issue mapper creates an OutgoingDocument for components that WMS must pick for production. Before mapping, the route enriches production-order component items with SAP item master data.

Header

SAP production order input

WMS output

Business rule

Kafka message key

correlation.correlationId

Preserves message traceability.

DocumentNumber

data.documentId

Converted to text for the WMS document id.

Constant

data.baseType = "ProductionOrder"

Marks the WMS document as production-order based.

ItemNo

data.businessPartner.businessPartnerId

Finished item code identifies the production context.

ProductDescription

data.businessPartner.name

Finished item description identifies the production context.

Constant

data.address.addressId = "Production"

Uses a fixed WMS production address.

StartDate

data.pickDate

Start date becomes the expected picking date.

Constant

data.status = "Open"

New WMS picking document is opened.

PickRemarks

data.details

Pick remarks are carried to WMS operators.

AbsoluteEntry

data.customFields.externalId

SAP production order entry is retained for callbacks.

Constant

data.customFields.objectType = "ProductionOrders"

Identifies the source object type for return flows.

Lines

SAP production order input

WMS output

Business rule

ProductionOrderLines[].LineNumber

data.lines[].documentLine and customFields.lineNum

The source production line number is preserved.

ProductionOrderLines[].Warehouse

data.lines[].warehouseId

Component warehouse becomes the picking warehouse.

ProductionOrderLines[].ItemNo

data.lines[].itemId

Component item becomes the WMS item to pick.

ProductionOrderLines[].PlannedQuantity

data.lines[].quantity

Planned component quantity becomes the pick quantity.

Enriched SAP InventoryUOM, or line UOM fallback

data.lines[].uomCode

Inventory item master data can override or supply WMS UOM.

ProductionOrderLines[].StartDate

data.lines[].pickDate

Component start date becomes the line pick date.

ProductionOrderLines[].LineText

data.lines[].details

Line text is carried as WMS line details where present.

ProductionOrderLines[].ProductionOrderIssueType

customFields.productionOrderIssueType

Issue type is preserved for downstream behavior.

What Implementers Can Expect

After installation, released SAP production orders can automatically create WMS work for both sides of production: picking component stock out and receiving the finished product back in. Which document appears depends on warehouse setup. Warehouses marked with U_AEN_WHS_Picking = "Y" drive picking documents. The production-order header warehouse and release-for-receiving flag drive receiving documents.

Every WMS document includes the original SAP production order id in customFields.externalId, the object type ProductionOrders, and the incoming message correlation id. This lets later WMS-to-SAP flows connect picking and receiving results back to the source production order.