Hi All
I need notification which gives error message with line no. or item no when
DLN1.U_actualinstock<DLN1.U_POTAND ODLN.U_UpdtInv='No'
means notification does not block in case ODLN.U_UpdtInv is set as yes.
Also few delivery document has approval configured . It should work on both conditions delivery with or without approval.
Below is the notification.
@object_type='15'
AND@transaction_typeIN('A','U')
IF EXISTS(SELECTODRF.DocEntryFROMODRFINNERJOINDRF1ONODRF.DocEntry=DRF1.DocEntry
WHEREODRF.DocEntry=@list_of_cols_val_tab_delORODRF.U_UpdtInv='No'
AND(Cast(DRF1.U_actualinstockasnvarchar(4)))<(cast(DRF1.U_POTasnvarchar(4))))
BEGIN
SET@error= 15
SET@error_message=N'Please set Update to Yes OR check Error in lines: '+(SELECTcast(a.visASNVARCHAR(3))+';'FROM (SELECTT1.visorder+ 1 'vis'
FROMdbo.ODRFT0
JOINdbo.DRF1T1ONT0.DocEntry=T1.Docentry
WHERE (cast(T1.U_actualinstockASnvarchar(4))<(cast(T1.U_POTASnvarchar(4)))OR(T0.U_UpdtInv='No'
ANDT1.DocEntry=@list_of_cols_val_tab_del)))a
FORXMLpath('')
)
END
Thanks in Advance
Thanks & Regards
Preeti