Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3273

Re: Work Item ID

$
0
0

Dear All,

 

I require work item at the time of workflow get initiate( Triggering the workflow through class event).

I have requirement to send the multiple documents for approvals, the same documents might be resend for approvals many times also.

 

  • If the same documents are sent for approvals, i need to save the history of those(Obviously I have keys to store).
  • I need to display the history as well in the report and need to display the Approvers of those workflows(Approvers can be different )

I have coded the below piece in my class method to trigger the workflow,

 

CALL METHOD cl_swf_evt_event=>raise(

            EXPORTING

             im_objcateg        = cl_swf_evt_event=>mc_objcateg_cl

             im_objtype         = lv_objtype

             im_event           = lv_event

             im_objkey          = lv_objkey

             im_event_container = lr_event_parameters ).

 

       CATCH cx_swf_evt_invalid_objtype .

       CATCH cx_swf_evt_invalid_event .

     ENDTRY.

 

     COMMIT WORK.

 

DATA: lt_swr_wihdr TYPE STANDARD TABLE OF swr_wihdr,

       lv_key TYPE swotobjid-objkey.

 

     lv_key = lv_objkey.

DATA lv_sibflporb TYPE sibflporb.

 

     lv_sibflporb = m_lpor.

     break-point.

     CALL FUNCTION 'SAP_WAPI_WORKITEMS_TO_OBJECT'

      EXPORTING

        object_por                     = lv_sibflporb

        objkey                          = lv_key

       TABLES

*       TASK_FILTER                    =

         worklist                       = lt_swr_wihdr


Viewing all articles
Browse latest Browse all 3273

Trending Articles