Quantcast
Channel: SCN : Unanswered Discussions - SAP Business Process Management
Viewing all articles
Browse latest Browse all 3160

Workflow not triggered through SAP_WAPI_CREATE_EVENT

$
0
0

Hi All,

 

Im not a workflow expert, so please excuse my ignorance. I did however do my research and got the design work done. The problem I'm facing is that my Workflow is not getting triggered through the FM SAP_WAPI_CREATE_EVENT.

 

The Workflow I want triggered is through a BADI Implementation where Im using the above mentioned FM to trigger it.

    LOOP AT lt_email INTO ls_email.

      ls_evncnt-element = 'RECIPIENT'.

      ls_evncnt-value = ls_email-user_id.

      APPEND ls_evncnt TO event_cnt.

    ENDLOOP.

 

        CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'

          EXPORTING

            object_type     = 'ZGRC_HR_JC'

            object_key      = lv_objid       

            event           = 'JobCodeUpdate'

            commit_work     = ''

          IMPORTING

            return_code     = retcode

*           EVENT_ID        = eventid

          TABLES

            input_container = event_cnt

*           MESSAGE_LINES   = msg

*           MESSAGE_STRUCT  =

          EXCEPTIONS

            OTHERS          = 1.

        IF sy-subrc EQ 0 AND retcode = 0.

*         Message

        ENDIF.

 

Here lv_objid is defined as

DATA: lv_objid TYPE SWR_STRUCT-OBJECT_KEY.

 

The Business Object ZGRC_HR_JC has Key Field Object ID defined as data type: SWR_STRUCT-OBJECT_KEY. And Event Name JobCodeUpdate with Parameter RECIPIENT defined as SWWWIHEAD-WI_AAGENT.

 

In my Workflow Builder, I've set up the Triggering Event and did the Binding as shown:

 

Binding.PNG

 

The idea is to trigger a Work Item to be sent to the RECIPIENT derived in the BADI. Upon execution of the Standard program the WF is not getting triggered. Im pretty sure I made some mistake in the Binding, but Im not sure what or where. Appreciate your inputs. And please let me know if you need more information.

 

pk


Viewing all articles
Browse latest Browse all 3160

Trending Articles