on 2009 Mar 25 4:42 AM
Hi,
I have created a template with 2 steps.
1. An activity which runs a BOR method.
2. Send mail.
After executing the activity I want a mail in my inbox.(activity is not background).
Now I need to cal this template in one of my program.
Can some one give me sample code to cal the WF template in my prgm such that i will get a text mail to my inbox. Im not using any events to trigger the WF.
Thanks.
Hello,
Search for SAP_WAPI_START_WORKFLOW in this forum.
regards
Rick Bakker
Hanai Technology
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does the entire workflow is getting completed .
What is the receipient type you have selected in the mail step
I mean
Organizational OBJECT
WF INitiator
Email Addrress
If you are using the 1st one and in the EXPRESSION if you are sending the mail by using the SAP USERID then make sure that you append US to the SAP userid
Hi,
Have you given Proper Agent Assignment??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apart from the below mentioned Fm you can even use WAPI functions to start the workflow
SAP_WAPI_START_WORKFLOW
INCLUDE cntn01_swc.
DATA :
t_customer TYPE
STANDARD TABLE
OF kna1,
w_task TYPE swwwihead-wi_rh_task VALUE 'WS99002337',
t_cont TYPE TABLE OF swcont,
w_entires TYPE i VALUE 3.
SELECT *
FROM kna1
INTO TABLE t_customer
UP TO 3 ROWS.
swc0_set_table t_cont 'CUST' t_customer.
swc0_set_element t_cont 'ENTRIES' w_entires.
CALL FUNCTION 'EWW_WORKFLOW_START'
EXPORTING
x_task = w_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.
check this code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
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.