try this
IF @transaction_type = 'A'
AND @Object_type = '202'
BEGIN
IF EXISTS (
SELECT T0.DocEntry
FROM dbo.OWOR T0
WHERE
isnull(T0.[OcrCode3],'') = ''
AND T0.DocEntry = @list_of_cols_val_tab_del
)
BEGIN
SET @Error = 1111
SET @error_message = 'At least one cost center is mandatory!'
END
END