Showing results for 
Search instead for 
Did you mean: 

Logistics Invoice workflow

Former Member
0 Kudos

Hi All,

Requirement is for a Logistics Invoice Workflow

triggered when 1> Price variance block(P) 2>Qty variance block (Q)

3> when GR not found --- dont know which event this raises

Also 1 invoice can have associated multiple PO's . The PO's can have different buyers . So the buyers should be sent the workitem with only the details of the Po's that he is responsible for . Also if there is both a qty block and a price block then he should receive just 1 workitem . I don't think they require functionality as in workflow WS20000397 where the workflow automates the change / delete/verify actions and if change is selected then loops through the PO's in the change mode allowing to change price . This functionality will be performed manually , so the workflow itself is more like a notification .

This is how I was thinking of tackling this .

1. Get the list of blocked work items for the current invoice into a multiline.

2. Get the buyers for each invoice line item via the associated PO Litem

into another multiline

3. Get a list of buyers from pt 2 and remove duplicates . move into another multiline .

4. call a subworkflow ( once for each line of the multine for buyers ) .

5. This subworkflow will get the line items belonging to the buyer

it will then call a task which will list the line items ( similar to bus2081-LISTBLOCKEDPRICEITEMDATA ). might have to create another method for LISTBLOCKEDQTYTEMDATA and call the task based on whichever event is called . I don't know in which category would the no GR created block fall under ?

The work item can also contain object references for Invoice and each of the PO's so that he can view them as links and display the invoice and PO's .

The task will be completed by a invoice.released event , but if so then all the buyers will have to wait for the invoice has been released . maybe I can check if the relevant workitems have been unblocked . If not then send him another workitem . If the user chooses to reject the workitem the requirement is sent to the Accounting clerk which is fine .The workitem will remain in his inbox until he manually completes the workitem .

I hope this would work . The only thing I'm not very clear is how I can get a single workitem for both qty & price variances if they occur at the same time as they are 2 different events and will create 2 different workflows ?

Any ideas let me know .

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Radha,

It was a long time back that you posted in this thread your query about "Logistics Invoice workflow". I wanted to find out if you could complete this workflow development, because I am given the same requirement. I was wondering if I can ask you a couple of questions regarding this workflow development.

Thank you...

Former Member
0 Kudos

Hi Radha

You can use the Start Condition SWB_COND. Create an attribute in the business object that will check whether a Workflow instance has been triggered. This will suffice your need. Now you might say I want to hold all the changes that is done by events Use a Wait for Event step in a fork and that will serve your purpose. Do one thing put a loop such that the Workflow will continue until it gets approved or rejected.



0 Kudos

Hi Radha,

You can trigger a single workflow from different events. Even in this case it will create two workflow instances for the different events that are triggered. I guess you will have to wirte a small function module which can check for the PO properties. If it has both then you can run the workflow for any one branch. This is what comes to my mind.

For the GR not present scenario you can just have a workflow once an Invoice is created and then run the workflow only if the GR is not present. You can have a check function module for that too.

Hope this helps,


Former Member
0 Kudos

Thanks for that .

In the case of GR I will need to raise a custom event for GRBLOCKED of BUS2081, probably using the BADI INVOICE_UPDATE ( method CHANGE_BEFORE_UPDATE ) .

In case of both qty & price variance , I agree that I have to perform some logic to stop one of the workflows and in the other include the information from the other too. Pity I have to write so much of logic ... there should be a better way to achieve this result .