Recently I got a requirement to change the text for ‘Cancel and Keep work item in Inbox’ , a SAP standard option which will automatically populated in any user decision. While I was searching for the same in all the availbale sites, I have found a link which suggested not to make a such change as the process would be perplexed.
While I was going through entire link,I have seen a reply from Rick Bakker – “Please let us know where it is when you find it!” . In need of solution I started debugging and found peiece of information. Which I would like to share it here.
Where is the text – ‘Cancel and Keep work item in inbox’, Stored ?
– The text is stored as a text element. TEXT-301 in program – SAPLSWU2.
How to rename or change the default text ?
– We can change the text with implicit enhacnemcent in the include – ‘LSWU2F10’ at form – ‘ADD_DECISION_HTML’ . I have used below source code in implicit enhancement . [ Create implicit enhancemet at the end of the form.]
SOURCE CODE :
Field-Symbols: <Lfs_Html> Like Line Of Merge_Item–Html,
<Value> Type Any,
<Lfs_Merge_Table> Type Any.
Read Table Merge_Item–Html Assigning <Lfs_Html> With Key ‘Abort’(301).
If Sy–Subrc= 0 .
<Lfs_Html> = ‘Decide Later’.
Read Table Lt_Merge_Table Index 18. “Key Name =<!Decision_Alternatives!>’.
If Sy–Subrc= 0.
Assign Component ‘Html’ Of Structure Lt_Merge_Table To <Value>.
If <Value> is assigned.
<Value> = Merge_Item–Html.
Modify Table Lt_Merge_Table From Lt_Merge_Table.
Endif. “If <Value> is assigned
Endif. ” Read Table Lt_Merge_Table Index 18. “Key Name =<!Decision_Alternatives!>’.
ENDIF. “Read Table Merge_Item–Html Assigning <Lfs_Html> With Key ‘Abort’(301).
->Execute Business object – Decision and method – Process. We can see the standard text has been replaced.
-> Create a sample template with user decision and add decisions ‘YES’ and ‘NO’ and execute it.
From above screen shot we can see that we have replaced the standard option with ‘Decide Later’. Well we can modify the text based on Workflow Template no. At this form we have variable ‘G_WI_ID’ which fills value of Workflow instance.We can pass this value into SWWWIHEAD and fetch Workflow Task no.
Any ALTERNATIVES ?
– Well I do not eaxctly . But I strongly belive with the help of Expression for Test in Details tab would help.
– Well as said the by Karri Kemppi in the above mentioned link. It is better not to go for any kind of enhancement.