Fiscal year changes in Object keys

Susan R. Keohan keohan at ll.mit.edu
Wed Aug 11 14:53:49 EDT 2004


Hi Swami,
 
We started testing for this issue in January.  I have something that works, but I can't claim that
it is endorsed by SAP.  Our Invoice Approval WFs all have 'wait for event' for the event BUS2081
DELETED.  So we did not want the workflow to terminate if the invoice crossed fiscal years and a new
invoice was created with reference to the old invoice.  In SWEINST, for BUS2081 DELETED EVENTITEM, I
added a check function.  This function will look at the attributes of the invoice (this will be the
old invoice).  If it has &&docnumber&& in the ref doc field (the &&docnumber&& will be the invoice
document number of the new invoice), and is involved in a workflow process (using
SAP_WAPI_WORKITEMS_TO_OBJECT) I then use SWW_OBJKEY_CHANGE_V1 to 'push' the new object key into the
workflow container. Then I end with exception 'NO_EVENT' so that the workflow will not terminate.
The workflow audit trail stays with the new invoice document, and that was one of the goals of the
whole process.
 
While our fiscal year doesn't begin until October, so I cannot attest to how this works in real life
(for example, could our users enter &&docnumber&& in the ref doc field ?  Users can be sneaky!) it
works well in test.
 
Hope this helps!
Sue
 
Swami Bala wrote:
 
> Hello All,
> We are simulating testing for the workflow business object BUS2081 for the
> fiscal year changes.
> For example the document created in year 2004 needs to be posted in year
> 2005. Since the year is part of the Object key, when the method is executed
> for object keys (eg) Doc1 year1, the posting date changes the object
> keys to
> Doc2 year2. But the method does not get refreshed
> to fetch these new values until it is executed again from the Inbox.I need
> to get these new values as part of the Object keys and tried using
> swc_object_refresh but no use. What is the correct approach to get the new
> updated object keys within the method itself ?
> Any suggestions ?
>
> Swami Bala
>
 
--
Susan R. Keohan
SAP Workflow Developer
MIT Lincoln Laboratory
244 Wood Street
LI-200
Lexington, MA. 02420
781-981-3561
keohan at ll.mit.edu
 


More information about the SAP-WUG mailing list