cancel
Showing results for 
Search instead for 
Did you mean: 

Launch workflow for rejected vendor invoice

Former Member
0 Kudos

Hello,

please, could you tell me which is the correct procedure after a parked vendor invoice is rejected? I thought if the parked vendor invoice is modified again, the approval workflow is launch again. However, the WF is not launch and we cannot post those rejected invoices. Must the user create a new vendor invoice then?

Thank you in advance.

Best regards.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member227140
Active Participant
0 Kudos

Hi,

which business object you are using to do this whole workflow scenario ??

whats the reason rejected event is not triggering if invoice is rejected ?? can you paste your SWEL screen shot when invoice gets rejected???

you can do 2 things 1) first create a another workflow in dev just for test purpose and link rejected event to this workflow to trigger . check after rejected invoice if this workflow acts as a receiver event or not , this will confirm that this event actually works or not.

2) second option i want to suggest is , check for BADI /EXIT which gets triggered on invoice creation and if invoice is rejected then using  SAP_WAPI_START_WORKFLOW you can start /trigger your workflow but this will only be for rejected invoice ..but challenge is this must be triggered only for rejcted invoice .. in the path of rejected option you have to catch the rejected invoice no , its status as 'rejected' like that.

there might be option of saving rejected invoice in ztable and if they are processed again you can set their flag as 'X' in z table so that they wont get processed again. but in this case this table will get huge as rejected invoice will be getting increased in ztable.

may be few inputs from other workflow experts will help. but this will be my approach.

Former Member
0 Kudos

The workflow can be re-triggered after a change in Invoice , contact your work flow consultant he will do it.

Former Member
0 Kudos

Hello Mallinath,

even when the vendor invoice is rejected?

Thanks.

former_member227140
Active Participant
0 Kudos

Hello,

Yes its possible.

at start when ever a invoice is created , there must be a triggering event at workflow header which is triggering this workflow.

check that business object using SWO1 transaction code and see if same BO contains event "Rejected"

if it has that event in your workflow header you can trigger workflow for more than one event , you have to mention that Business object and event "rejected" at header level in addition to your previous/original triggering event.

if not may be you need to delegate business object which you are using and add event "rejected" to it, but again you need to look for BADI/EXIT and trigger your event inside this BADI/EXIT.

I am not sure for approve/reject you are using "decision step " or using any standard functionality of SAP.

more comments on this would be helpful.

Former Member
0 Kudos

Hello Abhijeet,

I have added two events "PARKED" and "REJECTED" to my WF but it doesn't work. When I modify a rejected invoice, any workflow is launch again. The original WF is completed when I reject the invoice.

Thank you.

Best regards.

anjan_paul
Active Contributor
0 Kudos

Hi,

   You create Rejected event . After that maintain that event in the approval step as terminatin event. And you have to use badi or user exit to raise that Rejected event. So that approval step will complete whever Rejected event trigger, After that raise Parked event from the same Badi, so that new workflow will trigger

former_member183424
Active Contributor
0 Kudos

I hope this discussion may help you..

Please read the thread

workflow on invoice parking and posting | SCN

former_member227140
Active Participant
0 Kudos

1) What is your exact requirement??

2) Workflow is already designed and developed and its not triggering or you have to create  a workflow which will be triggered when invoice gets rejected ??? or invoice gets created??

3) look for a business object which has a event rejected in it for parking of invoice

Most important please make us understand your requirement , what you have done , what is available in system so we can help

Former Member
0 Kudos

Hello Abhijeet,

currently, when the user parked a vendor invoice a mail is sent to the PO creator in order to check this invoice.

If the invoice is correct, the PO creator approve it and the invoice is posted automatically.

If the invoice is not correct, the PO creator reject the invoice and a mail is sent to the invoice creator with the rejected reason. Then, if the invoice creator correct the rejected invoiced, any workflow is launch to send a new mail to the PO creator for approving the new changes.

If it is possible to configure the WF to launch a rejected vendor invoice when it is modified? Or must the user create a new invoice?

Thank you.

Best regards.

Former Member
0 Kudos

Hi Carlos,

What action you are performing when the user click on reject button? are you just sending an email to PO creator for doing modification ? if so and you want the workflow to be triggered when he does any changes, then you can insert event 'Changed' of business object FIPP in workflow start condition (SWDD->basic data setting) alongwith CREATED event which you have right now. doing so workflow will get triggered upon doing any change in the document.

But doing this workflow will trigger for any change in the document and then there could be multiple workflows in 'IN PROCESS' state for same document. To overcome this you need to create a CHECK FUNCTION MODULE also. and insert it in event linkage (tcode SWE2) of CHANGED event of FIPP.

in this check FM, check if there is already a workflow for particular FI doc (use FM SAP_WAPI_WORKITEM_TO_OBJECT) in process. if so raise an exception and new workflow will not trigger !!!

you can refer below link for info. on check function module .

http://saptechnical.com/Tutorials/Workflow/checkfunctionmodule/demo.htm

http://scn.sap.com/thread/3383394

Regards,

Ibrahim Ansari

Former Member
0 Kudos

Hello Ibrahim,

thank you for your answer. I will check it.

Well, I think one option is sending a new mail to the invoice creator in order to correct the invoice.

Currently, when the approver user click on the reject button a mail is sent to the invoice creator to let him know that the invoice has been rejected. Then, the WF is completed. I would like to relaunch or create a new WF if the vendor invoice makes any new change in the rejected invoice. If it possible or do we need to create a button in the information mail of rejection?

Thank you in advance.

Best regards.

Former Member
0 Kudos

Hi Carlos,

You just need to insert one more event , that is CHANGED event of business object FIPP in workflow start condition. I hope you are using FIPP BO.

just do it and change your FI doc. workflow should trigger.

Regards,

Ibrahim

Former Member
0 Kudos

Hello Ibrahim,

the problem is that I don't have available the event CHANGED for the object type BUS2081. I only have the following ones:

APPROVED Release Document

ASSIGNED Link created

BLOCKEDPRICE Document Price Block

BLOCKEDQUANT Doc. Quantity Block

CANCELLED Document Reversed

COMPLETED Document Complete

COMPLETEDCHANGED Completed Doc. Chngd

COMPLETEDTORELEASE Complete: ReleaseRel

CREATED Document Generated

DELETED Document Deleted

PARKED Document Parked

POSTED Document Posted

REJECTED 2-way rejected

RELEASED Release Document

Do you know which should I use then?

Thank you.

Best regards.