cancel
Showing results for 
Search instead for 
Did you mean: 

Non po based AP invoice requiring approval

Former Member
0 Kudos

Hi

My issue is I am trying to create an approval process based on the requirement that all AP invoices entered directly as an AP invoice (as opposed to PO or GRN) on the system require approval.

What I have done to date is I have created a UDF on marketing documents U_BPCODE and created a formatted search to populate this field wiht the BP code that appears on the AP Invoice. As this formatted search does not exist on the PO or GRN, any document being copied into an AP invoice should not be populating this UDF.

From there i have then created a formatted search as follows

SELECT Distinct 'True' FROM OPCH WHERE U_BPCODE = $[4.0.0]

However this query always returns a value of TRUE even when the field U_BPCODE is left blank.

Any suggestions

David

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member187989
Active Contributor
0 Kudos

Simulate as detailed in this link

How to set up an approval procedure for all Purchase Orders except those created directly from a Sales Order?

https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=96403575

Jeyakanthan

reno1
Active Participant
0 Kudos

Hi,

Try this option.


SELECT 'True' FROM PCH1 T1 join opch T0 on T1.docentry = T0.docentry  where T1.basetype = '-1' 
and T0.docentry = $[opch.docnum]

this will resolve your issue,

Regards

Reno.

Former Member
0 Kudos

Hi Rohan,

I tried your query and I find it somehow not working

former_member204969
Active Contributor
0 Kudos

Try to use this:

If $[OPCH.U_BPCODE]= $[$4.0.0]
  Select 'True'