Work flow triggering from report.

ranga prasad prasap1 at yahoo.com
Mon Oct 20 02:19:39 EDT 2003


Hi Dart,
 
Im able to trigger workflow from report.My code is as follows.
 
Work item is coming and sitting in my inbox.
 
But when i execute the work item its giving error like "OBJECT NOT FOUND"
 
object created was like......
 
swc_create_object object 'bus2032' 00001473637(sale ord no.).
 
i also initiated container.........
 
event_cont-element = '_EVT_OBJECT'.
 
event_cont-element = object.
 
append event_cont.
 
event_cont-element = '_EVT_CREATOR'.
 
event_cont-element = 'USTATA14'.
 
 
 
my full src code follows...........
 
 
 
REPORT ZWOTEST01 .
 
include <cntn01>.
 
data : object type swc_object.
 
data : event_cont type SWR_CONT occurs 0 with header line.
 
data : event_cont like standard table of swcont.
 
swc_create_object object 'bus2032' 00001473637.
 
if sy-subrc eq 0.
 
write:/ 'object created'.
 
endif.
 
event_cont-element = '_EVT_OBJECT'.
 
event_cont-element = object.
 
append event_cont.
 
event_cont-element = '_EVT_CREATOR'.
 
event_cont-element = 'USTATA14'.
 
append event_cont.
 
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
 
EXPORTING
 
OBJECT_TYPE = 'BUS2032'
 
OBJECT_KEY = '00001473637'
 
EVENT = 'CHANGED10DAYSBACK'
 
COMMIT_WORK = 'X'
 
* EVENT_LANGUAGE = SY-LANGU
 
* IMPORTING
 
* RETURN_CODE =
 
* EVENT_ID =
 
* TABLES
 
INPUT_CONTAINER = event_cont
 
* MESSAGE_LINES =
 
* MESSAGE_STRUCT =
 
.
 
IF SY-SUBRC EQ 0.
 
WRITE:/ 'EVENT CREATED'.
 
ENDIF.
------------------------->
 
"Dart, Jocelyn" <jocelyn.dart at sap.com> wrote:Hi Prasad,
Yes you can use function module SAP_WAPI_EVENT_CREATE if you wish.
Suggest you also set up your event to use the event queue method so that if a large volume of events are created at the same time then the event queue will smooth out the load on the system.
Regards,
Jocelyn Dart
Consultant (SRM, EBP, Workflow)
and co-author of the book
"Practical Workflow for SAP"
SAP Australia
email: jocelyn.dart at sap.com
phone: +61 412 390 267
fax: +61 2 9935 4880
 
 
 
 
 
-----Original Message-----
From: ranga prasad [mailto:prasap1 at yahoo.com]
Sent: Saturday,18 October 2003 4:55 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Work flow triggering from report.
 
 
My requirement is i have to trigger workflow from a report scheduled on daily basis.
ie
i have to check all sale orders and if the age of saleorder is 10(means a sale order has been not touched for 10 days),On 10th day i have to trigger work flow for each of sale order.Is it posible via XXX_WAPI_EVENT_CREATE method.
 
Cheers
Prasad
 
 
 
 
 
 
 
 
 
---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search Shopping - with improved product search
 
 
---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
 


More information about the SAP-WUG mailing list