Using SAP_WAPI_RAISE_EVENT in WAS 6.2QUEST

Dart, Jocelyn jocelyn.dart at sap.com
Mon Aug 25 19:30:21 EDT 2003


Hi Venkat,
Containers for WAPIs are simple containers.  Just name and value.
For lists you just enter the name and value multiple times.
 
For SWE_EVENT_CREATE you need to create the container using the
workflow macros such as swc_set_element.
 
See a BC610/BIT610 manual for examples.
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: Venkat S Raman [mailto:Venkat_S_Raman-NR at raytheon.com]
Sent: Tuesday,26 August 2003 12:39 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Using SAP_WAPI_RAISE_EVENT in WAS 6.2QUEST
 
 
Hi All:
 
We are running CRM 4.0 on WAS 6.2 and trying out Webflow.
 
SAP has delivered sample programs and Workflow objects to demonstrate
this(Package SWX).
The BSP request.html lets the user enters the flight reservation and once
the request is created
through the FM SWX_TRAVELREQ_CREATE, it calls the FM SWE_EVENT_CREATE to
raise the event
through the following code:
l_objtype  = 'TRAVELREQ'.
    l_objkey   = ls_formdata-formnumber.
 
    IF i_wf_xml = 'X'.
      l_event    = 'CREATED_FOR_WFXML'.
    ELSE.
      l_event    = 'CREATED'.
    ENDIF.
 
    ls_creator-otype = 'US'.
    ls_creator-objid = i_uname.
    CALL FUNCTION 'SWE_EVENT_CREATE'
      EXPORTING
        objtype = l_objtype
        objkey  = l_objkey
        event   = l_event
        creator = ls_creator
      EXCEPTIONS
        OTHERS  = 0.
    e_formdata = ls_formdata.
    COMMIT WORK.
 
Scenario:
 
1. Use of the SAP RFC SAP_WAPI_RAISE_EVENT  to trigger the event from R/3
into CRM 4.0.
     In the above code there is no population of the Container data. When
we try to trigger this through
    the WAPI function we get the following error :
Source (expression '&travelrequest.Issuer&') of binding assignment is not
available
Error in the evaluation of expression '&travelrequest<???>.Issuer&' for
item '14'  .
 
But in the request.html (above code) the workflow gets triggered correctly
with just the objtype, objkey, event and creator, but
when we populate the same fields via the RFC WAPI we get the error!!!!
 
Question:
  Here is the binging for the workflow
    Binding Event -> Workflow
    &_EVT_CREATOR&   ----->  &_WF_INITIATOR&
   &_EVT_OBJECT& ------> &TRAVELREQUEST&
 
 
I am looking for examples of how to populate the event container through
ABAP code while using SWE_EVENT_CREATE and SAP_WAPI function modules.
Any help is appreciated
 
Venkat Raman
 


More information about the SAP-WUG mailing list