Skip to Content
avatar image
Former Member

Approval Query when adding an AP Invoice with Base Document

Good day Experts!

I need help with the creation of an approval query every time an AP Invoice is added from a base document (Sales Order, Delivery, AR DP Invoice etc).

I have created a sample query SELECT DISTINCT 'TRUE' FROM OPCH A INNER JOIN PCH1 B ON A.DocEntry = B.DocEntry WHERE NOT B.BaseType = -1

Thanks!

Add comment
10|10000 characters needed characters exceeded

  • Hi Nikka,

    What you want to validate? Are you want to do an approval procedure for documents without base documents?

    Kind Regards,

    Diego Lother

  • Former Member

    Hi Diego, I want to have an approval process for A/P invoice with base documents, either Sales Order, Delivery, ARDP documents. Thank you.

  • Former Member

    Hi Nikka and Diego,

    I am new in sap so can you please tell me where to apply this query.

    When I copy from Delivery to A/R invoice Document Date not copied from delivery to invoice.

    Can you please tell me path to set the query for this.

    Regards,

    Sapna

  • Get RSS Feed

2 Answers

  • Sep 23, 2017 at 03:01 PM

    Hi,

    Try this query for AP Invoice approval,

    SELECT Distinct 'True' FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.[DocEntry] = T1.[DocEntry] WHERE $[$38.43.0] = '-1'

    Regards,

    Nagarajan

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 25, 2017 at 12:07 PM

    Hi Nikka,

    Try this:

    SELECT CASE WHEN $[$38.43] <> -1 THEN 'TRUE' ELSE 'FALSE' END

    Hope it helps.

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded