Skip to Content
0
Former Member
Jun 26, 2007 at 03:39 PM

triggering workflows

17 Views

hi all

i am using SWE_EVENT_CREATE function module to trigger my event as follows

DATA: KEY LIKE swetypecou-objtype.

DATA: EVENT_CONTAINER LIKE SWCONT OCCURS 0 WITH HEADER LINE.

swc_create_element event_container 'I_LFA1' .

SWC_SET_ELEMENT event_container 'I_LFA1' i_lfa1.

KEY = i_lfa1-lifnr.(value from work area)

CALL FUNCTION 'SWE_EVENT_CREATE'

EXPORTING

objtype = 'Z_VEND'

<u><i><b>objkey = 'key</b></i></u>

event = 'CHECK'

  • CREATOR = ' '

  • TAKE_WORKITEM_REQUESTER = ' '

  • START_WITH_DELAY = ' '

  • START_RECFB_SYNCHRON = ' '

  • NO_COMMIT_FOR_QUEUE = ' '

  • DEBUG_FLAG = ' '

  • NO_LOGGING = ' '

  • IDENT = IDENT

  • IMPORTING

  • EVENT_ID = EVENT_ID

TABLES

EVENT_CONTAINER = EVENT_CONTAINER

EXCEPTIONS

OBJTYPE_NOT_FOUND = 1

OTHERS = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

commit work.

ENDIF.

i am getting an error that the key specified is not allowed as it is not of type that is allowed in parameter objkey.

any pointers will be really helpfull

regards

navjot