cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get work item related document changes?

Alexander-Dick
Discoverer
0 Kudos

I have following situation:

workflow process is running. An approver A get "work item 1" and do some SC changes, which leads to a back to requester event.

Requester do no changes in SC, he accepts the approver changes. Workflow restarts. Approver A get a work item 2.

And now if I'm reading SC changes with FM BBP_CHANGE_DOC_GET_NEW and filter for the approver A changes, I, of course, get old changes, which are not related to the new work item 2. So that work flow goes back to requester again, it's simply a back to requester loop.

Therefore I would like to know how to get the WI related doc changes. Not all doc changes.

Accepted Solutions (1)

Accepted Solutions (1)

Alexander-Dick
Discoverer
0 Kudos

Solution was:

DATA: lt_change_documents TYPE bbpt_changedoc_cdred,
      lt_times        TYPE /sapsrm/t_wf_common_wi_period,
      ls_workitem_period  TYPE /sapsrm/s_wf_common_wi_period.

lt_times = /sapsrm/cl_wf_doc_change_util=>get_time_periods_of_last_wis( is_document = is_document ).
READ TABLE lt_times INTO ls_workitem_period INDEX 1.

lt_change_documents = /sapsrm/cl_wf_doc_change_util=>get_doc_changes_in_time_period( is_document = is_document
  is_workitem_period = ls_workitem_period ).

Answers (0)