AddConsViaDataEntryJob(Int32,Nullable<DateTime>,String,String,DBString,String,String,Nullable<Double>,Nullable<Double>,Nullable<Double>,Nullable<Double>,Nullable<Int32>,Nullable<Boolean>,Nullable<Boolean>,String,String,String,String,String,String,DBString,DBString,DBString,DBString,String,String,DBString,DBString,DBString,Nullable<Double>,String,String,DBString,DBString,DBString,DBString,DBString,String,String,String,String,ExtendedAttribute[],Int32) Method
- Last UpdatedNov 06, 2025
- 5 minute read
The AddConsViaDataEntryJob() method adds consumption for the specified data entry job.
'Declaration
Public Overloads Shared Sub AddConsViaDataEntryJob( _
ByVal sessionId As Integer, _
ByVal eventTime As Nullable(Of Date), _
ByVal itemClassId As String, _
ByVal itemId As String, _
ByVal productionScheduleId As DBString, _
ByVal woId As String, _
ByVal operId As String, _
ByVal batchSize As Nullable(Of Double), _
ByVal startQty As Nullable(Of Double), _
ByVal reqdQty As Nullable(Of Double), _
ByVal targetProdRate As Nullable(Of Double), _
ByVal targetProdRateUom As Nullable(Of Integer), _
ByVal updateInventory As Nullable(Of Boolean), _
ByVal invUniqueByJob As Nullable(Of Boolean), _
ByVal runEntName As String, _
ByVal runEntSiteName As String, _
ByVal reasDesc As String, _
ByVal reasGrpDesc As String, _
ByVal fromEntName As String, _
ByVal fromEntSiteName As String, _
ByVal fromLotNo As DBString, _
ByVal fgLotNo As DBString, _
ByVal fromSubLotNo As DBString, _
ByVal fgSubLotNo As DBString, _
ByVal genealogyId As String, _
ByVal upstreamEventId As String, _
ByVal segmentRequirementId As DBString, _
ByVal segmentResponseId As DBString, _
ByVal subsegmentId As DBString, _
ByVal qtyCons As Nullable(Of Double), _
ByVal consQtyUom As String, _
ByVal userId As String, _
ByVal comments As DBString, _
ByVal spare1 As DBString, _
ByVal spare2 As DBString, _
ByVal spare3 As DBString, _
ByVal spare4 As DBString, _
ByVal eventName As String, _
ByVal personnelList As String, _
ByVal serialNoList As String, _
ByVal grpDesc As String, _
ByVal extendedConsAttrs() As ExtendedAttribute, _
ByRef rowId As Integer _
)
'Usage
Dim sessionId As Integer
Dim eventTime As Nullable(Of Date)
Dim itemClassId As String
Dim itemId As String
Dim productionScheduleId As DBString
Dim woId As String
Dim operId As String
Dim batchSize As Nullable(Of Double)
Dim startQty As Nullable(Of Double)
Dim reqdQty As Nullable(Of Double)
Dim targetProdRate As Nullable(Of Double)
Dim targetProdRateUom As Nullable(Of Integer)
Dim updateInventory As Nullable(Of Boolean)
Dim invUniqueByJob As Nullable(Of Boolean)
Dim runEntName As String
Dim runEntSiteName As String
Dim reasDesc As String
Dim reasGrpDesc As String
Dim fromEntName As String
Dim fromEntSiteName As String
Dim fromLotNo As DBString
Dim fgLotNo As DBString
Dim fromSubLotNo As DBString
Dim fgSubLotNo As DBString
Dim genealogyId As String
Dim upstreamEventId As String
Dim segmentRequirementId As DBString
Dim segmentResponseId As DBString
Dim subsegmentId As DBString
Dim qtyCons As Nullable(Of Double)
Dim consQtyUom As String
Dim userId As String
Dim comments As DBString
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim eventName As String
Dim personnelList As String
Dim serialNoList As String
Dim grpDesc As String
Dim extendedConsAttrs() As ExtendedAttribute
Dim rowId As Integer
JobExec.AddConsViaDataEntryJob(sessionId, eventTime, itemClassId, itemId, productionScheduleId, woId, operId, batchSize, startQty, reqdQty, targetProdRate, targetProdRateUom, updateInventory, invUniqueByJob, runEntName, runEntSiteName, reasDesc, reasGrpDesc, fromEntName, fromEntSiteName, fromLotNo, fgLotNo, fromSubLotNo, fgSubLotNo, genealogyId, upstreamEventId, segmentRequirementId, segmentResponseId, subsegmentId, qtyCons, consQtyUom, userId, comments, spare1, spare2, spare3, spare4, eventName, personnelList, serialNoList, grpDesc, extendedConsAttrs, rowId)
public static void AddConsViaDataEntryJob(
int sessionId,
Nullable<DateTime> eventTime,
string itemClassId,
string itemId,
DBString productionScheduleId,
string woId,
string operId,
Nullable<double> batchSize,
Nullable<double> startQty,
Nullable<double> reqdQty,
Nullable<double> targetProdRate,
Nullable<int> targetProdRateUom,
Nullable<bool> updateInventory,
Nullable<bool> invUniqueByJob,
string runEntName,
string runEntSiteName,
string reasDesc,
string reasGrpDesc,
string fromEntName,
string fromEntSiteName,
DBString fromLotNo,
DBString fgLotNo,
DBString fromSubLotNo,
DBString fgSubLotNo,
string genealogyId,
string upstreamEventId,
DBString segmentRequirementId,
DBString segmentResponseId,
DBString subsegmentId,
Nullable<double> qtyCons,
string consQtyUom,
string userId,
DBString comments,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
string eventName,
string personnelList,
string serialNoList,
string grpDesc,
ExtendedAttribute[] extendedConsAttrs,
out int rowId
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- eventTime
- Optional. Holds the event time.
- itemClassId
- Optional. Holds the item class ID of the data entry job's item.
- itemId
- Optional. Holds the ID of the item resulting from the data entry job.
- productionScheduleId
- Optional. Holds the production schedule ID (for S95).
- woId
- Optional. Holds the work order ID for the data entry job.
- operId
- Optional. Holds the operation ID for the data entry job.
- batchSize
- Optional. Holds the amount of production per batch.
- startQty
- Optional. Holds the expected quantity to be produced if there is no scrap, waste, or rejects.
- reqdQty
- Optional. Holds the required quantity of the item.
- targetProdRate
- Optional. Holds the target production rate.
- targetProdRateUom
- Optional. Holds the unit of measure for target production.
- updateInventory
- Optional. Holds a flag that, if set to true, specifies that inventory will be updated with item consumption.
- invUniqueByJob
- Optional. Holds a flag that, if set to true, specifies that item inventory records for this item will include the wo_id, oper_id, and seq_no in their effective primary key.
- runEntName
- Required. Holds the name of the entity running the job.
- runEntSiteName
- Optional. Holds the site name of the entity running the job.
- reasDesc
- Optional. Holds the description for the item reason.
- reasGrpDesc
- Optional. Holds the description of the item reason group.
- fromEntName
- Optional. Holds the name of the storage entity from which items are consumed.
- fromEntSiteName
- Optional. Holds the site name of the storage entity.
- fromLotNo
- Optional. Holds the lot number of the consumed item.
- fgLotNo
- Optional. Holds the finished goods lot number of the item being consumed.
- fromSubLotNo
- Optional. Holds the sublot number of the consumed item.
- fgSubLotNo
- Optional. Holds the finished goods sublot number of the item being consumed.
- genealogyId
- Required. Holds the genealogy ID (for S95).
- upstreamEventId
- Required. Holds the upstream event ID (for S95).
- segmentRequirementId
- Optional. Holds the segment requirement ID (for S95).
- segmentResponseId
- Optional. Holds the segment response ID (for S95).
- subsegmentId
- Optional. Holds the subsegment ID (for S95).
- qtyCons
- Optional. Holds the quantity consumed.
- consQtyUom
- Optional. Holds the unit of measure for the consumed items.
- userId
- Optional. Holds the user ID.
- comments
- Optional. Holds comments for the consumption being added.
- spare1
- Optional. Holds the contents of the user-defined spare1 field.
- spare2
- Optional. Holds the contents of the user-defined spare2 field.
- spare3
- Optional. Holds the contents of the user-defined spare3 field.
- spare4
- Optional. Holds the contents of the user-defined spare4 field.
- eventName
- Optional. Holds the event name for a job event.
- personnelList
- Optional. Holds the personnel list for a job event.
- serialNoList
- Optional. Holds the serial number list for a job event.
- grpDesc
- Optional. Holds the description of the datalog group.
- extendedConsAttrs
- Optional. Holds an array of ExtendedAttribute objects, each containing the fields needed to create job event.
- rowId
- Output. Holds the system-generated row ID for the added consumption. A value of -1 is returned if no item consumption record was added.