RejectProd(Int32,Int32,Double,Int32,String,String,Nullable<Int32>,Nullable<DateTime>,String,String,String,String,String,String,String,String,Nullable<Int32>,String,String,Nullable<Double>,Nullable<Boolean>,Nullable<Boolean>) Method
- Last UpdatedNov 06, 2025
- 3 minute read
The RejectProd() method marks previously reported production as rejected.
This overload of the method uses the entity name and site name to specify the entities.
'Declaration
Public Overloads Shared Sub RejectProd( _
ByVal sessionId As Integer, _
ByVal oldRowId As Integer, _
ByVal splitQtyProd As Double, _
ByVal newReasCd As Integer, _
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 newRmLotNo As String, _
ByVal newSubLotNo As String, _
ByVal newRmSubLotNo As String, _
ByVal newUserId As String, _
ByVal newEntName As String, _
ByVal newSiteName As String, _
ByVal newShiftId As Nullable(Of Integer), _
ByVal newToEntName As String, _
ByVal newToSiteName As String, _
ByVal splitQtyProdErp As Nullable(Of Double), _
ByVal splitProcessedFlag As Nullable(Of Boolean), _
ByVal splitByProductFlag As Nullable(Of Boolean) _
)
'Usage
Dim sessionId As Integer
Dim oldRowId As Integer
Dim splitQtyProd As Double
Dim newReasCd As Integer
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 newRmLotNo As String
Dim newSubLotNo As String
Dim newRmSubLotNo As String
Dim newUserId As String
Dim newEntName As String
Dim newSiteName As String
Dim newShiftId As Nullable(Of Integer)
Dim newToEntName As String
Dim newToSiteName As String
Dim splitQtyProdErp As Nullable(Of Double)
Dim splitProcessedFlag As Nullable(Of Boolean)
Dim splitByProductFlag As Nullable(Of Boolean)
JobExec.RejectProd(sessionId, oldRowId, splitQtyProd, newReasCd, newWoId, newOperId, newSeqNo, newShiftStart, newItemId, newLotNo, newRmLotNo, newSubLotNo, newRmSubLotNo, newUserId, newEntName, newSiteName, newShiftId, newToEntName, newToSiteName, splitQtyProdErp, splitProcessedFlag, splitByProductFlag)
public static void RejectProd(
int sessionId,
int oldRowId,
double splitQtyProd,
int newReasCd,
string newWoId,
string newOperId,
Nullable<int> newSeqNo,
Nullable<DateTime> newShiftStart,
string newItemId,
string newLotNo,
string newRmLotNo,
string newSubLotNo,
string newRmSubLotNo,
string newUserId,
string newEntName,
string newSiteName,
Nullable<int> newShiftId,
string newToEntName,
string newToSiteName,
Nullable<double> splitQtyProdErp,
Nullable<bool> splitProcessedFlag,
Nullable<bool> splitByProductFlag
)
Parameters
- sessionId
- Required. Holds the ID of the session from which the call is being made.
- oldRowId
- Required. Holds the row ID of the existing Item_Prod record.
- splitQtyProd
- Required. Holds the split quantity.
- newReasCd
- Required. Holds the reason code for the rejected quantity.
- newWoId
- Required. Holds the ID of the new work order.
- newOperId
- Required. Holds the ID of the new operation.
- newSeqNo
- Optional. Holds the new job sequence number.
- newShiftStart
- Optional. Holds the new shift start time.
- newItemId
- Optional. Holds the ID of the new item.
- newLotNo
- Optional. Holds the new lot number.
- newRmLotNo
- Optional. Holds the lot number of the new rejected material.
- newSubLotNo
- Optional. Holds the new sublot number.
- newRmSubLotNo
- Optional. Holds the sublot number of the new rejected material.
- newUserId
- Optional. Holds the ID of the new user.
- newEntName
- Optional. Holds the name of the new entity.
- newSiteName
- Optional. Holds the site name of the new entity.
- newShiftId
- Optional. Holds the ID of the new shift.
- newToEntName
- Optional. Holds the name of the new destination entity.
- newToSiteName
- Optional. Holds the site name of the new destination entity.
- splitQtyProdErp
- Optional. Holds the split quantity last edited in ERP.
- splitProcessedFlag
- Optional. Holds a flag that, if set to true, specifies that the split was processed.
- splitByProductFlag
- Optional. Holds a flag that, if set to true, specifies that the split is by product.
The required fields identify the current record and the quantity to be rejected. The rejected quantity must be less than or equal to the qty_prod value in the existing record. Rejecting the full quantity is equivalent to simply updating the existing record. Otherwise a new record is created for the rejected quantities with the rejected grade and status, and the quantity for the existing record is reduced by the amount rejected.
For the method to succeed, the newReasCd and newItemId values must exist in the database. The newReasCd will be used to determine the grade_cd, status_cd, and good_prod flag for the split record (or updated record if rejecting the whole quantity).
All optional fields default to the values in the existing record if they are not included.
If a record already exists in the database for the rejected record, then the rejected quantity will simply be added to the existing record. If any other optional dependent fields are specified, then they will also be changed for the rejected record. If the quantity of the existing record (not the rejected record) is reduced to zero, the existing record is deleted.