Skip to Content
0

Block PO before Approval when any field is blank

Nov 30, 2017 at 10:54 AM

42

avatar image
Former Member

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….


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Nagarajan K Nov 30, 2017 at 12:07 PM
0

Hi,

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

Regards,

Nagarajan

Share
10 |10000 characters needed characters left characters exceeded
Nagarajan K Nov 30, 2017 at 12:07 PM
0

Hi,

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

Regards,

Nagarajan

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 19, 2017 at 11:06 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded