Skip to Content
0
Aug 19, 2013 at 08:57 AM

SP for Landed Cost

24 Views

I want to block any inventory transfer of any item where GRPO does not have landed cost assigned.

IF @transaction_type IN ('A','U') AND @Object_type = '67'

BEGIN

Declare @GRPO VARCHAR (50);

SELECT @GRPO=t0.DocNum FROM OPDN T0 INNER JOIN PDN1 T1 ON

T0.DocEntry = T1.DocEntry

WHERE T0.[OpenForLaC] ='Y' and T1.[ItemCode]=@list_of_cols_val_tab_del

IF ISNULL(@GRPO, '') <> ''

BEGIN

SELECT @Error = 22, @error_message = '[' + @GRPO + '] have No Landed Cost.'

END

END

But this SP is not getting fired or it is not blocking any inventory transfer. Can you please guide me what error is there?