Skip to main content

GetProductionOrderDetails@1

Node GetProductionOrderDetails@1 gets production order details from a SAP system with Production Planning and Control (PP) module.

SAP function module: BAPI_PRODORD_GET_DETAIL

Adapter Prerequisites

Node Configuration

For fields path, targetPath, targetValueWriteMode, and targetValueKind, see Overview.

  transformations:
- type: GetProductionOrderDetails@1 # gets the production order details
path: $.OrderNumber # path to the order number
readHeader: true # read the order header
readComponents: false # read the order components
readOperations: true # read the order operations
readPositions: false # read the order positions
readSequences: false # read the order sequences
readSubOperations: false # read the order sub-operations
readTriggerPoints: false # read the order trigger points
readProductionRelevantTools: false # read the production relevant tools
targetPath: $.result # path to save the result

Currently, the node only returns order header and operations. The result object is based on the SAP structures BAPI_ORDER_HEADER1 for order headers and BAPI_ORDER_OPERATION1 for operations. The properties are documented in API documentation:

The result object contains the following properties:

  • Header: Order header
  • Operation: Order operations

Complete sample of pipeline configuration

This sample is triggered from a polling interval of 1 minute, logs in to SAP, and retrieves a list of production orders beginning with order number 3265680 from plant 1010. The result is saved in the $.orders path.

For each order, the node checks if the order status contains REL (for RELEASED). If it does, the node retrieves the order details and saves the result in the $.result path. The node then projects the relevant fields from the order details and flattens the result.

  triggers:
- type: FromPolling@1
interval: 00:01:00
transformations:
- type: SapLogin@1
sapConfiguration: mmtest
- type: GetProductionOrderList@1
productionPlant: 1010
orderNumberStart: 3265680
targetPath: "$.orders"
- type: ForEach@1
path: $.orders
targetPath: $.orders
transformations:
- type: If@1
operator: Contains
value: REL
valueType: STRING
path: $.SystemStatus
transformations:
- type: GetProductionOrderDetails@1
path: $.OrderNumber
readHeader: true
readOperations: true
targetPath: $.result
- type: Project@1
clear: true
fields:
- path: $.result.Header.OrderNumber
inclusion: true
- path: $.result.Operation.SequenceNumber
inclusion: true
- path: $.result.Header.Material
inclusion: true
- path: $.result.Header.MaterialText
inclusion: true
- path: $.result.Header.SystemStatus
inclusion: true
- path: $.result.Operation.WorkCenter
inclusion: true
- path: $.result.Operation.Quantity
inclusion: true
- type: Flatten@1
path: $.orders[*].result
targetPath: $.orders
- type: Project@1
clear: true
fields:
- path: $.orders
inclusion: true
- type: ToPipelineDataEvent@1
description: Load to event hub