Hello Expert,
I created one TN to block to add Purchase order if 6 PO for the particular vendor is open.
The following TN is working fine if we do not given any Approval template to it.
The TN is as follows:-
IF @object_type ='22'AND @transaction_type IN('A')
BEGIN
IF ((SELECTCount(t1.docentry)FROM OPOR t1
where CardCode=(Select Cardcode from OPOR where docentry=@list_of_cols_val_tab_del )))> 6
BEGIN
SET @error =-2
SET @error_message =' You Cannot Perform this Action Because this vendor already 6 or greater that 6 Purchase Order Open'
END
END
Now I want modification in the TN is as follows:
Now i applies Approval Procedure then,
1) if for a particular vendor if 6 PO is opened then next PO will not be added,
2) As well as no draft document will be added in the system.
Regards,
Sandesh