Use this,
IF @OBJECT_TYPE = '202' AND @TRANSACTION_TYPE = 'L'
BEGIN
IF EXISTS(
SELECT T0.DocEntry FROM OWOR T0 inner join wor1 t1 on t0.DocEntry =t1.DocEntry
WHERE T0.DocEntry = @LIST_OF_COLS_VAL_TAB_DEL and (t0.CmpltQty >0 or t1.IssuedQty >0 and t0.Status='R')
)
BEGIN
SELECT @ERROR=1,@ERROR_MESSAGE='You cant change the Document without issue or completion of production Order'
END
END