Skip to Content
avatar image
Former Member

Custom Workflow Issue

Hi Team,

I have created new custom workflow(SWDD) and custom business objects(SWO1) as well activated the same on both.

I have done event linkage(SWU3).

If i execute business object individually, value is getting as per my logic.

Now, I have to call WF from custom program its keep on giving message "Event created - at least one receiver found". Please suggest me what i need to do further to pass custom values.

LV_OBJTYPE TYPE SWR_STRUCT-OBJECT_TYP VALUE 'ZBUSOBJ1',

LV_EVENT TYPE SWR_STRUCT-EVENT VALUE 'EMPDTL',

LV_OBJKEY = P_PERNR.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE = LV_OBJTYPE
OBJECT_KEY = LV_OBJKEY
EVENT = LV_EVENT
COMMIT_WORK = 'X'
EVENT_LANGUAGE = SY-LANGU
LANGUAGE = SY-LANGU
USER = SY-UNAME
IMPORTING
EVENT_ID = LV_EVENTID
TABLES
INPUT_CONTAINER = LT_INPUT_CONTAINER
MESSAGE_LINES = LT_MESSAGE_LINES
MESSAGE_STRUCT = LT_MESSAGE_STRUCT.
IF SY-SUBRC EQ 0.
COMMIT WORK.
ENDIF.

Thanks in Advance,

Jayaprakash N

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jul 24, 2017 at 05:58 AM

    Hi,

    I have found the way to pass the values into custom workflow.

    I just filled input container(INPUT_CONTAINER) in function module (SAP_WAPI_CREATE_EVENT). In input container, element as key field and Value as key field value.

    LW_INPUT_CONTAINER-ELEMENT = 'PersonnelNumber'.
    LW_INPUT_CONTAINER-VALUE = P_PERNR.
    APPEND LW_INPUT_CONTAINER TO LT_INPUT_CONTAINER.
    CLEAR : LW_INPUT_CONTAINER.

    Now value getting populate into my custom workflow.

    Regards,

    Jayaprakash Nagaraj

    Add comment
    10|10000 characters needed characters exceeded