SHARE
TWEET

Untitled

a guest Nov 21st, 2019 126 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. REPORT zwf_test.
  2.  
  3. DATA: et_workflist           TYPE TABLE OF swr_wihdr,
  4.       et_im_task_filter      TYPE  swrttask,
  5.       em_im_status_filter    TYPE swrtstatus,
  6.       et_worklist_attributes TYPE TABLE OF swr_wiaddattr.
  7.  
  8. APPEND VALUE #( wi_rh_task = 'TS96000355' ) TO et_im_task_filter.
  9.  
  10. CLEAR: et_workflist, et_worklist_attributes.
  11.  
  12. CALL FUNCTION 'SAP_WAPI_CREATE_WORKLIST'
  13.   EXPORTING
  14.     user                 = sy-uname
  15.     language             = sy-langu
  16.     translate_wi_text    = abap_false
  17.     passive_substitution = abap_true
  18.     im_task_filter       = et_im_task_filter
  19. *   im_status_filter     = em_im_status_filter
  20.   TABLES
  21.     worklist             = et_workflist
  22.     worklist_attributes  = et_worklist_attributes.
  23.  
  24. SELECT SINGLE us_name FROM hrus_d2 INTO @DATA(lv_user) WHERE rep_name = @sy-uname AND endda >= @sy-datum AND active = @abap_true.
  25. *
  26. IF lv_user IS NOT INITIAL.
  27.   DATA(lv_rep) = abap_true.
  28. ENDIF.
  29.  
  30. IF lv_rep IS NOT INITIAL.
  31.   DELETE ADJACENT DUPLICATES FROM et_workflist COMPARING wi_chckwi.
  32.   WRITE:/ 'deleted' , sy-dbcnt, 'dublicates'.
  33. ENDIF.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top