Workflow Question

Roehlen, Peter PRoehlen at powercor.com.au
Thu Jan 24 20:09:53 EST 2002


Hello Wayne,
 
What you are describing is one of the (many) quirks of Business Object
programming.  It has been my experience that only the key fields can be
accessed by using object-key-<attribute_name>.  Whilst it seems reasonable
to expect that you should be able to access the other attributes using
object-<attribute name>, all other attributes must be accessed by using the
get element macro. (There are plenty of examples on how to use the macros in
the documentation.)
 
Cheers,
 
 
Peter Roehlen
Team Lead - SAP Technical & Development
Powercor Australia Ltd
0409 950 263
 
 
 
-----Original Message-----
From: Carson, Wayne [mailto:Wayne.Carson at solvay.com]
Sent: Friday, 25 January 2002 11:06
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
 
 
**********************************************************************
Powercor Australia Ltd. This email and any file attachments are
confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email in
error please tell us immediately by return email and delete the
document.
**********************************************************************
 


More information about the SAP-WUG mailing list