Query for PO
IF @transaction_type In ( 'A' ,'U') AND @object_type = '22'
BEGIN
IF EXISTS( select c.DocEntry
from OPOR c INNER JOIN POR1 d on c.DocEntry = d.docentry
where c.DocEntry = @list_of_cols_val_tab_del
and isnull(d.Project,'') = '')
BEGIN
SELECT @Error = 5, @error_message = 'Project Code is missing !'
END
END