I am working with SAP CRM 7.0. We have a workflow in the system which is triggered at the creation of complaint(BO:BUS2000220) and then assign the complaint workitem
in the woklist of specified agent. I have created a report and scheduled it daily to forward the complaint into the worklist of user B from worklist of user A after 7 days
from creation date of complaint. But the problem is that the forwarded complaint is showing in the worklist of user B with sent date(the creation date of complaint, not the
forwarded date).
Relevant code:
IF gw_complain-PROCESS_TYPE = 'ZCMS' AND age_complaint = 8.
CALL FUNCTION 'SAP_WAPI_WORKITEMS_TO_OBJECT'
EXPORTING
objtype = 'BUS2000120'
objkey = obj_guid_key
top_level_items = ' '
SELECTION_STATUS_VARIANT = 0001
IMPORTING
return_code = return_code
TABLES
worklist = it_worklist[].
READ TABLE it_worklist INTO wa_worklist WITH KEY wi_type = 'W'.
CALL FUNCTION 'SAP_WAPI_FORWARD_WORKITEM'
EXPORTING
workitem_id = wa_worklist-wi_id
USER_ID = wa_worklist_esc-ESC_USER
LANGUAGE = SY-LANGU
DO_COMMIT = 'X'
CURRENT_USER = wa_worklist_esc-CURRENT_USER
IMPORTING
RETURN_CODE = lv_return_code
TABLES
MESSAGE_LINES = lv_mesg
* MESSAGE_STRUCT =
* USER_IDS =
.
- ENDIF.
Can someone help me how to change the sent date to actual forwarded date of complaint.