cancel
Showing results for 
Search instead for 
Did you mean: 

Work Item Text Change

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

I042439
Employee
Employee
0 Kudos

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

I042439
Employee
Employee
0 Kudos

Looking closely, class CL_PT_REQ_WF_ATTRIBS has the attribute OWNER, which can give you your details....the WI Text can be as follows:

Leave Request: &_WI_OBJECT_ID.OWNER.NAME& / &_WI_OBJECT_ID.OWNER.BUKRS& / &_WI_OBJECT_ID.OWNER.PERSA&

Former Member
0 Kudos

Hi Modak,

If I change text only in Redefining Text (In Customer Definition), does it work? Do I need to specify anything else/any where?

Regards,

Ashish

Former Member
0 Kudos

Hi,

redefine is suffice if you are going to use the variable inside _WI_OBJECT_ID BOR.

If other variable you need means you have to do customization coding for tat variable.Then ypu have to use it

Regards,

Ragav

Former Member
0 Kudos

If I have to add new variable, where I can specify that. In CL_PT_REQ_WF_ATTRIBS ? Under Attributes Owner?

I042439
Employee
Employee
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ashish,

I hope its possible.You can do by Redefining text option.Button available in top of work item text.

Regards,

Ragav