Start Workflow in other SAP system on a different object

Dart, Jocelyn jocelyn.dart at sap.com
Tue Nov 13 17:36:31 EST 2001


Hi Raf,
>From 4.5A there's a method TRIGGERREMOTEEVENT in object
SELFITEM which lets you do this simply.
 
You could still do this in your 40B system as the code
is fairly straightforward - just use a delegated subtype
to add a similar method to your object.
 
Parameters for the method are:
OBJTYPE LIKE SWETYPECOU-OBJTYPE
OBJKEY  LIKE SWEINSTCOU-OBJKEY
EVENT   LIKE SWETYPECOU-EVENT
DESTINATION LIKE RFCDES-RFCDEST
 
In the method call function SWE_EVENT_CREATE
IN BACKGROUND TASK and specifying the DESTINATION.
Parameters for the function call are as normal for SWE_EVENT_CREATE.
 
You can then include a task based on the new method
as a step in your workflow.  That will allow you to
trigger the event in the CRM system.
 
In fact if you look in your CRM system you should be
able to see the TRIGGERREMOTEEVENT method in object SELFITEM
and copy the code across to your 40B system.
 
Hope that helps.
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: Martin Maguth [mailto:mmaguth at us.ibm.com]
Sent: Wednesday, 14 November 2001 2:31 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Start Workflow in other SAP system on a different object
 
 
raf:
 
just a thought - try one of the following:
 
(1) use function module 'SWW_WI_START_SIMPLE' and specify the rfc
destination (your CRM system). you can pass the key field for the KNA1
object (the customer number) as a separate single variable in the
container. in the first step of the workflow in CRM, you then implement a
background step, that uses the variable and creates a BUS1006005 object
instance (with macro SWC_CREATE_OBJECT).
 
(2) create a custom object with parent ROOT and a custom event in both
systems with a key similar to the KNA1/BUS1006005, but more generic., i.e.
use the same generic CHAR data element as type reference in both systems.
then raise the custom event in SAP with rfc destination CRM. use the SWE2
in CRM to link your event with the corresponding workflow and transfer your
custom object to BUS1006005 in your workflow (might also require some
custom programming for data conversion).
 
note that CRM, depending on the system release and basis release you are
using, "speaks unicode" which can cause some interface issues, if your R3
system doesn't.
 
i hope this helps,
 
martin
 
-------------------------------------------------------------
Martin Maguth
Consultant
IBM Global Services
Phone: (937) 225-6521, t/l 663
Email: mmaguth at us.ibm.com
 
 
"Bormans, Raf" <Raf.Bormans at thevisionweb.be>@MITVMA.MIT.EDU> on 11/13/2001
10:06:56 AM
 
Please respond to "SAP Workflow Users' Group" <SAP-WUG at MITVMA.MIT.EDU>
 
Sent by:  SAP Workflow <Owner-SAP-WUG at MITVMA.MIT.EDU>
 
 
To:   SAP-WUG at MITVMA.MIT.EDU
cc:
Subject:  Start Workflow in other SAP system on a different object
 
 
 
Hi,
 
I have a 40B SAP system (system A), and a SAP CRM system (system B).
I want to start a workflow into the CRM system (B), triggered by an event
in
the SAP system (A).
 
Problem is that the object in system A is different from the one I use in
the B system. The trigger in system A is based on the KNA1 object type, the
workflow in system B on object type BUS1006005. Note that the BUS1006005
object is NOT available in system A. Both object types share the object key
"customer" (customer number in SAP, business partner in CRM).
 
In system A, I created with delegation a subtype ZKNA1 on KNA1, with the
event "changed". In SWEC, I linked the change document object DEBI on
change
with the event KNA1.CHANGED. In SWE2, I linked KNA1.CHANGED with my system
B
workflow and function module SWW_WI_CREATE_VIA_EVENT on destination system
B.
 
But I have no idea how to create a binding with the object in my system B
workflow? So could someone suggest me how to implement the next step
correctly?
 
MAYBE I have to create a RFC enabled function module in system B, with a
similar interface as SWW_WI_CREATE_VIA_EVENT, and use this as a receiver
function module in SWE2 in system A instead . In this function, I could use
the KNA1 object key to create an event trigger on BUS1006005 (using
SWE_EVENT_CREATE), and have this event as starting event in my system B
workflow. Anyone has experience with this coding misuse (I'm not sure this
would work)?
 
Kind Regards, Raf
 


More information about the SAP-WUG mailing list