Skip to Content

approval procedures between two marketing document

Hi experts,

I am trying to do approval procedure about between two document f.e. Purchase Order to Good Receipt PO and my rule is item quantities of PO should be equal to GRPO item quantities or PO doctotal and GRPO doctotal should be equal.

I coulnt find any relation when I go to GRPO from PO with copy to. Before the adding GRPO I couldnt find any baseref or base entry info. So I coulnt relate POR1 with PDN1.

Is it possible to do this approval procedure or do you have any other suggestion.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Mar 03, 2018 at 01:34 AM


    Run below query and save under query manage. Assign this query in your approval process. Note this query will work only single row.

    This is standard for approval query,

    SELECT Distinct 'True'

    FROM OPOR T0 INNER JOIN POR1 T1 ON T0.[DocEntry] = T1.[DocEntry] left join PDN1 T2 on T2.[BaseEntry] = T1.Docentry and T2.[BaseLine] = T1.[LineNum] INNER JOIN OPDN T3 ON T2.[DocEntry] = T3.[DocEntry] WHERE $[PDN1.Quantity] > T1.[Quantity]



    Add comment
    10|10000 characters needed characters exceeded

  • Mar 05, 2018 at 01:27 PM

    Hi Tenay Uzun,

    Have you tried with my query? Is it working?



    Add comment
    10|10000 characters needed characters exceeded

    • Its working just for first line. I worked about it and research a lot but I couldnt find any solution for approval procedures on row level.

      Then I manage the process like following SP transaction notfication and approval procedure.

      IF :object_type = '20' and(:transaction_type='A' or :transaction_type='U') THEN

      SELECTCOUNT(T0."DocNum") INTOcnt




      WHERE (T1."Quantity"<>S1."Quantity") AND (T0."U_B1_ONAY"ISNULLORT0."U_B1_ONAY"=02)


      ANDT0."DocEntry"= :list_of_cols_val_tab_del;

      IF :cnt>0 THEN

      error := -715 ;

      error_message := 'BELGE EKLENEMEZ ONAY TALEP EDİNİZ!';




      approval procedure query;

      SELECT distinct 'true' FROM OPDN T0

      WHERE $[OPDN.U_B1_ONAY]='01' and T0."CardCode" = $[OPDN.CardCode]

      screenshot-2.png (18.4 kB)
  • Mar 06, 2018 at 02:18 PM

    Thank you for reply. As i said earlier, approval procedure dis not work at row level. Also, the syntax for approval query is different from other query. In this case, you should not assigned correct answer. Meaning, it may lead to confusion to other members.

    Hope you understand.

    Add comment
    10|10000 characters needed characters exceeded