HCM Text Catalog
We all have definitely used Message Catalog and Strings Table for storing setup information and text definitions for notifications, master data. But, do you know there is a better alternative which not only supports in these scenarios but much more like Translation, Key based Setup, in-built HTML support and Test Utility to inquire the Catalog itself.
With simple views and existing tables, we can able to create very sophisticated setup to maintain your data and which can be quickly filtered and used with delivered Application Package methods.
To configure and use Text Catalog you would have to go through following steps (note, some are optional)
Navigation: Set Up HCM > Common Definitions > Text Catalog and Notepad
- Configure the Text Catalog
- Maintain the Text Catalog
- View/Edit the text in HTML
- Setup Text Substitution
- Use View All Keys Page (to Review)
- Setup Translation for each entry
- Use Test Page to validate the results
Configure Text Catalog:
Here you typically setup Owner, Sub ID combination and it's Key setup (similar to Prompts) up to 6 levels. Think about you have a setup page to 6 levels of bifurcation (through page and component you can have only 4 levels).
As part of this blog, let's consider a scenario where you need to setup State and Location-wise Insurance Plans. You would need to first have Country then State then Location and then Insurance Providers and then Insurance Plan Names (and to have base premiums). So, levels would be,
- Country
- State
- Location SetID
- Location
- Insurance Providers
- Insurance Plans
And Base Premium can be the text entry or description to be set on top of this.
Maintain the Text Catalog:
Here you typically add the Base Premium (categorized by Text ID) or any data that you wanted to setup for each combination (e.g., Max Sum Insured, Total Maturity etc.,)
Note: Ensure the add one Context Keys and Text with all blank, to get the default values during retrieval.
Test the Text Catalog Entry
Here you can try to search and see how the values are fetched., In case of HTML and substitutions those also be applied here.,
Translation and HTML Tags:
In case if you are using this setup to hold plain strings, you could add the Language Translations and format the content so that it can be directly used on Pages.
Here I have added the language "Arabic" for Plan Names. The same can be done at Descriptions and Catalog Text.
Depending on which language set as your Base Language during the login, system will fetch respective language description/text from this setup.
HTML tags can be inserted as part of the text using pre-configured HTML Tag substitutions,
Using Application Package:
You could use the HR_TEXT_CATALOG application package to perform the similar search on PeopleCode and use the result in other component and pages. It provides two methods one with 4 keys and another with 6 keys. What if the setup is not using all the keys? simply pass blank values. Also use TextCatalogUI class to perform "Maintain Text Catalog" changes through code.
- GetText()
- GetTextBy6Keys()
Sample Code for calling the Text Catalog entry through PeopleCode.
Hope this blog would give you insights of existing feature HCM Text Catalog, and make you interested in using the same.
A brief details can be found in PeopleBook (click Configuring the Text Catalog).
Note: It is presently available only on HCM application. But, since it is configured as managed objects (codes, pages, and records) which can be moved to other applications and make use of it.
Happy Learning 😊
No comments:
Post a Comment