Workflow Question

Dart, Jocelyn jocelyn.dart at sap.com
Thu Jan 24 20:53:12 EST 2002


Hi Wayne,
 
Not sure why you didn't see values in the key fields in your
debugging but debugging objects can be a little tricky in some releases.
Rather than test from SWUE, it would be better to use the test utility
in SWO1 to see what's going on.
 
So far as passing the event data to the method, it's either:
* Triggering event linked to task: event binding from event to task
- binding the object reference across is enough
* Triggiering event linked to workflow: event binding from event to
workflow,
workflow binding from workflow to task
- binding the object reference across is enough
 
The task container element _WI_Object_Id is automatically bound to the
method container element _object.  You don't see this explicitly but it
happens anyway.
 
i.e. there is nothing strange happening here at all.
 
Suggest you look again.
 
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: Carson, Wayne [mailto:Wayne.Carson at solvay.com]
Sent: Friday, 25 January 2002 11:06 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Workflow Question
 
 
Example #1.
I am looking at object type: BUS2081.  Within that object type, there is a
method DISPLAY.  Here is the program code:
 
SET PARAMETER ID 'RBN' FIELD object-key-invoicedocnumber.
SET PARAMETER ID 'GJR' FIELD object-key-fiscalyear.
CALL TRANSACTION 'MR3M' AND SKIP FIRST SCREEN.
 
I created a standard task with the method and a template that uses the
standard task.  I set a breakpoint in the code at the CALL Transaction
statement.  The key fields for this object type are:
 
IncomingInvoice.InvoiceDocNumber
IncomingInvoice.FiscalYear
 
The binding created a field &INCOMINGINVOICE& and it gets moved
_WI_OBJECT_ID.
 
The values for object-key-invoicedocnumber and object-key-fiscalyear are
both empty.
 
I used transacton SWUE and populated both the invoice document number and
fiscal year.
 
Example #2.
 
When I created my own OBJECT TYPE and METHOD DISPLAY, I used the following
coding in my program.  This coding worked.  wk_belnr and wk_gjahr both have
values.  Of course in my workflow template, I had to specify these as IMPORT
PARAMETERS.
 
data: wk_belnr like rbkp-belnr,
 wk_gjahr like rbkp-gjahr.
 
  swc_get_element container
     'Invoice' wk_belnr.
 
  swc_get_element container
     'FiscalYr' wk_gjahr.
 
  SET PARAMETER ID 'RBN' FIELD wk_belnr.
  SET PARAMETER ID 'GJR' FIELD wk_gjahr.
  CALL TRANSACTION 'MR3M' AND SKIP FIRST SCREEN.
 
Here is my question: How does SAP know to move the data from the EVENT
container to the WORKFLOW container in Example #2.  I used my own field
names.  How does SAP perform the mapping?  This is code we don't see
anywhere.
 
Why didn't Example #1 work?  What is missing?
 
Thank you,
 
Wayne Carson
 


More information about the SAP-WUG mailing list