on 08-19-2013 9:57 AM
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?
Hi Muhammad Aftab ..
There is not direct link between the GRPO and Transfer can you explain the link.
If you want to block the Transfer without frieght try this
IF @Object_type = '67' and @transaction_type in ( 'A' ,'U')
BEGIN
If exists
( SELECT T0.DocNum FROM OWTR T0
INNER JOIN WTR T1 ON T0.DocEntry = T1.DocEntry
WHERE isnull(TotalExpns,'')='' and T1.DocEntry =@list_of_cols_val_tab_del
)
Beign
Select @error = 1,
@error_message = 'have No Landed Cost!'
END
End
Regards
Kennedy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
10 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.