‎2006 Dec 08 2:45 AM
Hi,
I have a workflow and I want to update the initial value of a container element through a report. Can anyone tell me what classes and methods to be used?
I tried the following way but the container element's value is not updated.
data : container type REF TO CL_SWF_CNT_CONTAINER,
ok_container type XFELD,
value TYPE asr_form_scenario.
CREATE OBJECT container.
CALL METHOD container->if_swf_cnt_container~set_guid
EXPORTING
guid_32 = 'WS95000614'
receiving
ok = ok_container
.
if ok_container = 'X'.
CALL METHOD container->if_swf_cnt_element_access_1~element_set_value
EXPORTING
name = 'Form_SHI2'
qname =
value = 'SHI1'
unit =
IMPORTING
exception_return =
.
endif.
Thanks & Regards,
Reena
‎2006 Dec 08 4:00 AM
‎2006 Dec 08 4:15 AM
hi
good
go through these links, i hope these ll help you to solve your problem.
/people/jocelyn.dart/blog/2006/07/27/raising-abap-oo-events-for-workflow
http://www.erpgenie.com/workflow/tips.htm
thanks
mrutyun^
‎2006 Dec 08 4:48 AM
Hi Reena,
I had a scenario like i need to trigger a Workflow through a Report Program. If you too are working in similar kind of scenario then you can do like this,
Declare the following datas.
TYPES: BEGIN OF gty_zbus100106_key,
idnrk LIKE stpo-idnrk,
werks LIKE marc-werks,
END OF gty_zbus100106_key.
DATA: gv_objectkey LIKE sweinstcou-objkey,
gwa_zbus100106_key TYPE gty_zbus100106_key.
loop at the internal table.
Move key values to gwa_zbus100106_key.
move gwa_zbus100106_key to gv_objectkey.
Use Function module to trigger the Workflow.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
object_type = gc_objecttype " 'ZBUS100106'
object_key = gv_objectkey " Object Key (Material No+Plant)
event = gc_event " 'ZMMEXT'
commit_work = 'X'
IMPORTING
return_code = lv_ret_code
event_id = lv_event_id.
endloop.
This will work. But let me know if this your scenario so if anyother thing then i could try to find any class or methods to solve this issue.
Thanks
Prashanth