on 02-09-2017 3:33 AM
Hi,
Would like to seek your advise on following scenario.
I would like to block the total amount in AP Invoice is greater than PO SUM(OPEN amount). As 1 PO = Many Invoice.
I have done the coding to restrict in SP_Transaction.
can anyone of you help me to take alook on the code, it's not working perfectly, what is the issue?
IF @transaction_type IN(N'A',N'U')AND
(@Object_type =N'20')
BEGIN
IFEXISTS(SELECT T1.BaseEntry FROM dbo.OPCH T0
INNERJOIN dbo.PCH1 T1 ON T1.DOCENTRY = T0.DocEntry
INNERJOIN dbo.POR1 T2 ON T2.DOCENTRY = T1.BaseEntry
WHERE T1.BaseType = 22 AND
T1.BaseLine = T2.LineNum AND
T0.DOCENTRY = @list_of_cols_val_tab_del
GROUPBY T1.BaseEntry
HAVINGSUM(T1.OpenSumSys+(T1.OpenSumSys*1.07))>SUM(T2.TotalSumSy))
Begin
SELECT @Error = 10, @error_message ='AP INV Total Amount is greater than PO Open Amount'
End
END
Hello,
Agreed with Nagarajan Object Type for A/P Invoice is 18. See the following link for Object Types
https://blogs.sap.com/2013/07/09/sap-business-one-form-types-and-object-types/
Thanks
Engr. Taseeb Saeed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For AP invoice object type is 18 not 20.
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For AP invoice object type is 18 not 20.
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.