on 05-08-2006 9:46 AM
Hi All,
can any one help me how to create an User Event(T-code sm62) through ABAP code and also please let me know how does USER Event work.
regards,
Lakshmikanth.T.V
1) SM62->Maintain User Events->Create
2) You can use SM64 to trigger manually the event..
FM 'BP_EVENT_RAISE' is used to trigger Background Event.
Trigger an event in the background processing system. This function module is for use in programs written in ABAP/4. Triggering an event tells the background processing system to start any background jobs that were scheduled to wait for the event.
You can trigger an event with or without an event argument, a string that more precisely identifies an event. Jobs can be scheduled to wait for an event for the combination of event and a particular event argument.
EVENTID is just an identifier to locate the event.
You can find this event in transaction SWEL/SWE2 transactions.
http://help.sap.com/saphelp_nw04/helpdata/en/fa/096e51543b11d1898e0000e8322d00/frameset.htm
regards
vinod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Here I have created an event to trigger a workflow.
Use the function module 'SWE_EVENT_CREATE' to create an event.
Data for workflow trigger
DATA: objtype LIKE swetypecou-objtype,
objkey LIKE sweinstcou-objkey,
event LIKE swetypecou-event,
event_container LIKE swcont OCCURS 0 WITH HEADER LINE.
objtype = 'ZBUS1001'. "Material [sub object of BUS1001]
MOVE v_wfmatnr TO objkey. "V_WFMATNR is material number
event = 'CreatePLMMaterial'."Custom Event defined in
ZBUS1001 [Tcode SWO1]
REFRESH event_container.
*Following are the Event parameters required in the *Workflow
swc_set_element event_container 'Attachment' v_wfattachment.
swc_set_element event_container 'Material' v_wfmatnr.
swc_set_element event_container 'TisGroup' v_wftisgroup.
swc_set_element event_container 'SchDate' v_schdate.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = objtype
objkey = objkey
event = event
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.
ENDIF.
COMMIT WORK.
<b>Please reward helpful answer.</b>
Regards,
Amit Mishra
User | Count |
---|---|
9 | |
4 | |
3 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.