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

Re: Stored Procedure For to Block AP Invoice Draft Document Changes

$
0
0

Try this

 

-- For AP Invoice Draft Document

IF @transaction_type IN ('U') AND @Object_type = '112'

BEGIN

IF EXISTS (SELECT  T0.DocNum

FROM Odrf AS T0

where T0.DocEntry = @list_of_cols_val_tab_del and t0.ObjType = 18)

BEGIN

SELECT @Error = 7, @error_message = 'A\P Draft Update restricted'

END

END

 

-- For AP Invoice Document

IF @transaction_type IN ('U') AND @Object_type = '18'

BEGIN

IF EXISTS (SELECT  T0.DocNum

FROM OPCH AS T0

where T0.DocEntry = @list_of_cols_val_tab_del)

BEGIN

SELECT @Error = 7, @error_message = 'A\P Inv. Update restricted'

END

END


Viewing all articles
Browse latest Browse all 9159

Trending Articles



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