Skip to Content
0

Prevent Posting AP Invoices without P.O & GRPO

Feb 13, 2017 at 11:56 AM

237

avatar image
Former Member

Hi ,

How to set authorization for the following scenario .

Some of the users put AP Invoice without P.O & GRPO.How can i prevent it ? A users shouldn't directly post AP Invoices without P.O & GRPO.

10 |10000 characters needed characters left characters exceeded

Hi Nabil,

If you choose to use approval procedure to achieve your goal, you can look this blog:

https://blogs.sap.com/2016/09/17/approval-template-at-the-line-level-on-marketing-documents/

To do your approval procedure based on document line. Approval procedures are able to validate all lines of your document.

Hope it helps.

Kind Regards,

Diego Lother

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

avatar image
Former Member Feb 13, 2017 at 12:21 PM
0

Hello,

You can achieve it by writing a SQL code in Transaction Notification which will block the user when he will enter AP Invoice without a base entry. You need to just check BaseType for PCH1 table. BaseType should be either 22 (PO) or 20 (GRPO)

Regards,

Engr. Taseeb Saeed

Share
10 |10000 characters needed characters left characters exceeded
Nagarajan K Feb 13, 2017 at 12:39 PM
0

Hi,

No authorization setting for AP invoice without base document. If you have only one line in AP Invoice, then you can use approval procedure.

If multiple lines, you can use Transaction notification.

Regards,

Nagarajan

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

can u share me the code ?

0
avatar image
Former Member Feb 14, 2017 at 05:14 AM
0

Hello,

This is the code for you


If @object_type = '18' And @transaction_type in ('A','U')
BEGIN


DECLARE @intError INT


SELECT @intError =   COUNT(*) FROM dbo.PCH1 T0
WHERE T0.DocEntry = @list_of_cols_val_tab_del
AND t0.BaseType NOT IN (22,20)




 IF @intError > 0
  BEGIN
  SET @error = 1004
  SET @error_message = 'A/P Invoice -- You can not make A/P Invoice without base document PO or GRPO'
  select @error, @error_message
  END
  
  




END

Thanks

Engr. Taseeb Saeed

Share
10 |10000 characters needed characters left characters exceeded