Skip to Content

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.

rename cancel and keep work item in inbox

                     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_ItemHtml,

                         <Value>                     Type Any,

                         <Lfs_Merge_Table>  Type Any.

               Read Table Merge_ItemHtml Assigning <Lfs_Html> With Key ‘Abort’(301).

                    If SySubrc= 0 .
                                <Lfs_Html> = ‘Decide Later’.
                                     Read Table Lt_Merge_Table Index 18. “Key Name =<!Decision_Alternatives!>’.
                                            If SySubrc= 0.
                                                  Assign Component ‘Html’ Of Structure Lt_Merge_Table To <Value>.

                                                      If <Value> is assigned.
                                                             <Value> = Merge_ItemHtml[].          
                                                             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_ItemHtml Assigning <Lfs_Html> With Key ‘Abort’(301).

———————————————————————————————————————————————————

RESULT –

->Execute Business object – Decision and method – Process. We can see the standard text has been replaced.

Decision Step.jpg

->  Create a sample template with user decision and add decisions ‘YES’ and ‘NO’ and execute it.

               User Decision.jpg

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.

Conclusion –

– Well as said the by Karri Kemppi in the above mentioned link. It is better not to go for any kind of enhancement.

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply