Hi Ibrahim,
try this SP for GRPO Document. If it works we will create another SP with different Object type.
IF (@transaction_type='A' or @transaction_type='U') AND (@OBJECT_TYPE='20') |
BEGIN
IF exists (SELECT | OIGN.DocNum, OBTN.DistNumber,IGN1.Quantity,OIGN.DocDate,OBTN.MnfDate, OBTN.ExpDate, IBT1.ItemCode, IGN1.Dscription AS 'Item Description', |
IGN1.WhsCode | |
FROM | OBTN INNER JOIN |
IBT1 ON OBTN.DistNumber = IBT1.BatchNum AND OBTN.ItemCode = IBT1.ItemCode INNER JOIN | |
OIGN ON IBT1.BaseNum = OIGN.DocNum AND IBT1.BaseType = OIGN.ObjType INNER JOIN | |
IGN1 ON IBT1.ItemCode = IGN1.ItemCode AND OIGN.DocEntry = IGN1.DocEntry |
Where (OBTN.ExpDate = '' or OBTN.ExpDate Is Null) and
OIGN.Docentry = @list_of_cols_val_tab_del ) |
Begin
SET @error = 123
SET @error_message = 'Please enter Expiry Date'
End
End
Please let me know the feedback.
Thanks,
Harshal