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

How to complete the SO workflow if released outside?

I have developed a sales contract approval workflow. The workflows that has credit block will go for approval.

Manually it should be approved through VKM3. But I am using FIORI font end for approval and a background task is updating the table VBUK-CMGST each time its get approved through FIORI. Which is working fine.

But if the user approves through VKM3 (not through workflow), the workflow remains incomplete. it will remain in his inbox for lifetime.
Approval through VKM3 - event that is captured is "Changed".But I cannot use change because, if user open and change the amount the workflow will get completed, which is wrong.

How can I complete the workflow if approved through VMK3?

Tried :

1.I have tried using fork with wait step, and used "wait for condition", overallcredit status = D, but its not working

2. Scheduled a background job in every hour, but there I have to specify abap program name, cannot provide a task name.

3.I have tried using fork with wait step, and used "wait for event" created custom event "RELEASEOUTSIDE" and mapped but, its also not workfing. because RELEASEOUTSIDE is not defined anywhere.

See attached. Any suggestion/hint/steps to follow is appreciated.

Capture.PNG (65.5 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 18, 2016 at 09:55 AM


    Check if you can use change docs to trigger a specific event of your own creation (copy and delegate BUS2032), changedocs is SWEC, object VERKBELEG.

    If this doesn't work and you only have CHANGED event then put a wait for event in a loop and create your custom task to execute the checks needed to ensure that it was released, or just extend the Business Object with an attribute.

    As a last resort you could also check for BADIS to perform checks and to trigger an event (SAP_WAPI_CREATE_EVENT function module).

    Kind regards, Rob Dielemans

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 18, 2016 at 10:43 AM

    Hi Sangeeta,

    When the document is released and saved in VKM3, sale order/contract is changed to update the release status.

    In case of sales order, implement the User exit USEREXIT_SAVE_DOCUMENT_PREPARE (on save of sales order) and check if sy-tcode = VKM3 & VBUK-CMGST = D. Then raise your custom event RELEASEOUTSIDE using the function module SAP_WAPI_CREATE_EVENT.

    Your wait step would receive this event and terminate the active workitem.



    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.