Long Text Template Extensibility for Maintenance Request
In the Asset Management Fiori Application Create Maintenance Request, you have the ability to enter in long text in order to provide some additional context when raising a Notification.
In the standard system, a default template is provided which prompts the users with some questions.
“Please describe the problem:”
“When did the problem start?”
“What did you do after identifying the problem?”
It is a common requirement to change this default template to provide some company specific requirements and optionally provide some logic to change the template based on fields in the Notification or Technical Object (such as a Notification Type).
As of release S/4 HANA Cloud 2111, you can now create new Templates and include logic to dictate when the templates should be shown. An example will be discussed in this blog post.
Standard application with default Template:
How to extend the Application:
1.Go to Custom Logic app
Choose the + icon in the right hand corner of the app
Select Maintenance Notification as the business context.
Select the BAdI for extensibility of templates in a maintenance request. “EAM_LTXT_TML_MAINT_NOTIF”
Enter a description for the implementation.
Custom Logic App – New Enhancement details
2. Enter the logic, test it, and verify the results.
In my example logic, I want to have a different template depending on the ‘Notification Type’ that a user chooses.
Also note that additional sample code and detailed instructions can be accessed here: Link
Custom Logic App – New code in the Get Templates method
3. Publish the implementation.
After the implementation is published, you can see the template in the Create Maintenance Request app.
The Final Result:
The extended application is shown below. Depending on the Notification Type that a user selects, the drop down list of available Templates is updated in the Maintenance Request.
Create Maintenance Request Application – Extended with more Long Text templates
Whilst extending this application, the following limitations have been noted. If you have found a way around these limitations in your own implementation, please let us know in the comments below so I can update the blog post:
The ‘Default Template’ provided by SAP is always available to be selected from the list of available templates regardless of the extension logic provided.
- The ‘Default Template’ provided by SAP is always the default option and requires a user to manually select the new template. i.e. Our extension logic to derive a new Long Text Template just appends the entry to the list of available template options but isn’t defaulted.
Once a template is chosen, it is not dynamically changed if the Notification Type is changed to a different value. The user needs to reselect the new template. Eg: Notification Type ‘Y1’ is selected which enables us to choose the the ‘Y1 – Reactive Template’. If we change the Notification type to ‘Y2’, it will not automatically change template to ‘Y2 – Proactive Template’, it needs to be manually selected again.
What have we learned?
You’ve learnt how you can define different Long Text templates in the Maintenance Request and use custom logic to update the available template options to the user.
This logic can include fields on the Maintenance Notification itself (such as the Notification Type used in this scenario), or even fields on the Technical Object in which the Notification is being raised against (such as Technical Object Type).
If you have any questions, the Q&A area at the SAP S/4HANA Cloud for Asset Management community is a great starting point for all members to see and respond to all queries.
Hi Tim, thanks for sharing this helpful document.
I believe this only works for S/4 HANA Cloud and not for On-Premise, correct ?
This blog/screenshots was just S/4HANA Cloud, but the functionality has been ported across to the On-Premise version in Q4 2021. You need a minimum of S/4HANA 2021 to get the functionality. This is a link to the item for more details in: Whats new viewer
If you're got 2021 in your landscape but having trouble setting it up, send a reply and I can go through it in more detail.
Thanks for the insight.
I had a few queries:-
Thanks in advance.
If you go down this path, could you please reply back to this post with the results of how it went and if there were any further challenges?
Thanks Tim, for the prompt response.
Will definitely get back with the results once implemented.
Thanks and Warm Regards,
How you get an access relating custom logic app? I had not founded that from our sandbox system or Fiori library. Maybe we need some We have S4 HANA 2022/Q2 version. Long text template editing is very important to us.
It will also be there in S4 2022.
You might need to add Business Role to yourself: SAP_BASIS_BC_EXT
I think they may have changed the app launcher description to just custom fields, or custom logic (with navigation between).
I test your case and it works. But I wondering why SAP is deprecated this app Custom fields and logic (id: F1481) ?
Sorry I don't know why the name was changed, apologies for any confusion.
Technically the app hasn't been depreciated, they just changed the launcher title on the fiori tile.
Okay good to know. Sometimes we discuss our projet is it depricated and what is the road map. But logic anwer is that SAP renames apps. 🙂
I see that the standard default template is maintained as a Dialog text. I have a requirement to maintain a very long text and add some text formatting like making it bold etc so i was thinking to create a custom dialog text and use that instead of passing that in description but can;t find any app in cloud system to create a dialog text. Any idea?