Split Method (ItemCons)
- Last UpdatedNov 06, 2025
- 5 minute read
'Declaration
Public Shared Sub Split( _
ByVal sessionId As Integer, _
ByVal oldRowId As Integer, _
ByVal splitQtyCons As Double, _
ByVal newWoId As String, _
ByVal newOperId As String, _
ByVal newSeqNo As Nullable(Of Integer), _
ByVal newShiftStart As Nullable(Of Date), _
ByVal newItemId As String, _
ByVal newLotNo As String, _
ByVal newFgLotNo As String, _
ByVal newSubLotNo As String, _
ByVal newFgSubLotNo As String, _
ByVal newReasCd As Nullable(Of Integer), _
ByVal newUserId As String, _
ByVal newEntId As Nullable(Of Integer), _
ByVal newShiftId As Nullable(Of Integer), _
ByVal newFromEntId As Nullable(Of Integer), _
ByVal newGenealogyId As String, _
ByVal newUpstreamEventId As String, _
ByVal newSegmentRequirementId As String, _
ByVal newSegmentResponseId As String, _
ByVal splitQtyConsErp As Nullable(Of Double), _
ByVal lastEditAt As Nullable(Of Date) _
)
'Usage
Dim sessionId As Integer
Dim oldRowId As Integer
Dim splitQtyCons As Double
Dim newWoId As String
Dim newOperId As String
Dim newSeqNo As Nullable(Of Integer)
Dim newShiftStart As Nullable(Of Date)
Dim newItemId As String
Dim newLotNo As String
Dim newFgLotNo As String
Dim newSubLotNo As String
Dim newFgSubLotNo As String
Dim newReasCd As Nullable(Of Integer)
Dim newUserId As String
Dim newEntId As Nullable(Of Integer)
Dim newShiftId As Nullable(Of Integer)
Dim newFromEntId As Nullable(Of Integer)
Dim newGenealogyId As String
Dim newUpstreamEventId As String
Dim newSegmentRequirementId As String
Dim newSegmentResponseId As String
Dim splitQtyConsErp As Nullable(Of Double)
Dim lastEditAt As Nullable(Of Date)
ItemCons.Split(sessionId, oldRowId, splitQtyCons, newWoId, newOperId, newSeqNo, newShiftStart, newItemId, newLotNo, newFgLotNo, newSubLotNo, newFgSubLotNo, newReasCd, newUserId, newEntId, newShiftId, newFromEntId, newGenealogyId, newUpstreamEventId, newSegmentRequirementId, newSegmentResponseId, splitQtyConsErp, lastEditAt)
public static void Split(
int sessionId,
int oldRowId,
double splitQtyCons,
string newWoId,
string newOperId,
Nullable<int> newSeqNo,
Nullable<DateTime> newShiftStart,
string newItemId,
string newLotNo,
string newFgLotNo,
string newSubLotNo,
string newFgSubLotNo,
Nullable<int> newReasCd,
string newUserId,
Nullable<int> newEntId,
Nullable<int> newShiftId,
Nullable<int> newFromEntId,
string newGenealogyId,
string newUpstreamEventId,
string newSegmentRequirementId,
string newSegmentResponseId,
Nullable<double> splitQtyConsErp,
Nullable<DateTime> lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- oldRowId
- Required. Holds the row ID of the existing item consumption record whose consumption is being split.
- splitQtyCons
- Required. Holds the consumption quantity to be split. Must be less than or equal to the current quantity for the existing record.
- newWoId
- Optional. Holds the ID of the work order for the new job on which the split consumption was run. Defaults to the value in the existing record.
- newOperId
- Optional. Holds the ID of the operation for the new job on which the split consumption was run. Defaults to the value in the existing record.
- newSeqNo
- Optional. Holds the operation sequence number for the new job on which the split consumption was run. Defaults to the value in the existing record.
- newShiftStart
- Optional. Holds the date/time of the shift during which the split consumption occurred. Defaults to the value in the existing record.
- newItemId
- Optional. Holds the ID of the item consumed in the new split job. Defaults to the value in the existing record.
- newLotNo
- Optional. Holds the lot number for the item consumed in the new split job. Defaults to the value in the existing record.
- newFgLotNo
- Optional. Holds the lot number of the finished goods to which the lot/sublot consumed in the new split job was made. Defaults to the value in the existing record.
- newSubLotNo
- Optional. Holds the sublot number for the item consumed in the new split job. Defaults to the value in the existing record.
- newFgSubLotNo
- Optional. Holds the sublot number of the finished goods to which the lot/sublot consumed in the new split job was made. Defaults to the value in the existing record.
- newReasCd
Optional. Holds the reason code for the quantity consumed in the new split job (consumption code or scrap reason). Defaults to the value in the existing record.
- newUserId
- Optional. Holds the ID of the user responsible for the quantity consumed in the new split job. Defaults to the value in the existing record.
- newEntId
- Optional. Holds the ID of the entity on which the split job was run. Defaults to the value in the existing record.
- newShiftId
- Optional. Holds the ID of the shift during which the split quantity was consumed. Defaults to the value in the existing record.
- newFromEntId
- Optional. Holds the ID of the storage entity from which the split quantity came. Defaults to the value in the existing record.
- newGenealogyId
- Optional. Holds the genealogy ID for the split quantity. Defaults to the value in the existing record.
- newUpstreamEventId
- Optional. Holds the ID of the upstream event for the split quantity. Defaults to the value in the existing record.
- newSegmentRequirementId
- Optional. Holds the segment requirement ID for the split quantity. Defaults to the value in the existing record.
- newSegmentResponseId
- Optional. Holds the segment response ID for the split quantity. Defaults to the value in the existing record.
- splitQtyConsErp
- Optional. Holds the split consumption quantity that has been reported to an ERP system. Defaults to the same ratio of qty_prod as in the existing record.
- lastEditAt
Required. Holds the date and time assigned the last time this record was added or updated, for optimistic concurrency control. The passed value must match the record's lastEditAt value for the record to be updated.
Output. Holds the new date and time to identify this update of this record.
The required fields identify the current row and the quantity to be split. The split quantity must be less than or equal to the qty_cons value in the existing row. (An equal quantity provides a simple way to update the existing row but change some of the primary key values.)
All optional fields default to the value in the existing record, except the split_qty_cons_erp column, which defaults to the same percentage of qty_cons as in the existing record. At least one of the new_* values must be specified to identify the destination record for the split. If a record already exists in the database for the split destination record, then the split quantity will simply be added to the existing record. If any other optional dependent fields are specified, then they will be changed for the split record. Note that this might overwrite existing dependent data for the destination row.
If the wo_id, oper_id, or seq_no change (i.e., indicating a new job) and this job does not exist, then the method will not succeed.
If the New_Shift_Start value is specified, then the New_Shift_Id must also be specified. No validation checks are done on these values.
If the new_item_id value is specified, then it must exist in the database for the method to succeed.
If the new_reas_cd value is specified, then it must exist in the database for the method to succeed. If it exists, then it will be used to determine the grade_cd, status_cd and item_scrapped flag for the split record. The ext_ref, move_status, and spare fields are set to the current values in the existing record. The last_edit_at field of the new record is set to the current date/time.