Oracle EBS R12 STATE CODE Function

--Oracle EBS R12 STATE CODE Lookup

function CF_STATE_CODEFormula return Char is
V_LOOKUP_CODE  Varchar2(30);
begin
  Select MEANING
  Into V_LOOKUP_CODE
from apps.FND_LOOKUP_VALUES_VL 
Where LOOKUP_TYPE = 'JA_IN_STATE_CODE'
and upper(DESCRIPTION) = upper(:state);
Return V_LOOKUP_CODE;
Exception
    when others then
    Return NULL;
end;