Lot attribute source mapping
The lot attribute source mapping feature defines how lot attribute values and lot attribute requirements are automatically populated from business documents. It allows you to link a lot attributes to a specific field in a purchase order, production order, or sales order, so that the system can copy the relevant value without manual input.
Set up automatic inheritance of lot attribute values
Lot attributes are used to store additional information for lot-tracked items, such as supplier details, order references, or production data. By default, these values must be entered manually when a lot number is assigned.
This feature enables you to configure lot attributes, allowing their values to be automatically inherited from the source document, such as a purchase order or production order. Once configured, the system copies values from the selected document into the corresponding lot attributes at the moment the lot number is assigned, reducing manual entry and improving data consistency.
When a sales order is created through the Aptean Contract Management extension or a released production order is created through the Aptean Shop Floor Production (BC) extension, lot attribute source mapping is not applied. The system does not support automatic inheritance of lot attributes in these scenarios, and values must be reviewed or entered manually if required.
To configure automatic inheritance for a lot attribute, follow these steps:
- Open the Lot Attributes page.
-
Select a lot attribute of a supported type. Automatic inheritance can be configured for the following attribute types:
- Text
- Integer
- Decimal
- Date
- Lookup
Option attributes do not support automatic inheritance.
-
On the action bar, select Source Mapping. The Lot Attribute Source Mapping page opens.
-
Fill in the required field values. Each line represents a mapping rule that directs the system where to pick a value from, when to copy it, and which lot attribute it applies to.
Field Description Entry No. Specifies the processing sequence when multiple mappings exist for the same lot attribute and source document. Lower numbers are processed first. Lot Attribute ID Specifies the unique identifier of the lot attribute. This value is system-assigned and is used internally to link the mapping to a specific lot attribute. Lot Attribute Name Specifies the name of the lot attribute that receives the value. This helps to identify which attribute is being populated from the source document. Lot Attribute Type Specifies the data type of the lot attribute, such as decimal, text, integer or date. Source Document Select whether the value should be copied from a purchase, released production, or sales order. Target Table Select the required value to define when the system attempts to copy the value. The available options are: Lot Attribute Value: Use this option for purchase and released production orders. The system updates the lot attribute value when the lot number is assigned and whenever the selected field value changes. Lot Attribute Filter Requirement: Use this option for sales orders. The system updates the lot attribute requirement whenever the selected field value changes. This is the only available option for sales orders. Source Table ID Specifies the table that provides the source value for the lot attribute. The selected table determines whether the value is taken from the document header or from a document line. The available tables depend on the selected document source: - Purchase order: Tables 38 (Purchase Header), 39 (Purchase Line), 336(Tracking Specification).
- Production order: Tables 5405, 5406, 336(Tracking Specification).
- Sales order: Tables 36 (Sales Header) and 37 (Sales Line).
Source Table Name Specifies the name of the source table, such as sales line or sales header, to clarify where the value originates. Source Field ID Select the field whose value should be copied into the lot attribute. The available fields depend on the selected lot attribute type. For example, when the lot attribute is of type Date, it can only be mapped to a field of type Date. Source Field Name Specifies the name of the source field whose value is copied into the lot attribute, such as amount, line no., or order date. -
Repeat the steps for other lot attributes, if required.
When a lot number is assigned to a purchase or production document, the configured lot attributes are filled automatically based on the defined mapping. When an item is selected on a sales order line and/or a field value is modified on a sales header or sales line, the lot attribute requirement values are filled automatically based on the defined mappings.When copying Date or Decimal values into a Text lot attribute, the value is stored using the language and regional settings of the user who creates the lot. This results in displaying values in a different format, which can lead to incorrect results when filtering or searching on lot attribute values.
Automatic lot attribute assignment on purchase and production orders
To automatically assign lot attribute values on purchase and production orders, follow these steps:
- Create a purchase order or production order.
- Add a lot-tracked item with a lot attribute template.
- Open Item Tracking Lines page.
- Assign a new lot number by executing the Assign Lot No. action.
The system creates the lot and inserts lot attributes based on the item’s lot attribute template. When the lot number is created, the system:- Skips attributes with fixed values or unsupported types.
- Copies value from mapped source fields based on the document type.
- Evaluates attributes with conditions and copies values from the relevant source tables.
- Stores the values as lot attribute values for the lot.
Lot attributes with fixed values in the item template are not copied from source documents.
Update lot attribute values on modification
When a mapped source field value is modified on a purchase order or production order after a lot has already been assigned, the system automatically updates the corresponding lot attribute values. This applies only when the Target Table field value on the Lot Attribute Source Mapping page is set to Lot Attribute Value.
The system updates only lot attributes that meet the following conditions:
- The value was originally populated through a source mapping.
- An active ot ttribute alue source mapping exists for the modified field.
Multiple source mappings for a lot attribute
If multiple source mappings are configured for the same lot attribute and source document, the system processes them in a defined order to determine which value to assign.
- If multiple source mappings are configured for the same lot attribute and the same source document, the system processes them in the Entry No. field value order on the Lot Attribute Source Mapping page.
- The system attempts to assign the value using the first mapping.
- If no value is found or the field value is blank, the system continues with the next mapping.
- When a value is assigned, the system stops further processing for that lot attribute.
For example, if a lot attribute is mapped to the requested receipt date from the purchase header in entry 1, and the planned receipt date from the purchase line in entry 2, then:
- If the Requested Receipt Date field value is blank in the purchase header, the system attempts to assign the planned receipt date from the purchase line.
- If a value is found, it is applied, and no further mappings are evaluated.
Automatic lot attribute requirement assignment on sales orders
When you add an item to a sales order line or modify any of the sales order fields (header or line) the system automatically applies sales order-related values as lot attribute requirements. These requirements restrict lot selection so that only lots matching the required characteristics can be assigned to the sales line.
Field values such as Planned Delivery Date and Customer City are inherited from the sales order and enforced during lot assignment.
Automatic creation of lot attribute requirements
When an item is inserted on a sales order line, the system:
- Creates lot attribute requirement records based on the item’s lot attribute template.
- Evaluates each applicable lot attribute individually.
The system automatically sets the following values:
- The Production Date field value is updated with the planned delivery date from the sales line.
- The Customer City field value is updated with the sell-to city from the sales order header.
Update lot attribute requirements on modification
When a mapped source field value is modified on a sales order header or line before a lot is assigned, the system automatically updates the corresponding lot attribute requirement. This applies only when the Target Table field on the Lot Attribute Source Mapping page is set to Lot Attribute Filter Requirement.
The system updates only lot attributes that meet the following conditions:
- The value was originally populated through a source mapping.
- An active ot ttribute Filter Requirement source mapping exists for the modified field.
Restrictions after lot assignment
After a lot is assigned to the sales line, it is no longer possible to change the lot attribute requirement values, as they might conflict with the lot attributes of already assigned lots. This is an existing business rule in the Aptean Advanced Attribute extension that also applies to lot attributes that have source mapping set up. If a lot number is already assigned in the tracking of a sales order, and the user would modify a field that is set up as a source mapping, an error is displayed indicating the lot number should be removed from the tracking line.
- Source mapping is not applied when a sales order is created from contracts, quotes, or blanket orders.
- If a lot attribute requirement already contains a value, changes to the source document field automatically update the requirement. This does not apply to fixed values or contracts.