Friday, August 29, 2025

Best alternative for Message Catalog and Strings Table

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,

  1. Country
  2. State
  3. Location SetID
  4. Location
  5. Insurance Providers
  6. Insurance Plans

And Base Premium can be the text entry or description to be set on top of this.

Configure Text Catalog: General
Configure Text Catalog: Key1
Configure Text Catalog: Key2
Configure Text Catalog: Key4
Configure Text Catalog: Key5
Configure Text Catalog: Key6

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.,)

Manage Text Catalog: Add a New Value
Manage Text Catalog: Details

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

Test Text Catalog - Part 1
Test Text Catalog - Part 2

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.

View All Effective Dated Rows

Here I have added the language "Arabic" for Plan Names. The same can be done at Descriptions and Catalog Text.

Translate Text Catalog - Description
Translate Text Catalog - 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,

Text Catalog HTML Tags
HTML Preview Page

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.

Delivered Application Package
  1. GetText()
  2. GetTextBy6Keys()

Sample Code for calling the Text Catalog entry through PeopleCode.

import HR_TEXT_CATALOG:*;

Local HR_TEXT_CATALOG:TextCatalog &oTC = create HR_TEXT_CATALOG:TextCatalog("HBN", 
"BD_I");

/* Below code to be used to temporarily change the Base Language to get the text */
rem SetLanguage("AR");

Local string &sPlanDescription = &oTC.GetTextBy6Keys("BD_PLAN_NAME", "IND", "TN", 
"SHARE", "GPCHN01", "AXA", "GENERAL", "", "", "", "", ""); /* Will return 'Saral Jeevan 
Bima Plan' as it matches */

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