on 05-14-2010 6:15 AM
hi gurus,
how to pass the data from web dynpro to workflow.
Regards
vijay
Hi ,
To pass the values from Web dynpro to Work flow you have to use the workflow containers.
1) create containers in Workflow.
2) Initialize these containers in your webdynpro with the help of FM
lv_objtype = Work flow task
lv_event = workflow event
lv_objkey = ''.
Instantiate an empty event container
call method cl_swf_evt_event=>get_event_container
exporting
im_objcateg = cl_swf_evt_event=>mc_objcateg_cl
im_objtype = lv_objtype
im_event = lv_event
receiving
re_reference = lr_event_parameters.
3) read and pass the webdynpro values to these containers
use the FM call method lr_event_parameters->set
exporting
name =
value =
4) Use the following FM to finally pass to the Workflow.
call method cl_swf_evt_event=>raise
exporting
im_objcateg = cl_swf_evt_event=>mc_objcateg_cl
im_objtype = lv_objtype
im_event = lv_event
im_objkey = lv_objkey
im_event_container = lr_event_parameters.
now after trigger the workflow from webdynpro you can find your values in the workflow.
Hope this is Useful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
you can use function module
data ls_input_container TYPE swr_cont.
data lt_input_container TYPE TABLE OF swr_cont.
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
task = ptask
IMPORTING
return_code = lv_return_code
new_status = lv_new_status
TABLES
input_container = pinput_container
message_lines = lt_message_lines
message_struct = lt_message_struct.
where you pass the data in imnternal table "pinput_container" as
ls_input_container-element = 'KUNNR'.
ls_input_container-value = ls_skna1-kunnr ."wd_this->lv_kunnr.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'CLUSER'.
ls_input_container-value = lv_cluser.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'BUKRS'.
ls_input_container-value = lv_bukrs. " youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'VKORG'.
ls_input_container-value = ls_sknvv-vkorg. " youe value as per requirement
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'VTWEG'.
ls_input_container-value = ls_sknvv-vtweg. "youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'SPART'.
ls_input_container-value = ls_sknvv-spart. "youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
*Also Forgot to mention where ptask is your workflow ID *
Regards,
Arvind
Edited by: Arvind Patel on May 14, 2010 7:38 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.