Skip to Content
author's profile photo Former Member
Former Member

Purchase Requisition Workflow

Hi All,

I have a Purchase Requisition Workflow in place which gets triggered for event ReleaseStepCreated and according to the Total Valuation of the Purchase Requisition and Release Strategy based on the Z table the Purchase Requisition is sent to different approver Group.

Now as per the new requirement, if there is a change in the Purchase Requisition quantity/price which result in changes in the total valuation and hence different approver group is responsible for approving the same, then the original Workflow should get cnacelled and new workflow should get triggered, how can I achieve the same?

I have found the BADI where upon change in the value of Quantity/Price I will write a code if the approver group is being changed then trigger the event PurchaseReqItem.significantlyChanged using Function Module SWE_EVENT_CREATE but again this particular event is not returning the release code, which is available for the event PurchaseReqItem.releaseStepCreated.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Jan 06, 2014 at 07:08 AM

    Hi Nilesh

    Add BUS2105.CHANGED event as one of the triggering events of the Workflow.

    Within the workflow, add a fork 1 of 2. In one branch, keep the entire process and in the other branch wait for BUS2105.CHANGED; post that wait setp, you can use termination step to COMPLETE the current instance.

    When someone changes the req. it will trigger a new instance using BUS2105.CHANGED and will also complete any running instance of the same Req. from the fork

    Regards,

    Modak

    Further, you can put start conditions for BUS2105.CHANGED if you want to trigger for specific changes only and slo check for those changes in the fork before the termination step.

    Message was edited by: Modak Gupta

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Nilesh,

      Proper way of handling in workflow is each time for each changes it should terminate existing instance then trigger the new workflow instance.(Even for 100 times)

      For Change event as u told no release code.(I agree)

      I handled the same situation.By getting the release code from the database then filling this in workflow container element ''RELEASECODE' in background method activity in the starting of the workflow.

      Regards,

      Ragav

  • Posted on Jan 06, 2014 at 07:22 AM

    Hi Nilesh,

    Make use of Fork Step and no need to create a separate workflow for that. Make two branches out of the fork and 1 necessary branch.

    In one branch make use of the wait event BUS2105.CHANGED and in one branch design your general steps of workflow , I mean the steps you would follow when there is no significant change in Requisition.

    And you know if any of the steps gets executed as per the conditions the other one would be logically deleted

    Best Regards,

    lakshman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 07:35 AM

    Hi Nilesh,

    Make it simple.

    you have following options.(follow any one)

    1.While Trigggering Significantly change trigger another one event Releasestep Created with filled Event parameter Release code.

    2.Other wise if you are using custom workflow very first step of the workflow make it Releasecode(Container element) filing from the database by using custom method.

    Regards,

    Ragav

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2014 at 02:05 PM

    Thanks everyone!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.