Binding from Task to Custom Method

Soady, Phil phil.soady at sap.com
Fri Mar 28 16:20:38 EST 2003


Hi Mark,
I didn't spot anything obviously wrong from your description.
Perhaps one of the others did?
 
Try the trace, it may help prove where the problem lies.
Use (SWU8 and SWu9) to activate the trace before  running the WF.
Deactivate the trace and take a look at the trace.
 
 
If the binding is missing or incorrect, this should help pinpoint why.
Double check the binding for task to method is still there.
It goes walk-abouts when you change the task container.
 
If you want to remove a container element you know is no longer needed.
Use PFTC change mode and go straight to the container. There you can bin it.
 
good luck,
 
Phil Soady
Senior Consultant
Business Technologies
SAP Australia
* : 0412 213 079
* : phil.soady at sap.com
 
 
 
 
 
-----Original Message-----
From: Mark Johnston [mailto:mark_johnston at ie.ibm.com]
Sent: Saturday, March 29, 2003 5:25 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Binding from Task to Custom Method
 
 
Hi,
 
This is my first (maybe of many) posts to this list I hope someone has the time to advise.
 
I'm having major difficulty with a workflow and was hoping that someone could offer me some advice.
 
My workflow is largely based on template WS2000040 - Approve Trip.
 
The standard is a two step approval process with 2 decision tasks sent out
1) Check Trip Facts
2) Approve Trip.
 
I've copied and changed the flow to have a slightly different approval process again 2 decision tasks are sent out.
1) Approve Trip
2) Settle Trip (Custom code)
 
The workflow is based on business object BUS2089.
I've created a subtype of BUS2089 and named it ZBUS2089, and created a method ZEmployeeTrip.ZTripSettle which calls a function module (FM) to carry out the settle process (submit's a SAP standard program RPTTEC00 (TCODE PREC)).
 
The FM has the following parameters
EMPLOYEENUMBER LIKE BAPIEMPL-PERNR Optional Passes Value Personnel Number TRIPNUMBER LIKE BAPITRVXXX-TRIP Optional Passes Value Trip number
 
The code works correctly stand alone. I've tried to implement it in a similar manner to BUS2089-APPROVE.
 
 
My problem is that when called from the workflow the parameters for my method are always blank and the container of the method is also blank.
 
This is a view of the flow (bottom up).
 
14:23:11 B STARTED TS90100002 Settle Trip
14:22:59 W COMPLETED TS00008267 Settle Trip of Test Test rr 04.01.2003 1000004552 14:22:58 B COMPLETED TS20000130 Set trip 1000004552 status to approved 14:22:46 W COMPLETED TS20000131 Approve trip of Test Test/rr/04.01.2003/1000004552 14:22:45 F STARTED WS90100002 Custom Employee Expenses
 
The informations I need is stored in element TRIP. The fields that are key and the ones that I need passed through into my method are
 
employeenumber like pskey-pernr,
tripnumber like bapitrip-tripno,
 
These fields are sucessfully passed from the workflow container into my role to determine the agent of task TS20000131 and subsequently task TS00008267.
 
I'm pretty sure my problems relate to the binding between the task container and the method container. TS00008267 <-> ZBUS2089-ZTRIPSETTLE. And possibly my binding throughout the workflow template.
 
I'm getting several binding errors that raise the following questions:
 
1)
When I attempt to activate the workflow template I'm told some values are not used or some values are for read purposes only. I can see these values in my workflow container and when attempting to delete them from the workflow container I get the message:
 
'Inherited elements may not be deleted'.
 
2) As I mentioned I'm trying to implement this like BUS2089-APPROVE is implemented by SAP. When I click on my object binding within task TS90100002 I always see the key parameters to my function module called by my method ZBUS2089-ZTRIPSETTLE and I am unable to change this.
 
However when I look at BUS2089-APPROVE it does not work like that and in the method code it takes it's values from object-key-employeenumber and object-key-tripnumber.
 
I've tried using this method in my code and also using swc_get_element ac_container 'EmployeeTrip' z_tripno. swc_get_element ac_container 'EmployeeNumber' z_person
 
but in both cases I have no values populated.
 
I know there is a lot in this but it may help you help me.
 
As you've probably guessed I'm new to workflow what a start, custom workflow,custom role resolution, I assure you options were assessed, and now this!
 
Thank's for taking the time to reply.
I effectively have reached a standstill and don't know how to else to tackle this.
 
Kind regards,
Mark Johnston
 
IBM Business Consulting Services
Oldbrook House, 24/32 Pembroke Road, Dublin 4.
Phone:   +353-(0)1-815 4907
Mobile:  +353-(0)86-814 4258
fax:          +353-(0)1-667 1848
e-mail:  mark_johnston at ie.ibm.com
 


More information about the SAP-WUG mailing list