on 09-26-2008 10:17 AM
Hi all,
i am new to Work flow,
can any body tell me how can i trigger the work flow from my abap program, and how can i send the required details from the program to W/F ?
kumar
INCLUDE <cntn01>.
DATA :
t_spfli TYPE
STANDARD TABLE
OF spfli
WITH HEADER LINE,
t_cont TYPE
STANDARD TABLE
OF swcont,
wa_task TYPE swwwihead-wi_rh_task VALUE 'WS99900012'.
SELECT *
FROM spfli
INTO TABLE t_spfli
UP TO 30 ROWS.
swc_set_table t_cont 'TS_SPFLI' t_spfli.
CALL FUNCTION 'EWW_WORKFLOW_START'
EXPORTING
x_task = wa_task
TABLES
x_container = t_cont
EXCEPTIONS
invalid_task = 1
no_active_plvar = 2
start_failed = 3
general_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
WRITE :
/ 'Workflow Triggered'.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for the support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi every body,
i triggered the event of the my work flow from the ABAP code ( using function module SAP_WAPI_CREATE_EVENT ). but i couldnt see any messages or work flows to be carried out in my (user) inbox(Business Work Place).i used the FORMABSC BUsiness object in the work flow.
And also i configured the agent as user (my name).
can anybody tell me what would be the problem? or else is anything is required to configure in the basis side?
thanks,
kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Narin,
i am new to WF,
it was not clear, actually i want to integrate the work flow with BPM in PI (Process Integration 7.0.
i am trying to create WF part in the SAP R/3, for the the Aproval part, because PI 7.0 doesnt have the feature User decision. So i am trying to push the data of Leave details to the WF and trigger the WF in the R/3 through a proxy program.
For creating Work flow, is Bussiness Object needed? What is the use of it, but i dont have any Business object for my Leave details, What to do?
My actual thought is,
1. create srcreen in SAP R/3, which has all the relevent fields of Leave details like emp_id, start date, end date, leave balance. i will put user commands(push buttons) like Approve, Reject, change.
In Wf this screen should apear with the leve fields with the corresponding values and push buttons.
once the manager or aprover clicks any the push buttons, in the next step the corresponding action should be done.
in this, is it possible to put the logic to capture the status of the WF like approved or Rejected? and send it back to the program in which this WF called?
Is it possible? or is there any alternative solution?
here in this i have query, how can i proceed? and what are the pre requisits to create WF?( like Busines Objects, triggring events, sep sequences, contaner elements, data base tables and structures etc.) and how do i create it?
can you give me the code? and Tcodes, to maitain events, etc....
can anybody help me?
thanks,
kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
i am trying to create W/F using forms.
the first step is a Approved Form.
in this form i want to display the emp leave aplied details like emd_id, start_date, end_date.
the actual values of this fields should come from the program (internal table).
this can be Approved or Rejected by the manager.
once he approved or rejected , the status should be caught and send it to the called program.
here the question is how can i pass the emp leave details to the Approved form from my program?
And how can i caught the status of the workflow steps and send back to the program?
can anybody tell me?
kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kumar,
Everything matters with Binding between the Business object Event and the Workflow Container Elements
and some code..
Please check this link..
In SWE_EVENT_CREATE pass the table values and do the binding perfectly in Workflow Start Events..
Declare a Multiline Element in workflow for binding.
Please check this thread for procedure
Hope this would help you.
Good luck
Narin
hi, thanks....
but how can i create the event, and how can i link with the work flow?
thanks.....
kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kumar,
Please check this link for [Triggering Events Through program|http://saptechnical.com/Tutorials/Workflow/EvtsPrg/EvtsPrg.htm]
As above is the programming part to trigger the Business object Event , these are the steps that should be done in Workflow(SWDD) tcode.
In SWDD Tcode:
1) In START EVENTS ( IN HEADER DATA) of WORKFLOW specify the Business object and
metion the event by which the workflow has to be triggered.
2) Acivate the binding which is there beside the Business object in start events itself
3) Specify a Acitvity step and Create a Task and in that Task specify the Business object and
the method that should get executed when a Workitem gets executed.
4) Activate the workflow
5) Switch on the event trace from SWELS tcode
6) Execute the Tcode which triggers the change document object or by another process
which triggers the change document object.
7) Switch off the event trace using SWELS
8) Check the Event trace using SWEL
9) Find your worlflow in the RECIEVER column of the Event trace in the line of Business object..
10) Find you WORKITEM in INBOX and Execute it. You will be Navigated to MM01 Tcode as it is
mentioned in BO Method.
Hope this would help you and solve your issue.
Good luck
Narin.
Hi
if an event exists for that particular workflow then the best way is to use fm SAP_WAPI_CREATE_EVENT,
to start a workflow from an ABAP you can use fm SAP_WAPI_START_WORKFLOW.
refer to the link below for a detailed discussion on the topic
Also refer
http://help.sap.com/saphelp_erp2005vp/helpdata/en/c5/e4a930453d11d189430000e829fbbd/frameset.htm
The below is the link for tutorial of workflow programming
http://help.sap.com/saphelp_nw04s/helpdata/en/fb/1359c4457311d189440000e829fbbd/frameset.htm
Hope this helps
Regards
Shilpa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
you need to use the FM "SWE_EVENT_CREATE" to trigger the event from an abap prog. this in turn will trigger the appropriate WF.
you can send the required details from program to WF in the "event_container" parameter of the FM.
if you search for SWE_EVENT_CREATE in this forum, you will easily get details on how to use it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.