on 06-26-2007 4:39 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for your help and support friend.
Thanks and Regards,
Rachit khanna
Message was edited by:
Rachit Khanna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks guys
sometimes small things are overlooked.
regards
navjot
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Navjot,
Please change the declaration of the variable KEY to the following
DATA: KEY LIKE swetypecou-objkey. ( not objtype).
Hope this will help.
Regards,
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.