Skip to Content
avatar image
Former Member

Block PO before Approval when any field is blank

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


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 30, 2017 at 12:07 PM

    Hi,

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

    Regards,

    Nagarajan

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 30, 2017 at 12:07 PM

    Hi,

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

    Regards,

    Nagarajan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 19, 2017 at 11:06 AM

    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

    Add comment
    10|10000 characters needed characters exceeded