Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8430

Re: Stored Procedure to block cost center or profit center to present in JE

$
0
0

Hi Gopi

 

Try This

 

IF @transaction_type IN ('A','U') and @Object_type = 30

BEGIN

IF EXISTS (SELECT T0.TransId FROM dbo.JDT1 T0

WHERE ((T0.ProfitCode ='' OR T0.ProfitCode IS NULL) and (T0.[OcrCode2]='' OR T0.[OcrCode2] IS NULL) and (T0.[OcrCode3]='' OR T0.[OcrCode3] IS NULL) and

(T0.[OcrCode4]='' OR T0.[OcrCode4] IS NULL) and (T0.[OcrCode5]='' OR T0.[OcrCode5] IS NULL)) AND T0.TransId = @list_of_cols_val_tab_del)

Begin

SET @Error = 1111

SET @error_message = 'At least one cost center is mandatory!'

End

End

 

 

With Regards

 

Balaji Sampath


Viewing all articles
Browse latest Browse all 8430

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>