on 09-13-2012 4:42 PM
Hi,
Currently, we allow both employee, as well as Travel admin on behalf of an employee, to create Travel requests and Travel claims in the Portal. In both scenarios, either the employee or Travel admin can fill up a request and/or claim and once they select "SAVE and SEND", a workflow is triggered to send a work item to the approving manager. This all works fine. However, we now have a requirement that if it is a Travel admin creating the request/claim for the employee, they should only "SAVE" the trip and an email will be sent to the employee requesting him to SAVE and SEND the trip himself. We already have a function to send emails for all our different workflow scenarios and we just want to create a new workflow to call this existing send email function.
My question is: Which event should I use which would be triggered on "SAVE". From researching, it sounds like the events BUS2089.Created and BUS2089.Changed for Claims and BUS2089.RequestCreated and BUS2089.RequestChanged are what I need. Could someone please confirm that these events will be triggered on Portal "SAVE" option? Also, in PR05, would the same events be triggered with status Request Recorded/Open and Trip Completed/Open?
If workflow is not possible at the SAVE level, is there a BADI that gets triggered only on SAVE?
Thanks, any guidance would be appreciated.
Jinny
Hi Jinny,
some feedback would be nice. Were you able to accomplish what you wanted?
Cheers, Lukas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jinny,
Instead of WF you can directly call FM to trigger mail.
Go to Component FITV_FPM then go to View LAYOUT_VIEW
inside ONACTIONNAVIGATE event
you can write your logic under this case statement
WHEN IF_FITV_FPM_API=>GC_NAVIGATE_SR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nayan Baseshankar wrote:
Hi Jinny,
Instead of WF you can directly call FM to trigger mail.
Go to Component FITV_FPM then go to View LAYOUT_VIEW
inside ONACTIONNAVIGATE event
you can write your logic under this case statement
WHEN IF_FITV_FPM_API=>GC_NAVIGATE_SR.
Interesting, but with this, all plausibility and technical checks would be skipped and a mail might be sent even if the process is interrupted. This isn't consistent in my opinion.
Hi Jinny,
there is no standard event being triggered from Saving a Trip in Status 1 - 0. When you take a look at the code within Include FITP_WORKFLOW in Form TRIGGER_WORKFLOW...
CASE statu-abrec.
WHEN '0'.
* begin WBGK024026;
CASE statu-antrg.
WHEN '5'. event = 'RequestWaits'. "#EC NOTEXT
WHEN '6'. event = 'ExpenseWaits'. "#EC NOTEXT
ENDCASE.
* end WBGK024026;
WHEN '1'.
CASE statu-antrg.
* WHEN '1'. EVENT = 'Requested'. "#EC NOTEXT "WBGK024026
WHEN '1'. event = 'RequestCreated'. "#EC NOTEXT "WBGK024026
WHEN '2'. event = 'RequestApproved'. "#EC NOTEXT
WHEN '3'. event = 'Created'. "#EC NOTEXT
WHEN '4'. event = 'Approved'. "#EC NOTEXT
* begin WBGPLN;
WHEN '5'. event = 'RequestWaits'. "#EC NOTEXT
WHEN '6'. event = 'ExpenseWaits'. "#EC NOTEXT
* end WBGPLN;
ENDCASE.
...you can see all Events for all statuses of ANTRG are already being used in standard and they are only triggered when ABREC is 1, which isn't the case in draft save mode.
If I was in your position I would approach in the following way:
Make an implicit enhancement at the beginning at the form and set event=RequestCreated if antrg = 1 and abrec = 0. This will be inconsistent to the standard behaviour but can then again be reorganized in the handling of the workflow. You'd have to read the status of the trip in the workflow again and then distinguish whether it is a draft or a send-and-save and proceed respectively.
Cheers, Lukas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.