on 10-17-2008 11:22 AM
hi all,
I have a wait for event step in my owrkflow and it is working fine. My problem us i am not able to trigger this event using program can anyone please let me know what i am doing wrong. following is the code i am using to trigger the event
DATA: key TYPE SWEINSTCOU-OBJKEY,
object TYPE SWETYPECOU-OBJTYPE,
event TYPE SWETYPECOU-EVENT.
DATA: event_id LIKE swr_struct-event_id,
return_code LIKE sy-subrc,
input_container TYPE swr_cont OCCURS 0 WITH HEADER LINE,
message_lines TYPE swr_messag OCCURS 0 WITH HEADER LINE,
message_struct TYPE swr_mstruc OCCURS 0 WITH HEADER LINE.
* CONCATENATE pernr reinr INTO key.
key = reinr.
object = 'BUS2089'.
IF action = 'APPROVED'.
event = 'APPROVED'.
ELSEIF action = 'REJECTED'.
event = 'CANCELLED'.
ENDIF.
* swc_create_object object 'BUS2089' key.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
object_type = 'BUS2089'
object_key = key
event = event
commit_work = 'X'
event_language = sy-langu
language = sy-langu
user = sy-uname
* IFS_XML_CONTAINER =
IMPORTING
return_code = return_code
event_id = event_id
TABLES
input_container = input_container
message_lines = message_lines
message_struct = message_struct
.
*
commit WORK.
however if i execute the FM SAP_WAPI_CREATE_EVENT by passing the values it works fine.
Thanks
Saurabh
Hi
however if i execute the
FM SAP_WAPI_CREATE_EVENT by passing
the values it works fine.
It will trigger only when you execute the above function module or
SWE_EVENT_CREATE because
You have a BO and an event associated with it now when you want to trigger this this event through program then you have to make a kind of mapping between BO and your program so thta's what this Fm does, when ever you execute the program as you are passing all the values to the Function the Evnt associated with the BO is triggered.
In order to trigger use SWE_EVENT_CREATE aand after calling this fucntion use COMMIT WORK statement
Could you let me know what condidtion did you write for the WAIT step to continue.
Regards
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You probably found this yourself also because the question is answered, but the key is not correct in your program.
Regards,
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.