on 03-20-2023 4:03 PM
Hi there,
I´m new to the "BADI World", but I have an issue I´m trying to solve:
My Procurement Team wants a PO-Workflow, which only will be triggered AGAIN, when the price rises. I therefore implemented this code in BADI MMPUR_PO_WORKFLOW_RESTART:
DATA newPoValue TYPE P.<br> DATA newNetPriceAmount TYPE P.<br> DATA oldPoValue TYPE P.<br> DATA oldNetPriceAmount TYPE P.<br><br> workflowrestarttype = 'N'.<br><br><br> LOOP AT PURCHASEORDERITEM INTO DATA(N_PO_ITEM).<br> newPoValue = newPoValue + N_PO_ITEM-netamount.<br> newNetPriceAmount = newNetPriceAmount + N_PO_ITEM-NetPriceAmount.<br> ENDLOOP.<br><br><br> LOOP AT PURCHASEORDERITEM_DB INTO DATA(O_PO_ITEM).<br> oldPoValue = oldPoValue + O_PO_ITEM-netamount.<br> oldNetPriceAmount = oldNetPriceAmount + N_PO_ITEM-NetPriceAmount.<br> ENDLOOP.<br><br><br> IF newPoValue GT oldPoValue.<br> workflowrestarttype = 'R'.<br> RETURN.<br> ELSEIF newNetPriceAmount GT newNetPriceAmount. "If Net Amount for line item 1 is changed then Conditional Restart<br> workflowrestarttype = 'R'.<br> RETURN.<br>ENDIF.
The code itself works quite well. The Idea was: If the price rises, trigger again the workflow, in any other case --> proceed.
I also already tried to just put
DATA newPoValue TYPE P.<br> DATA newNetPriceAmount TYPE P.<br> DATA oldPoValue TYPE P.<br> DATA oldNetPriceAmount TYPE P.<br><br> workflowrestarttype = 'N'.<br>
as the only code, to see if it is the right BADI to achieve my goal, well, it didnt work.
Question:
We now have the issue, when the procurement manager enters the Order Confirmation for the PO, the Workflow will be triggered again.
How can I adjust that the Workflow of the PO will only be triggered (in case a OC is entered) when the price of the OC rises, but not in any other case?
Dear Stephen,
Would you please check the SSCUI 103345 which control the condtion to restart the PO workflow?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
8 | |
6 | |
6 | |
5 | |
4 | |
2 | |
2 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.