on 02-01-2013 12:51 AM
Hello Experts,
We have custom workflow developed behind the menu exit button of a standard SAP tcode and it is working fine in SAP GUI. Now we want to use the same workflow template to trigger it from a WebUI platform, we have added a custom toolbar button in the Webdynpro application and on the button event we have to execute the same workflow template. Any idea how to do it?
Hi,
This is one of the F.M which can used to trigger Workflow,whether its in Webdynpro or ABAP.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = BUSINESS OBJECT NAME
objkey = Pass B.O KEY value
EVENT = B.O EVENT NAME
* CREATOR = ' '
* TAKE_WORKITEM_REQUESTER = ' '
* START_WITH_DELAY = ' '
* START_RECFB_SYNCHRON = ' '
* NO_COMMIT_FOR_QUEUE = ' '
* DEBUG_FLAG = ' '
* NO_LOGGING = ' '
* IDENT =
* IMPORTING
* EVENT_ID =
* RECEIVER_COUNT =
* TABLES
* EVENT_CONTAINER =
* EXCEPTIONS
* OBJTYPE_NOT_FOUND = 1
* OTHERS = 2
.
Thanks,
Nandi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use below function module in your application
i also faced same isssue earlier
CALL FUNCTION 'SAP_WAPI_WORKITEMS_TO_OBJECT'
go through this link
Regards,
Manu
Hi Parin,
You can trigger workflow at the button pressed event by using:
try.
call method cl_swf_evt_event=>raise
exporting
im_objcateg = ls_sibflpord-catid "Workflow: Object Type 'BO', 'CL' ...
im_objtype = ls_sibflpord-typeid "Object Type, Class
im_event = iv_event "Event Name
im_objkey = ls_sibflpord-instid. "Object Key
catch cx_swf_evt_invalid_objtype into lr_oref.
lv_msg = lr_oref->get_text( ).
catch cx_swf_evt_invalid_event into lr_oref.
lv_msg = lr_oref->get_text( ).
endtry.
Check out these useful links also
http://scn.sap.com/docs/DOC-25262
Hope it helps! Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.