starting a workflow periodically
???? ????
Ronen at mccann-kb.co.il
Wed Mar 27 06:03:25 EST 2002
Hello Jocelyn and Uli
Since I am not a programmer, I would appreciate if you could send me a =
more specific example of how to use the FM SWW_WI_START in an abap =
report. the input parameter will be the task name.=20
there is no business object involved. only the task has to be started =
without any input data
very similar to running transaction SWUS with the task name and no input =
data
i tried to write something like the following example, but it doesn't =
seem to work
thanks,
ronen (that's my name here)
sample of code
REPORT Z_START_WORKFLOW .
parameters task like SWU_WFSTRT-TASK.
CALL FUNCTION 'SWW_WI_START'
EXPORTING
* CALLBACK_FB =3D ' '
* CHECKED_WI =3D NO_ID
* CONFIRM =3D ' '
creator =3D SY-UNAME
* DESIRED_END_ACTION =3D TSWW-WI_DEF_DH_ACT
* DESIRED_END_DATE =3D NO_DATE
* DESIRED_END_TIME =3D NO_TIME
* DESIRED_START_DATE =3D NO_DATE
* DESIRED_START_TIME =3D NO_TIME
LANGUAGE =3D SY-LANGU
* LATEST_END_ACTION =3D TSWW-WI_DEF_DH_ACT
* LATEST_END_DATE =3D NO_DATE
* LATEST_END_ESCALATION =3D NO_ESC
* LATEST_END_TIME =3D NO_TIME
* LATEST_START_ACTION =3D TSWW-WI_DEF_DH_ACT
* LATEST_START_DATE =3D NO_DATE
* LATEST_START_TIME =3D NO_TIME
* MAX_EVENT_COUNT =3D EI_DEF_MAX_EVT_CNT
* PRIORITY =3D NO_PRIO
task =3D TASK
* WORKITEM_TYPE =3D ' '
* DO_COMMIT =3D 'X'
* DO_SYNC_CALLBACK =3D ' '
* TEXT =3D ' '
* DO_SYNC_WI_CHAIN =3D ' '
* CREATED_BY_USER =3D SY-UNAME
* CREATED_BY_ADDRESS =3D ' '
* CALLED_IN_BACKGROUND =3D ' '
* STEP_MODELED_WI_DISPLAY =3D ' '
* NO_DEADLINE_PARAMETERS =3D ' '
* RESTRICTED_LOG =3D ' '
* SECONDS_UNTIL_TIMEOUT =3D
* CREATE_EVENT =3D ' '
* STATUS_EVENT =3D ' '
* WLC_FLAGS =3D
* IMPORTING
* WI_ID =3D
* WI_HEADER =3D
* RETURN =3D
* WI_RESULT =3D
* tables
* AGENTS =3D
* DEADLINE_AGENTS =3D
* DESIRED_END_AGENTS =3D
* LATEST_START_AGENTS =3D
* EXCLUDED_AGENTS =3D
* NOTIFICATION_AGENTS =3D
* SECONDARY_METHODS =3D
* wi_container =3D
* COMP_EVENTS =3D
* EXCEPTIONS
* ID_NOT_CREATED =3D 1
* READ_FAILED =3D 2
* IMMEDIATE_START_NOT_POSSIBLE =3D 3
* EXECUTION_FAILED =3D 4
* INVALID_STATUS =3D 5
* OTHERS =3D 6
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
-----Original Message-----
From: Dart, Jocelyn [mailto:jocelyn.dart at sap.com]
Sent: Wednesday, March 27, 2002 12:38 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: starting a workflow periodically
Hi Uli and ...
Please include <cntn01> not <cntain> - <cntain> was the
very very old include (3.0 something), <cntn01> should be used instead =
in
all systems.
Regards,
Jocelyn Dart
Consultant (EBP, BBP, Ecommerce, Internet Transaction Server, Workflow)
SAP Australia
Email jocelyn.dart at sap.com <mailto:jocelyn.dart at sap.com>
Tel: +61 412 390 267
Fax: +61 2 9935 4880
-----Original Message-----
From: Ulrich Mende [mailto:wug at mende-edv-beratung.de]
Sent: Tuesday, 26 March 2002 7:05 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: starting a workflow periodically
Hi ... (sorry, your name appears cryptic in the mail)
I would write a report, that determines the object instance on which the
workflow should run. In the report I would call FM SWE_EVENT_CREATE to
start a workflow via event or FM SWW_WI_START to start it directly. Then
I would put this report in a periodic job (TA SM36).
Since you will have to create an object (swc_create_object) and fill a
container (swc_set_element) , don't forget to include <cntain>.
Best regards Uli
xepo tewq <Ronen at mccann-kb.co.il> schrieb am 26.03.2002, 07:03:02:
> what is the neatest way to have a workflow 'start' every week on a =
fixed
date ?
>
> thanks and happy passover
> peace to all
>
> ronen
>
> periodically
More information about the SAP-WUG
mailing list