on 02-04-2014 11:00 PM
Hi Experts,
We would like to set logic and keep it in Work Item Text. Is it possible? Basically we are looking to have department, personnel area etc in Work Item Text for Leave Request.
We are using Standard Task TS21500001
&_WI_OBJECT_ID.OWNER.NAME&'s Leave Request (This text we would like to change)
Appreciate your kind guidance on this.
Regards,
Ashish
Hi Ashish
To change the Work item text of a standard Workflow or a Task, you can go to PFTC->Display(Not change) Task/Workflow->Menu item Edit->Work item text->Redefine.
BUT
for your requirement, you need additional variables which HAVE to exist in the Task Container (or else where will it pickup the data from?)....AND supplied to it by the calling workflow.
TS21500001 has the regular items in the container and also an instance holder of class CL_PT_REQ_WF_ATTRIBS (as _Wi_Object_ID) - the leading object. Whatever attributes are available in class CL_PT_REQ_WF_ATTRIBS can be used as dynamic variables in the Work item text (provided your workflow is passing a valid instance of this class to the task through binding)
I would suggest the following for your requirement (IF you are calling the standard task from a customWF):
1) Copy the task TS21500001 to your custom class, say TSxxxxxxxx
2) Keep everything same ->Method calls, checks, etc - every tab same as standard
3) ADD new container elements for department, personnel area etc (whichever is notavailable in class CL_PT_REQ_WF_ATTRIBS attributes
4) From the workflow, get the necessary data of these variables and store them in the workflow container (maybe in a step before calling TSxxxxxxxx)
5) When you call TSxxxxxxxx, pass these new variables in the binding
6) You will also not have to REDEFINE the WI Text as this will be your custom task and you can supply the actual WI Text
Hope this will help!
Regards,
Modak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashish
If you just add any existing variables, as Ragav said, you do not need to define /do anything else.
For newer variables, which are not in CL_PT_REQ_WF_ATTRIBS, you will have to do custom coding, follow the approach which I mentioned earlier because changing class CL_PT_REQ_WF_ATTRIBS will be a modification to standard........
1) Copy the task TS21500001 to your custom class, say TSxxxxxxxx
2) Keep everything same ->Method calls, checks, etc - every tab same as standard
3) ADD new container elements for department, personnel area etc (whichever is notavailable in class CL_PT_REQ_WF_ATTRIBS attributes
4) From the workflow, get the necessary data of these variables and store them in the workflow container (maybe in a step before calling TSxxxxxxxx)
5) When you call TSxxxxxxxx, pass these new variables in the binding
6) You will also not have to REDEFINE the WI Text as this will be your custom task and you can supply the actual WI Text
regards,
Modak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.