Gregorian-Hijri Dates Converter

Hello Experts;
I am looking for ABAP Report/Function module for "Gregorian <=> Hijri Dates Converter".
Any assistance in this regards would be highly appriciated and points will be rewarded.
Looking forward for your usual prompt and professional advice...
Best Regards,
Aslam
You may ask... What is Hijri Calender?
<a href="http://en.wikipedia.org/wiki/Hijri">en.wikipedia.org/wiki/Hijri</a>
The Islamic calendar or Muslim calendar (also called "Hijri calendar", Arabic) is the calendar used to date events in many predominantly Muslim countries, and used by Muslims everywhere to determine the proper day on which to celebrate Islamic holy days. It is a lunar calendar having 12 lunar months in a year of about 354 days. Because this lunar year is about 11 days shorter than the solar year, Islamic holy days, although celebrated on fixed dates in their own calendar, usually shift 11 days earlier each successive solar year, such as a year of the Gregorian calendar. Islamic years are also called Hijra years because the first year was the year during which the Hijra occurred— Muhammad's emigration from Mecca to Medina. Thus each numbered year is designated either H or AH, the latter being the initials of the Latin anno Hegirae (in the year of the Hijra).

Hi,
        use the below sub-routines in ABAP to convert Gregorian to Hijri dates and vice versa
DATA: WF_RESULT1 TYPE I,
      WF_RESULT2 TYPE C,
      WF_DATE1   TYPE SY-DATUM,
      WF_DATE2   TYPE SY-DATUM.
*WF_DATE1 = '14271123'.
WF_DATE1 = SY-DATUM.
PERFORM F_GREGORIANTOHIJRA1 USING    WF_DATE1
                      CHANGING WF_DATE2.
WRITE:/ WF_DATE1,WF_DATE2.
PERFORM F_HIJRATOGREGORIAN1 USING    WF_DATE2
                           CHANGING WF_DATE1.
WRITE:/ WF_DATE1,WF_DATE2.
*&      Form  F_GREGORIANTOHIJRA1
      text
     -->P_GREG_DATEtext
     -->P_HIJRA_DATtext
FORM F_GREGORIANTOHIJRA1 USING  P_GREG_DATE
                              CHANGING P_HIJRA_DATE.
  DATA: LOC_MM(2) TYPE N,
        LOC_DD(2) TYPE N,
        LOC_YY(4) TYPE N.
  DATA: LOC_HIJ_MM(2) TYPE N,
        LOC_HIJ_DD(2) TYPE N,
        LOC_HIJ_YY(4) TYPE N.
  DATA: LOC_JD TYPE P DECIMALS 2,
        LOC_LL TYPE P DECIMALS 2,
        LOC_LN TYPE P DECIMALS 2,
        LOC_LJ TYPE P DECIMALS 2.
  LOC_YY = P_GREG_DATE+0(4).
  LOC_MM = P_GREG_DATE+4(2).
  LOC_DD = P_GREG_DATE+6(2).
  IF ( LOC_YY > 1582 ) OR
     ( LOC_YY = 1582 AND LOC_MM > 10 ) OR
     ( LOC_YY = 1582 AND LOC_MM = 10 AND LOC_DD > 14 ).
    LOC_JD = TRUNC( ( 1461 * ( LOC_YY + 4800 + TRUNC( ( LOC_MM - 14 ) / 12 ) ) ) / 4 ) +
             TRUNC( ( 367 * ( LOC_MM - 2 - 12 * ( TRUNC( (  LOC_MM - 14 ) / 12 ) ) ) ) / 12 ) -
             TRUNC( ( 3 * ( TRUNC( ( LOC_YY + 4900 + TRUNC( ( LOC_MM - 14 ) / 12 ) ) / 100 ) ) ) / 4 ) + LOC_DD - 32075.
  ELSE.
    LOC_JD = 367 * LOC_YY - TRUNC( 7 * ( LOC_YY + 5001 + TRUNC( ( LOC_MM - 9 ) / 7 ) ) ) / 4 +
             TRUNC( ( 275 * LOC_MM ) / 9 ) + LOC_DD + 1729777.
  ENDIF.
  LOC_LL = LOC_JD - 1948440 + 10632.
  LOC_LN = TRUNC( ( LOC_LL - 1 ) / 10631 ).
  LOC_LL = LOC_LL - 10631 * LOC_LN + 354.
  LOC_LJ = ( TRUNC( ( 10985 - LOC_LL ) / 5316 ) ) * ( TRUNC( ( 50 * LOC_LL ) / 17719 ) ) +
           ( TRUNC( LOC_LL / 5670 ) ) * ( TRUNC( ( 43 * LOC_LL ) / 15238 ) ).
  LOC_LL = LOC_LL - ( TRUNC( ( 30 - LOC_LJ ) / 15 ) ) * ( TRUNC( ( 17719 * LOC_LJ ) / 50 ) ) -
           ( TRUNC( LOC_LJ / 16 ) ) * ( TRUNC( ( 15238 * LOC_LJ ) / 43 ) ) + 29.
  LOC_HIJ_MM = TRUNC( ( 24 * LOC_LL ) / 709 ).
  LOC_HIJ_DD = LOC_LL - TRUNC( ( 709 * LOC_HIJ_MM ) / 24 ).
  LOC_HIJ_YY = 30 * LOC_LN + LOC_LJ - 30 .
  CONCATENATE LOC_HIJ_YY LOC_HIJ_MM LOC_HIJ_DD
  INTO        P_HIJRA_DATE.
ENDFORM.                    "F_HIJRATOGREGORIAN1
*&      Form  F_HIJRATOGREGORIAN1
      text
     -->P_HIJRA_DATtext
     -->P_GREG_DATEtext
FORM F_HIJRATOGREGORIAN1 USING  P_HIJRA_DATE
                              CHANGING P_GREG_DATE.
  DATA: LOC_MM(2) TYPE N,
        LOC_DD(2) TYPE N,
        LOC_YY(4) TYPE N.
  DATA: LOC_HIJ_MM TYPE I,
        LOC_HIJ_DD TYPE I,
        LOC_HIJ_YY TYPE I.
  DATA: LOC_HIJ_MM1(2) TYPE N,
        LOC_HIJ_DD1(2) TYPE N,
        LOC_HIJ_YY1(4) TYPE N.
  DATA: LOC_JD TYPE P DECIMALS 2,
        LOC_LL TYPE P DECIMALS 2,
        LOC_LN TYPE P DECIMALS 2,
        LOC_LK TYPE P DECIMALS 2,
        LOC_LI TYPE P DECIMALS 2,
        LOC_LJ TYPE P DECIMALS 2.
  LOC_YY = P_HIJRA_DATE+0(4).
  LOC_MM = P_HIJRA_DATE+4(2).
  LOC_DD = P_HIJRA_DATE+6(2).
  LOC_JD = ( ( 11 * LOC_YY + 3 ) / 30 ) +
           354 * LOC_YY + 30 * LOC_MM -
           ( ( LOC_MM - 1 ) / 2 ) + LOC_DD + 1948440 - 385 .
  IF LOC_JD >  2299160.
    LOC_LL = LOC_JD + 68569.
    LOC_LN = TRUNC( ( 4 * LOC_LL ) / 146097 ).
    LOC_LL = ( LOC_LL - TRUNC( ( 146097 * LOC_LN + 3 ) / 4 ) ).
    LOC_LI = TRUNC( ( 4000 * ( LOC_LL + 1 ) ) / 1461001 ).
    LOC_LL = ( LOC_LL - TRUNC( ( 1461 * LOC_LI ) / 4 ) + 31 ).
    LOC_LJ = TRUNC( ( 80 * LOC_LL ) / 2447 ).
    LOC_HIJ_DD = LOC_LL - TRUNC( ( 2447 * LOC_LJ ) / 80 ).
    LOC_LL     = TRUNC( LOC_LJ / 11 ).
    LOC_HIJ_MM = LOC_LJ + 2 - ( 12 * LOC_LL ).
    LOC_HIJ_YY = 100 * ( LOC_LN - 49 ) + LOC_LI + LOC_LL.
  ELSE.
    LOC_LJ = LOC_JD + 1402.
    LOC_LK = TRUNC( ( LOC_LJ - 1 ) / 1461 ).
    LOC_LL = LOC_LJ - 1461 * LOC_LK.
    LOC_LN = TRUNC( ( LOC_LL - 1 ) / 365 ) - TRUNC( LOC_LL / 1461 ).
    LOC_LI = LOC_LL - 365 * LOC_LN + 30.
    LOC_LJ = TRUNC( ( 80 * LOC_LI ) / 2447 ).
    LOC_HIJ_DD = LOC_LI - TRUNC( ( 2447 * LOC_LJ ) / 80 ).
    LOC_LI     = TRUNC( LOC_LJ / 11 ).
    LOC_HIJ_MM = LOC_LJ + 2 - ( 12 * LOC_LI ).
    LOC_HIJ_YY = 4 * LOC_LK + LOC_LN + LOC_LI - 4716.
  ENDIF.
    LOC_HIJ_MM1 = LOC_HIJ_MM.
    LOC_HIJ_DD1 = LOC_HIJ_DD.
    LOC_HIJ_YY1 = LOC_HIJ_YY.
    CONCATENATE LOC_HIJ_YY1 LOC_HIJ_MM1 LOC_HIJ_DD1
    INTO        P_GREG_DATE.
  ENDFORM.                    "F_HIJRATOGREGORIAN1

Similar Messages

  • Convert gregorian to hijri date

    Hi guyz,
    Anyone knows how to convert gregorian to hijri date? Any function module or method?
    Thanks,
    Usman Malik

    Hi Kesavadas,
    Check class cl_abap_datfm
    method conv_isl_to_greg_formula
    It is is not working fine.
    25.06.1434    =   06.05.2013   it is wrong.
    25.06.1434    =   05.05.2013   it is Correct.
    Please give a solution for that issue.

  • Regarding sql function error  for Hijri date to Gregorian date

    Hi ,
    I want to convert Hijri date format into Gregorian date format . i write the script with  sql function  like this
    $Hijri_Date = '16/04/1428';
    $Gregorian_Date = sql('DS_REPO','SELECT CONVERT(DATE,[$Hijri_Date],131)');
    print($Gregorian_Date);
    here $Hijri_Date data type is varchar and $Gregorian_Date data type is date.
    but  I am getting error like
    7868     5812     DBS-070401     10/26/2010 10:37:18 PM     |Session Job_Hijradata_Conversion
    7868     5812     DBS-070401     10/26/2010 10:37:18 PM     ODBC data source <UIPL-LAP-0013\SQLEXPRESS> error message for operation <SQLExecute>: <[Microsoft][SQL Server Native Client
    7868     5812     DBS-070401     10/26/2010 10:37:18 PM     10.0][SQL Server]Explicit conversion from data type int to date is not allowed.>.
    7868     5812     RUN-050304     10/26/2010 10:37:18 PM     |Session Job_Hijradata_Conversion
    7868     5812     RUN-050304     10/26/2010 10:37:18 PM     Function call <sql ( DS_REPO, SELECT CONVERT(DATE,16/04/1428,131) ) > failed, due to error <70401>: <ODBC data source
    7868     5812     RUN-050304     10/26/2010 10:37:18 PM     <UIPL-LAP-0013\SQLEXPRESS> error message for operation <SQLExecute>: <[Microsoft][SQL Server Native Client 10.0][SQL
    7868     5812     RUN-050304     10/26/2010 10:37:18 PM     Server]Explicit conversion from data type int to date is not allowed.>.>.
    7868     5812     RUN-053008     10/26/2010 10:37:18 PM     |Session Job_Hijradata_Conversion
    please help me out to solve this problem .
    Please suggest any other solution to convert hijri date format to gregorian date format.
    Thanks&Regards,
    Ramana.

    Hi ,
    In Data quality there is no inbuild function for converting hijri date to gregorian date .  we have the function for converting julian date to gregorian date.
    Thanks&Regards,
    Ramana.

  • Convert  Solar Hejra(Hijri) date  to Anno Domini date

    Hi everyone:
    I am developeing an application cfm format. The company has
    some paper forms that the dates are in Solar Hejra(Hijri) date
    format and I need them to be converted into Anno Domini date. Do
    you know any solution/tutorial or ready_to_use code in cfm format?
    Or if it is not avaiable what do you seggest? I use some javascript
    code? Do you know one that does it for me?
    Thanks
    Benign

    Benign wrote:
    > Hi:
    > Thanks for the fast reply.
    > I will work on and try to make a neat convertor but do
    you know any
    > ready_to_use convertor? The one that only converts
    Persian Date into Gregorian
    > Date it is all I need.
    that *is* a ready to use convertor. to convert the islamic
    calendar dates to
    gregorian (well to cf datetime objects) you use the
    i18nDateParse function. you
    can ignore the rest of the methods in that CFC (though if you
    deal w/this sort
    of thing once, you'll likely deal with it again). the only
    tricky bit is knowing
    if the original islamic dates are based on civil or religious
    calendars.

  • Convert georgian date to hijri date at specific date

    Hi all,
    I'm new in PL/SQL , I use Oracle database 10g in windows xp .
    could any one help and provide me with code that accept any Georgian date
    and convert it to hijri date
    best regard
    new user
    thanks

    the solution would go along the lines of
    to_date(to_char(<date column>,'format model','*NLS_CALENDAR=<code for Georgian>*'),'format model', 'NLS_CALENDAR=<code for Arab/Hijri')
    as per the description of to_date in the SQL reference manual.
    Sybrand Bakker
    Senior Oracle DBA

  • How to display hijri date..

    hi everyone!
    can someone tell how to convert georgian date into hijri date...
    and if the date is some old date....
    thanks and regards
    Tariq.

    Here are a few things you might need to know.
    1.How to set Calendar to "Arabic Hijrah" ?
    2.How to display both Hijrah and Gregorian dates in the same select statement?
    3.What is Calendar Deviation?
    4.How to set deviation?
    Questions & Answers
    1.How to set Calendar to "Arabic Hijrah" ?
    Answer
    Set NLS_CALENDAR parameter in one of the following ways:
    1. In the Current session :
    SQL> alter session set NLS_CALENDAR="Arabic Hijrah" ;
    2. All applications for a specific client:
    Set NLS_CALENDAR Variable in client OS environment.
    <e.g: On NT: set variable in the registry
    On Unix: set UNIX environment variable in .profile/.cshrc>
    3. Within SQL function:
    SQL> select to_char(sysdate,'day dd month yyyy','nls_calendar=''arabic hijrah''')
    from dual ;
    References
    <Note:30772.1>
    2.How to display both Hijrah and Gregorian dates in the same select statement?
    Answer
    select
    to_char(sysdate,'day dd month yyyy','nls_calendar=''arabic hijrah'''),
    to_char(sysdate,'day dd month yyyy','nls_calendar=''gregorian''')
    from dual ;
    References
    <bug:1302683>
    3.What is Calendar Deviation?
    Answer
    Since Hijrah month is based on the moon complete revolution around the sun, Hijrah
    Calendar has different number of days in a year than Gregorian; therefore some manual
    deviation adjustement might be needed for the conversion to/from Gregorian. In other
    words HIJRAH calendar is Lunar based, corrections need to be made every so often.
    4.How to set deviation?
    Answer
    1. Shutdown the database
    2. Edit lxecal.nlt (lxecal.dat in Oracle7) in $ORACLE_HOME/ocommon/nls.
    e.g: to add one day after Sep-29-2000:
    DEFINE calendar
    calendar_name = "Arabic Hijrah"
    DEFINE calendar_deviation
    deviation_data = {
    <"Sep-29-2000 ad">:1
    ENDDEFINE calendar_deviation
    ENDDEFINE calendar
    Note: Gregorian date specified in the deviation should correspond to one of
    29th, 30th or 31th days of the hijrah calendar.
    3. Run the NLS Calendar Utility lxegen to register your modification to Oracle calendar
    system, this utility generates lxecalah.nlb file in the same directory mentioned above.
    4. startup the database.
    The same procedure can be followed to subtract days, but number specified in the
    deviation_data should be greater than 10.
    <e.g: 11 --> subtract one day, 12 --> subtract two days ...etc>
    References
    Hope this helps
    Regards
    Grant Ronald
    Forms Product Management

  • Arabic Hijri Date

    I want to store and display dates of my application in Arabic Hijri style. Is there any function that converts american date into Arabic Hijri date...?
    Or any other sollution for it..?
    Note: I m using American_america.we8iso8859p1 character set and also need the sollution in the same...

    Try this
    alter session set NLS_CALENDAR="Arabic Hijrah" ;
    When I grepped for Hijri, I got only the above one for Hijri, Hijra & Hijrah.
    Also worth trying "Arabic Hijri".
    Thanks,
    Vinod.

  • Sony Image Data Converter no longer opens RAW files

    After upgrading to Snow Leopard Sony Image Data Converter (ver 3.1) cannot open my RAW files. It sees the files but claims they are 0x0 pixels in size. It worked fine with Leopard 10.5.8.

    Image Data Converter v2.2.02 also fails to open any files but was OK in 10.5.8. Image Data Lightbox v1.0.02 does run OK, opens a directory of files fine, and converts them. The app crashes on exit every time however!
    Adobe Camera RAW and Adobe Elements v6 all work perfectly well. But I have never been able to see ARW images in Adobe Bridge!

  • Data convertion while exporting data into flat files using export wizard in ssis

    Hi ,
    while exporting data to flat file through export wizard the source table is having NVARCHAR types.
    could you please help me on how to do the data convertion while using the export wizard?
    Thanks.

    Hi Avs sai,
    By default, the columns in the destination flat file will be non-Unicode columns, e.g. the data type of the columns will be DT_STR. If you want to keep the original DT_WSTR data type of the input column when outputting to the destination file, you can check
    the Unicode option on the “Choose a Destination” page of the SQL Server Import and Export Wizard. Then, on the “Configure Flat File Destination” page, you can click the Edit Mappings…“ button to check the data types. Please see the screenshot:
    Regards,
    Mike Yin
    TechNet Community Support

  • Problem in date converting into dbFormat()

    Respected Experts,
    I am get the current date into String vaiable and from this string variable i want to convert into dateformat.
    For converting to date format i write the .java file. It converts date correctly into format "dd/mm/yyyy" but i want date format into "dd/mm/yyyy HH:MM.pm/am", so what change should i do in my following progaram.
    import java.text.SimpleDateFormat;
    import java.text.DateFormat;
    import java.text.ParseException;
    import java.util.Date;
    public class UtilityFunction
         public static String toUserFormatDate(Date dt)throws ParseException
         SimpleDateFormat sdf=new SimpleDateFormat("dd/MM/yyyy");
         String str=sdf.format(dt);
         return str;
         public static java.sql.Date toDbFormatDate(String sdt)throws ParseException
         SimpleDateFormat sdf=new SimpleDateFormat("dd/MM/yyyy");
         Date d=sdf.parse(sdt);
         SimpleDateFormat nsdf=new SimpleDateFormat("dd-MM-yyyy");
         String str=nsdf.format(d);
         Date nd=nsdf.parse(str);
         java.sql.Date rdate= new java.sql.Date(nd.getTime());
         return rdate;
         public static void main(String args[])throws ParseException
              SimpleDateFormat df=new SimpleDateFormat("dd-MM-yyyy");
              Date d2 =df.parse("08-09-1984");
              System.out.println("Date converted to User interface form");
              System.out.println("Database Date"+"08-09-1984");
              String p=toUserFormatDate(d2);
              System.out.println("Converted date"+p);
              java.sql.Date r=toDbFormatDate("12/12/2009");
              System.out.println("Date converted to database form");
              System.out.println("User Interface Date"+"12/12/2009");
              System.out.println("Converted date"+r);
    }

    After 22 posts on the forums, I'd have expected you to have learnt how to use the code tags by now (click on 'CODE' when posting)
    And while you get points for posting an SSCCE, you've left too much fluff in there. I don't know what method you want to discuss.
    And if you've reached this far with the SimpleDateFormat, what kept you from reading the rest of patterns available? It's all the same thing, you just needed to make it dd/MM/yyyy hh:mm a
    Do note that with your code, you're creating a date from a string that's missing the time, so you'll only get 12:00 AM all the time, for the above pattern. And also, you'd be using hh and not HH since putting AM/PM with 24 hour clock time is plain dumb.

  • Querying hijri date

    hi..i have a hijri date in a table with the value like this:
    HIJRI_DATE
    7/11/1426
    8/11/1426
    9/11/1426
    10/11/1426
    how can i retreived that record using HIJRI_DATE BETWEEN '7/11/1426' AND '10/11/1426'? i tried it but no records shows..
    thanks.

    hi user,
    why dont you try like following,
        HIJRI_DATE BETWEEN to_date('7/11/1426','dd/mm/yyyy') AND to_date('10/11/1426','dd/mm/yyyy')
      Regards
    Sankar MN

  • Hijri Date

    Dear Guyz,
    anyone guide me how to get hijri date with the format (i.e. YYYY/MM/DD ) 1420/02/25 already date store is in database in report its showing DD/MON/YYYY.
    anyhelp would appreciate.
    Regards
    Moazam

    Moazam,
    I guess that it is best to create a database function with:
    TO_CHAR(TO_DATE(ISU_DATE,'YYYYMMDD'),'YYYYMMDD', 'NLS_CALENDAR = '''||'ARABIC HIJRAH''')
    and use it in your queries every time you need to get a date.
    Otherwise I think that you can probably set the NLS_CALENDAR to ARABIC HIJRAH (via a database procedure?) in a Before Report trigger and then all dates will probably be correct for the report session.
    These are the 2 things that I would try.
    Dave

  • PL/SQL Character to date convertion issue

    Dear all,
    I encounter an issue with character to date convertions in PL/SQL.
    The following is a short description:
    I use an Oracle DBMS 8i and the problem is a wrong insertion of a date value to a column table.
    The date value is retrieved from a table and is type of VARCHAR2(240). Then a convertion to the DATE type takes place and this value (date) is inserted to another table column of type DATE.
    For example if the date retrieved as VARCHAR2 is '21/05/2003' the value inserted is '21/5/0003'.
    The convertion is made by the following portion of code:
    dateVariable Date := NULL:
    dateStringVariable is retrieved from the db and is type of VARCHAR2(240)
    DATE_FORMAT is a string retireved from the db with value equals to 'DD/MM/YYYY HH24:MI:SS'
    dateVariable := TO_DATE(dateStringVariable, DATE_FORMAT);
    Then the dateVariable is inserted to a recordSet which in turn is the one inserted to the db.
    My guess is that the problem is during the char to date convertion.
    I wonder if anyone knows what produces this error.
    Any suggestion is welcome.
    With regards

    SQL> desc t
    Name                                      Null?    Type
    DATE#                                              DATE
    SQL> alter session set nls_date_format = 'DD-MON-RR';
    Session altered.
    SQL> select * from t;
    no rows selected
    SQL> insert into t values(to_date('21/05/2003','DD/MM/YYYY'));
    1 row created.Now Oracle keeps correct date - 21th of May 2003.
    How you display it depends on your NLS_DATE_FORMAT settings:
    SQL> select * from t;
    DATE#
    21-MAY-03
    SQL> alter session set nls_date_format = 'MM/DD/YYYY';
    Session altered.
    SQL> select * from t;
    DATE#
    05/21/2003So now try to do
    SELECT to_char(<<your new date column>>,'DD/MM/YYYY') from <<your table>>
    to be sure your date is kept right.
    Rgds.

  • Difference between real Hijri Date with Oracle Hijri date

    Dear ALL,
    I will appreciate if any one please let me the solution for this problem. In my application I show the Date in Hijri using the NLS setting. but the issue that "i face a deference between the real hijri date with oracle hijri date"
    Assume that the real hijri date on 18-SEP-2012 was 02/11/1433 in hijri but in oracle was 03/11/1433
    when I execute the following query it shows me "1433/11/03", but the actual Hijri date is "1433/11/02"
    select to_char(to_date('20120918','YYYYMMDD'),'YYYY/MM/DD', 'NLS_calendar='''||'ARABIC hijrah') FROM DUAL;
    IFTIKHAR

    Hi,
    It works correctly for me, too:
    SELECT  TO_CHAR ( TO_DATE ('20120918', 'YYYYMMDD')
              , 'YYYY/MM/DD'
              , 'NLS_calendar=''ARABIC hijrah'''
              )      AS h_date
    FROM    dual;Output:
    H_DATE                                                                         
    1433/11/02                                                                      I tried it on Oracle versions
    9.2.0.6.0
    10.1.0.2.0
    10.2.0.3.0
    11.1.0.6.0
    11.2.0.1.0
    and got the same results every time. What version of Oracle are you using? What other software (front end, OS, ...)?
    If it's consistently giving you the results for the day after the day wanted, then subtract 1 day before calling TO_CHAR. I know this is not a solution, just a work-around until you find and fix the real problem.

  • Disable default message for date converter

    Hi,
    How can I disable the default message on tab for date converter.
    Thanks

    Use message bundles.
    http://oracamp.com/how-extend-default-adf-faces-component-message-bundle
    http://oracamp.com/context-sensitive-resource-bundle-entries-javaserver-faces-applications-going-beyond-plain-language-
    Customzing ADF Faces Convert Number Detail Error Message from a Message Bundle
    http://blogs.oracle.com/smuenchadf/examples/

Maybe you are looking for