dear sir,
I used a function in SWEHR3 to create an event using
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
object_type = 'ZOBJ'
object_key = businessobjectkey
event = 'REQUESTED'
commit_work = 'X'
event_language = sy-langu.
COMMIT WORK.
CALL FUNCTION 'SAP_WAPI_WORKITEMS_TO_OBJECT'
EXPORTING
* OBJECT_POR =
OBJTYPE = lv_objid
OBJKEY = lv_objkey
TOP_LEVEL_ITEMS = 'X'
SELECTION_STATUS_VARIANT = 0001
* TIME =
TEXT = 'X'
OUTPUT_ONLY_TOP_LEVEL = ' '
LANGUAGE = SY-LANGU
* DETERMINE_TASK_FILTER = 'X'
* REMOVED_OBJECTS = ' '
IMPORTING
RETURN_CODE = lv_stat
TABLES
* TASK_FILTER =
worklist = it_wlist
MESSAGE_LINES = it_lines
* MESSAGE_STRUCT =
But the strange this is that the it_wlist is empty and there is no workitem id found.
And when I used SE37, I can see the created workitem, what's seem to be wrong here? is the workitem is not created during the requested event?
Thanks,
Sam