cancel
Showing results for 
Search instead for 
Did you mean: 

Block PO before Approval when any field is blank

0 Kudos

Hi,

I use approval procedure for purchase order and i just want to block PO without taxcode before sending for approval…

I tried following code.

1)

declare @draft_object int

if @object_type = ‘112’ and @transaction_type in (N’A’, N’U’)

begin

select @draft_object = ObjType from ODRF where DocEntry = CAST(@list_of_cols_val_tab_del as int)
if @draft_object = 22– Draft PO
If exists (select T2.ItemCode From OPOR T1 inner join POR1 T2 on T2.[DocEntry]=T1.[DocEntry]
where (T2.TaxCode is null or T2.TaxCode=” ) and
T2.DocEntry=@list_of_cols_val_tab_del)

Begin

select @error=1,@error_message =’Enter The Tax Code’
End
End

It doesn't work...

2)

If(@transaction_type in (N'A', N'U') and @object_type=N'22')

Begin

If exists (select T2.ItemCode From OPOR T1 inner join POR1 T2 on T2.[DocEntry]=T1.[DocEntry] where (T2.TaxCode is NUll) and T2.DocEntry=@list_of_cols_val_tab_del) Begin

select @error=1,@error_message ='Enter The Tax Code'

End

End

This code work at final add i.e PO goes to approval and it get approved and when we finally add it to system it block for adding…but i want it block before sending to approval….


Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi,

I just want to block the PO before sending it for approval if there is no tax code to the item...I just try those code one at time but no result found..

Regards

Sapna

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

It is not possible to use both approval and transaction notification same time. It won't work.

Regards,

Nagarajan

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

It is not possible to use both approval and transaction notification same time. It won't work.

Regards,

Nagarajan