Can someone help me to understand where decode value is actually being stored?
Let’s use the following function as example:
When we pass the value to Decode function. for example ‘N’, then the fuction return ‘Not Cyclic Counting’
Inventory_Part_Count_Type_API.Decode(cycle_code) cycle_code
I found that this function called Domain_SYS.Decode_(Domain_SYS.Get_Translated_Values(lu_name_), Get_Db_Values___, db_value_);
FUNCTION Decode (
  db_value_ IN VARCHAR2 ) RETURN VARCHAR2
IS
 Â
  FUNCTION Base (
   db_value_ IN VARCHAR2 ) RETURN VARCHAR2
  IS
  BEGIN
   RETURN Domain_SYS.Decode_(Domain_SYS.Get_Translated_Values(lu_name_), Get_Db_Values___, db_value_);
  END Base;BEGIN
  RETURN Base(db_value_);
END Decode;
Â
As i further dig into it, it called Domain_SYS.Get_Translated_Values:
FUNCTION Get_Translated_Values (
  domain_ IN VARCHAR2,
  lang_code_ IN VARCHAR2 DEFAULT Fnd_Session_API.Get_Language) RETURN VARCHAR2
IS
BEGIN
  RETURN(coalesce(Get_Ctx_Values___(domain_, lang_code_), Get_Client_Values___(domain_)));
END Get_Translated_Values;
Â
as i drill in furhter, it seems like it called Domain_SYS.Get_Ctx_Values___
FUNCTION Get_Ctx_Values___ (
  domain_ IN VARCHAR2,
  value_  IN VARCHAR2 DEFAULT NULL ) RETURN VARCHAR2
IS
  client_id_   CONSTANT VARCHAR2(64) := Sys_Context('USERENV', 'CLIENT_IDENTIFIER');
  context_    CONSTANT VARCHAR2(30) := domain_ ||suffix_;
  context_value_      VARCHAR2(4000);
BEGIN
  -- We would like to have this check, but it is causing a lot of problems right now.
  -- Raise an error if the domain name is not in the Dictionary
  --IF (NOT Dictionary_SYS.Logical_Unit_Is_Installed(domain_)) THENÂ
  --  Error_SYS.Appl_General(service_, 'NOT_A_LU: The domain :P1] is not a LU in the Dictionary.', domain_);
  --END IF;
  -- The use of global context does not handle when Client Identifier is set, therefore we need to unset it when fetching from the context
  -- If client identifier is set
  IF (client_id_ IS NOT NULL) THEN
   -- Clear client identifier
   Dbms_Session.Clear_Identifier;
   context_value_ := Sys_Context(context_, nvl(value_, 'PROG'), ctx_length_); -- Use PROG if no language
   -- Set back Client identifier
   Dbms_Session.Set_Identifier(client_id_);
  ELSE
   context_value_ := Sys_Context(context_, nvl(value_, 'PROG'), ctx_length_);  -- Use PROG if no language
  END IF;
  RETURN(context_value_);
EXCEPTION
  -- What ever happens make sure that Client Identifier is set to its original value
  WHEN OTHERS THEN
   Dbms_Session.Set_Identifier(client_id_);
   RAISE;
END Get_Ctx_Values___;
Â
And from here, then i begin to confuse and not sure how the system decode the ‘N’ to ‘Not Cyclic Counting’
Â
Appreciate if anyone can give me some hints.Â