cancel
Showing results for 
Search instead for 
Did you mean: 

triggering workflows

Former Member
0 Kudos

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

View Entire Topic
Former Member
0 Kudos

hai navjot sharma

declear the data statement likethis and follow the following sample code.

DATA: KEY LIKE SWEINSTCOU-OBJKEY.

KEY = '1163'.

CALL FUNCTION 'SWE_EVENT_CREATE'

EXPORTING

objtype = 'BUS1001006'

objkey = KEY

event = 'CREATED'

regards

rose.

KKilhavn
Active Contributor
0 Kudos

Pretty much what Samson already said, isn't it?