Aiden WMS

Stock Transfer from WMS managed warehouses

TL;DR — Aiden WMS Stock Transfer External Outbound Mapper
  • Purpose: Convert a SAP B1 Stock Transfer Request (or stock transfer doc) into a WMS OutgoingDocument so stock is picked from the from-warehouse and sent to the to-warehouse. Base handling is Manual; partial delivery is disabled.

  • Flow & Correlation: B1 STR on Kafka → mapper builds WMS OutgoingDocument → publishes to WMS → correlation.correlationId is set from the Kafka message key for end‑to‑end tracing.

  • Inputs:

    • Header: DocNum/DocEntry, DueDate, DocumentStatus, DocObjectCode, FromWarehouse, ToWarehouse.

    • Lines: LineNum, ItemCode, Quantity, FromWarehouseCode (pick from), WarehouseCode (to), LineStatus, UoMEntry/UoMCode/MeasureUnit, optional dynamic property U_se_winkel for line details.

    • Warehouse master (hourly): WarehouseCode, U_AEN_WHS_Picking (Y/N) to derive targetIsExternal.

  • Warehouse direction (critical):

    • lines[].warehouseId = FromWarehouseCode (pick location).

    • lines[].customFields.toWarehouse = WarehouseCode (destination).

    • Business partner on header = to-warehouse.

  • Business partner (destination):

    • businessPartnerId = first line’s WarehouseCode.

    • name = “To Warehouse ” + that code.

    • B1 CardCode/CardName are not used.

  • Base type mapping (data.baseType):

    • DocObjectCode 1250000001 → TransferRequest.

    • DocObjectCode oOrders → SalesOrder.

    • Otherwise → Unknown Type.

  • targetIsExternal flag (customFields.targetIsExternal):

    • Look up destination WarehouseCode in master:

      • U_AEN_WHS_Picking = N → Y (treat destination as external).

      • U_AEN_WHS_Picking = Y → N.

  • Statuses:

    • Header: data.status = DocumentStatus without “bost_”.

    • Lines: lines[].status = LineStatus without “bost_”, with “Close” normalized to “Closed”.

  • UoM per line (uomCode):

    • If UoMEntry != -1 → use UoMCode.

    • If UoMEntry = -1 → use “m” + MeasureUnit (empty measure → “m”).

  • Dates, handling, defaults:

    • data.pickDate = DueDate; lines[].receiveDate = DueDate.

    • data.handling = Manual.

    • data.partialDelivery = false; lines[].partialDelivery = false.

    • data.address.addressId = Transfer.

    • data.customFields.objectType = StockTransferRequests.

    • data.documentId = DocNum; data.customFields.externalId = DocEntry.

  • Line details:

    • If a line has dynamic property name U_se_winkel, map its value to lines[].details.

  • Not covered / caveats: No CardCode/CardName BP mapping; no full ship‑to address; prices/bins/serials/batches not mapped; header status only strips prefix (Close→Closed applies to lines); don’t confuse with the IncomingDocument flow (stocktransfer-external-wms) which uses from‑warehouse as BP.

  • E2E expectation: STR created in B1 → published to Kafka → mapper builds OutgoingDocument with pick-from and to-warehouse context + targetIsExternal → WMS picks in from‑warehouse and labels destination appropriately → downstream flows use objectType/targetIsExternal → trace via correlation id, DocNum, and DocEntry.

  • Consultant checklist:

    • Use DocObjectCode 1250000001 for STR so baseType = TransferRequest.

    • Set U_AEN_WHS_Picking correctly; non‑picking destination should yield targetIsExternal = Y.

    • Train users: pick warehouse = from; partner/to‑warehouse = to.

    • Maintain UoM; understand -1 → “m” + MeasureUnit fallback.

    • Populate U_se_winkel on lines if WMS operators need line details.

Functional documentation for the Aiden WMS stock transfer external outbound mapper.

This document describes what happens after the mapper is installed: how a SAP Business One (B1) Stock Transfer Request becomes a WMS OutgoingDocument for picking toward another (often external / non-picking) warehouse, which fields are mapped, and which business rules apply. It is intended for end-users and functional consultants.


1. Overview



Source

SAP B1 stock transfer request / stock transfer document on Kafka

Target

Aiden WMS Outgoing document (OutgoingDocument)

Purpose

Create a WMS outbound pick document so stock can be picked in the from warehouse and sent to the to warehouse

After installation, when a B1 stock transfer request is published, the mapper produces a WMS document with:

  • Document identity and base type (typically TransferRequest)

  • A synthetic business partner representing the destination (to) warehouse

  • Pick date, handling mode, status

  • Lines to pick from the from warehouse, with destination stored on the line

  • Flag targetIsExternal based on whether the destination warehouse is picking-enabled in B1

  • Correlation id for tracking

Fixed / default values

WMS field

Value

Meaning

data.handling

Manual

Manual handling in WMS

data.partialDelivery / line partialDelivery

false

Partial delivery not enabled by this map

address.addressId

Transfer

Fixed address id label

customFields.objectType

StockTransferRequests

Always this object type label


2. What the mapper uses as input

2.1 Main payload — B1 stock transfer document

Typical fields used:

  • Header: DocNum, DocEntry, DueDate, DocumentStatus, DocObjectCode, FromWarehouse, ToWarehouse, …

  • Lines StockTransferLines[]:

    • LineNum, ItemCode, Quantity

    • FromWarehouseCode (pick from)

    • WarehouseCode (destination to)

    • LineStatus, UoMEntry, UoMCode, MeasureUnit

    • Optional dynamic line property (name/value); name U_se_winkel is used for line details

DocNum is also used as the integration external application id for monitoring.

2.2 Warehouse master (automatic, hourly)

Loaded from B1:

  • WarehouseCode

  • U_AEN_WHS_Picking (Y / N)

  • (also retrieved: DefaultBin, EnableBinLocations)

Business impact: destination warehouse picking flag drives WMS customFields.targetIsExternal (Y/N). Downstream flows (e.g. goods delivery) may use this flag to choose B1 stock transfer vs WMS incoming paths.

2.3 Correlation id

Integration message key → correlation.correlationId.


3. Business behavior

3.1 Direction of warehouses (critical)

Concept

B1 field

WMS field

Pick from

Line FromWarehouseCode

lines[].warehouseId

Ship / transfer to

Line WarehouseCode

lines[].customFields.toWarehouse

Partner on document

First line to warehouse

businessPartner (see below)

This is the opposite partner convention of the “external → WMS incoming” mapper (which uses from-warehouse as BP). Here the outgoing document is oriented as: pick in from-WH, deliver toward to-WH.

3.2 Business partner = to warehouse

WMS field

Rule

data.businessPartner.businessPartnerId

First line’s WarehouseCode (to warehouse)

data.businessPartner.name

Literal To Warehouse + that same code

Example: first line to warehouse 04 → BP id 04, name To Warehouse 04.

B1 CardCode / CardName are not used for these BP fields.

3.3 Base type

data.baseType comes from B1 DocObjectCode:

B1 DocObjectCode

WMS baseType

oOrders

SalesOrder

1250000001

TransferRequest

Other

Unknown Type

Stock transfer requests typically use 1250000001TransferRequest.

3.4 Target is external (targetIsExternal)

data.customFields.targetIsExternal is set to Y or N by looking up the destination warehouse (line WarehouseCode) in the warehouse master and reading U_AEN_WHS_Picking:

Destination warehouse U_AEN_WHS_Picking

Typical targetIsExternal

Not picking (N) / treated as external path

Y

Picking-enabled (Y)

N

(Implementation uses if-else / equal against warehouse codes and picking flags, with constants Y/N.)

Consultant meaning: if the to warehouse is not a normal Aiden picking warehouse, the target is flagged external so other integrations know how to complete the move (e.g. post B1 stock transfer vs create WMS incoming).

3.5 Status

Level

B1 field

Transformation

WMS field

Header

DocumentStatus

Strip prefix bost_

data.status (e.g. Open / Close)

Line

LineStatus

Strip bost_, then CloseClosed

lines[].status

B1 line value

WMS line status

bost_Open

Open

bost_Close

Closed

3.6 Unit of measure

For each line:

  1. If UoMEntry is not -1 → use UoMCode

  2. If UoMEntry is -1 → use "m" + MeasureUnit (missing measure → empty → often just m)

3.7 Dates and handling

WMS field

Source

data.pickDate

DueDate

lines[].receiveDate

DueDate

data.handling

Constant Manual

partialDelivery (header + lines)

Constant false

3.8 Line details (U_se_winkel)

If a line dynamic property has name U_se_winkel, its value is mapped to lines[].details.

This is hard-coded in the mapping (not a free config property in this project).

3.9 Address

data.address.addressId is constant Transfer (no full ship-to address block from B1 in this map).


4. Field mapping tables

Columns: WMS output field | B1 / source input | What happens | Notes

4.1 Correlation

WMS output field

B1 / source input

What happens

Notes

correlation.correlationId

Integration message key

Direct

Tracing

4.2 Document header (data)

WMS output field

B1 / source input

What happens

Notes

data.documentId

DocNum

Direct


data.baseType

DocObjectCode

Valuemap — see §3.3

Often TransferRequest

data.pickDate

DueDate

Direct


data.handling

Constant Manual


data.status

DocumentStatus

Strip bost_


data.partialDelivery

Constant false


data.address.addressId

Constant Transfer


data.customFields.externalId

DocEntry

Direct


data.customFields.objectType

Constant StockTransferRequests


data.customFields.targetIsExternal

Dest. WH U_AEN_WHS_Picking

Y / N

See §3.4

4.3 Business partner (to warehouse)

WMS output field

B1 / source input

What happens

Notes

data.businessPartner.businessPartnerId

First line WarehouseCode

first-items

To warehouse

data.businessPartner.name

To Warehouse + first WarehouseCode

concat + first-items

Synthetic

B1 CardCode / CardName

Not used for BP


4.4 Lines (data.lines[])

WMS output field

B1 / source input

What happens

Notes

lines[].documentLine

LineNum

Direct


lines[].customFields.lineNum

LineNum

Direct


lines[].warehouseId

FromWarehouseCode

Direct

From / pick warehouse

lines[].customFields.toWarehouse

WarehouseCode

Direct

To warehouse

lines[].itemId

ItemCode

Direct


lines[].quantity

Quantity

Direct


lines[].uomCode

UoMEntry, UoMCode, MeasureUnit

Conditional — §3.6


lines[].status

LineStatus

Strip bost_ + CloseClosed


lines[].receiveDate

Header DueDate

Direct


lines[].partialDelivery

Constant false


lines[].details

Property U_se_winkel when present

if-else / equal on property name

Optional


5. Value translations (reference)

5.1 Doc object code → baseType

B1 DocObjectCode

WMS baseType

oOrders

SalesOrder

1250000001

TransferRequest

Other

Unknown Type

5.2 Status (lines)

B1

WMS

bost_Open

Open

bost_Close

Closed

5.3 Constants

Constant

Usage

Manual

handling

false

partialDelivery

Transfer

address.addressId

StockTransferRequests

customFields.objectType

To Warehouse

BP name prefix

U_se_winkel

Line detail property name

Y / N

targetIsExternal

m / -1

UoM fallback


6. What is not mapped / caveats

Topic

Behavior

B1 card as BP

Not used; to-warehouse is BP

Full ship-to address

Only fixed addressId = Transfer

Serial/batch arrays on B1 lines

Not expanded into WMS batch/serial line structures here

Bin allocations

Not mapped on outgoing WMS lines

Prices

Not mapped

Header status Close→Closed

Header only strips bost_; line status applies Close→Closed valuemap

Opposite flow

External incoming STR uses a different project (stocktransfer-external-wms) with IncomingDocument and from-warehouse BP


7. Example (from mapping sample)

B1 input (excerpt)

Field

Example

DocNum / DocEntry

24

DueDate

2025-10-16T00:00:00Z

DocumentStatus

bost_Open

DocObjectCode

1250000001

FromWarehouse / ToWarehouse

01 / 04

Line

Item A00001, qty 1, from 01, to 04, UoMEntry -1, LineStatus bost_Open

Warehouse master (excerpt)

Warehouse

U_AEN_WHS_Picking

01

Y

04

N

Expected WMS shape (from mapping rules)

WMS field

Expected

Endpoint

OutgoingDocument

data.documentId

24

data.baseType

TransferRequest

BP id / name

04 / To Warehouse 04

pickDate

2025-10-16T00:00:00Z

handling

Manual

status

Open

customFields.objectType

StockTransferRequests

customFields.externalId

24

customFields.targetIsExternal

Y (destination 04 is not picking)

Line warehouseId

01 (from)

Line customFields.toWarehouse

04

Line item / qty

A00001 / 1

Line uomCode

m (manual UoM)

Line status

Open


8. End-to-end expectation

  1. B1 creates a stock transfer request from an internal picking warehouse to another (often external) warehouse.

  2. Document is published to Kafka.

  3. Integration loads warehouse picking flags and maps to WMS OutgoingDocument.

  4. WMS picks from from warehouse; destination is carried as to-warehouse / external flag.

  5. Downstream confirmation flows use objectType / targetIsExternal as designed.

  6. Trace with correlation id, DocNum, and DocEntry.


9. Implementation checklist for consultants

  1. Use DocObjectCode 1250000001 for STRs so baseType = TransferRequest.

  2. Set U_AEN_WHS_Picking correctly: destination non-picking warehouses should yield targetIsExternal = Y.

  3. Train users: WMS pick warehouse = from; partner/to-warehouse = to.

  4. Maintain UoM; know -1m + measure unit fallback.

  5. If shop/line text is needed, fill B1 line property U_se_winkel.

  6. Do not confuse this project with stocktransfer-external-wms (IncomingDocument / from-warehouse BP).

  7. Trace with correlation id + DocEntry/DocNum.


10. Source artifacts

Artifact

Role

mappings/stocktransfer-wms-external/stocktransfer-wms-external.mfd

MapForce mapping

mappings/aiden-wms-stocktransfer-wms-external.mfp

MapForce project

mappings/stocktransfer-wms-external/input_stocktransfer-wms-external.schema.json

B1 input contract

mappings/stocktransfer-wms-external/output_order_document.schema.json

WMS outgoing contract

mappings/stocktransfer-wms-external/intermediate.warehouses.schema.json

Warehouse master

src/.../route/MainRoutes.java

Kafka in/out, OutgoingDocument

src/.../route/ConfigurationRoute.java

Hourly warehouse load

src/.../mapper/Mapper.java

MapForce runner


Generated from the mapping definition and integration routes in this project. If the MapForce mapping or warehouse rules change, update this document.


Maintaining this document

For the original documentation intent, when to update, source-of-truth checklist, and a ready-made refresh prompt, see README.md and the repository AGENTS.md.