CREATE OR REPLACE FUNCTION STATUS_DESC(
    P_FLAG CHAR)
  RETURN VARCHAR2
IS
  V_FLAG_DESC VARCHAR2(50 BYTE);
BEGIN
  V_FLAG_DESC:=
  (
    CASE P_FLAG
    WHEN 'E' THEN
      'Enabled'
    WHEN 'D'THEN
      'Disabled'
    END);
  RETURN V_FLAG_DESC;
END; 