OAF changes Date Format

Hi
I need to store a date into a flexfield. We have enabled the Flexfield and there is NO value set attached to it.
This attribute is already in the VO as a varchar, so we have just added a new column into the page as data type Date and link it to the flexfield column.
In this page we have a table layout so the user can enter 10 rows before saving them. And this page it just used to punch data into a table, which means, once the user press apply the page saves and clears. The user can not query on that page.
When entering the first row, we can open the Date picker and we can choose the date and then it populates the column as “DD-MON-YYYY”.
The problem is:
When we entering the second row after entering one column the pages changes the format of my date from the previous record to “YYYY-MM-DD”, then after entering any second column the pages clear the date from the previous row.
Running the page from JDev it shows the following message before clears the flexfield:
java.text.ParseException: 2011-01-28
Note we have not extended the VO and not extended the controller.
My questions are:
1) Why the Self-Service is change the date format to YYYY-MM-DD even if the profile ICX: Date Format Mask (31-DEC-1999) and my preference is set to DD-MON-YYYY?
2) How can I avoid this to happen? Is there any way to keep my date as DD-MON-YYYY?
Thanks,
Alex

Alex,
That was the update from Oracle support, when we raised it,
But I did the following to handle that, I feel this is not the right way, since we had that issue as SEV1, I did that as a workaround,
Check this this might help.
package oracle.apps.xxper.selfservice.appraisals.webui;
import com.sun.java.util.collections.HashMap;
import java.io.Serializable;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.webui.*;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageCheckBoxBean;
import oracle.apps.per.selfservice.appraisals.ApprConstants;
import oracle.apps.per.selfservice.arch.webui.PerOAControllerImpl;
import oracle.apps.per.selfservice.common.webui.CommonCO;
import oracle.apps.per.selfservice.compgaps.Constants;
import oracle.apps.per.selfservice.appraisals.webui.MAFinalRatingsPageCO;
import oracle.apps.fnd.framework.server.OADBTransaction;
import oracle.apps.fnd.framework.OAViewObject;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import oracle.jbo.Row;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageDateFieldBean;
import oracle.apps.per.selfservice.appraisals.server.AppraisalVORowImpl;
public class XXPERMAFinalRatingsPageCO extends MAFinalRatingsPageCO
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
writeLog("XXPER",pageContext,"Start PR XXPERMAFinalRatingsPageCO ");
OAMessageDateFieldBean dateBean =(OAMessageDateFieldBean) webBean.findChildRecursive("DeliveryDateTime");
if(dateBean !=null )
String dateBeanValue = (String) dateBean.getValue(pageContext) ;
writeLog("XXPER",pageContext,"dateBean Value "+dateBeanValue);
if(dateBeanValue !=null)
if(dateBeanValue.indexOf(".0") !=-1)
dateBeanValue = dateBeanValue.substring(0,dateBeanValue.length()-2);
writeLog("XXPER",pageContext,"dateBean Updated Value "+dateBeanValue);
String dateMaskQry = "SELECT value FROM V$NLS_Parameters WHERE parameter ='NLS_DATE_FORMAT'";
writeLog("XXPER",pageContext,"dateMaskQry "+dateMaskQry);
String dateMask = (String) executeSql(dateMaskQry, pageContext, webBean);
writeLog("XXPER",pageContext,"dateMask : "+dateMask);
String dateConvertQry = "select to_char(fnd_date.canonical_to_date('"+dateBeanValue+"') ,'"+dateMask+" HH24:MI:SS') from dual";
writeLog("XXPER",pageContext,"dateConvertQry "+dateConvertQry);
String convertedDateValue = (String) executeSql(dateConvertQry,pageContext,webBean);
writeLog("XXPER",pageContext,"convertedDateValue "+convertedDateValue);
if(convertedDateValue == null )
convertedDateValue = dateBeanValue;
dateBean.setValue(pageContext,convertedDateValue);
writeLog("XXPER",pageContext,"After set the value "+convertedDateValue);
setAttribute3(pageContext, convertedDateValue);
writeLog("XXPER",pageContext,"After set the VO value "+convertedDateValue);
}else
writeLog("XXPER",pageContext,"dateBean value is null from the bean Get the value from getAttribute3() method");
dateBeanValue = getAttribute3(pageContext);
dateBean.setValue(pageContext,dateBeanValue);
}else
writeLog("XXPER",pageContext,"dateBean is null ");
writeLog("XXPER",pageContext,"End PR XXPERMAFinalRatingsPageCO ");
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
writeLog("XXPER",pageContext,"Start PFR XXPERMAFinalRatingsPageCO ");
writeLog("XXPER",pageContext,"Event Param "+pageContext.getParameter(EVENT_PARAM));
OAMessageDateFieldBean dateBean =(OAMessageDateFieldBean) webBean.findChildRecursive("DeliveryDateTime");
if(dateBean !=null )
String dateBeanValue = (String) dateBean.getValue(pageContext) ;
if(dateBeanValue !=null)
if(dateBeanValue.indexOf(".0") !=-1)
dateBeanValue = dateBeanValue.substring(0,dateBeanValue.length()-2);
writeLog("XXPER",pageContext,"dateBean Updated Value "+dateBeanValue);
String dateMaskQry = "SELECT value FROM V$NLS_Parameters WHERE parameter ='NLS_DATE_FORMAT'";
writeLog("XXPER",pageContext,"dateMaskQry "+dateMaskQry);
String dateMask = (String) executeSql(dateMaskQry, pageContext, webBean);
writeLog("XXPER",pageContext,"dateMask : "+dateMask);
String dateConvertQry = "select to_char(fnd_date.canonical_to_date('"+dateBeanValue+"') ,'"+dateMask+" HH24:MI:SS') from dual";
//String dateConvertQry = "select fnd_date.string_to_canonical('"+dateBeanValue+"','"+dateMask+" HH24:MI:SS') from dual";
writeLog("XXPER",pageContext,"dateConvertQry "+dateConvertQry);
String convertedDateValue = (String) executeSql(dateConvertQry,pageContext,webBean);
writeLog("XXPER",pageContext,"convertedDateValue "+convertedDateValue);
if(convertedDateValue == null )
convertedDateValue = dateBeanValue;
dateBean.setValue(pageContext,convertedDateValue);
writeLog("XXPER",pageContext,"After set the value "+convertedDateValue);
setAttribute3(pageContext, convertedDateValue);
writeLog("XXPER",pageContext,"After set the VO value "+convertedDateValue);
}else
writeLog("XXPER",pageContext,"dateBean is null ");
writeLog("XXPER",pageContext,"End PFR XXPERMAFinalRatingsPageCO ");
super.processFormRequest(pageContext, webBean);
writeLog("XXPER",pageContext,"End PFR XXPERMAFinalRatingsPageCO (After Super Call )");
public void writeLog(String moduleName, OAPageContext pageContext, String diagText)
if(pageContext.isLoggingEnabled(OAWebBeanConstants.STATEMENT))
System.out.println(moduleName+" : "+diagText);
pageContext.writeDiagnostics(moduleName,diagText,OAWebBeanConstants.STATEMENT);
* Method to execute SQL.
public Object executeSql(String pSqlStmt, OAPageContext pageContext , OAWebBean webBean)
OADBTransaction tx = pageContext.getApplicationModule(webBean).getOADBTransaction();// (OADBTransaction)getOADBTransaction();
Object lObject = null;
// Create the callable statement
CallableStatement lCstmt = (CallableStatement)tx.createCallableStatement(pSqlStmt, 1);
ResultSet rs = null;
try
rs = lCstmt.executeQuery();
while(rs.next())
lObject = rs.getObject(1);
catch (Exception e)
//throw OAException.wrapperException(e);
finally
try {
if(rs!=null)
rs.close();
if(lCstmt != null)
lCstmt.close();
catch(Exception e) {
throw OAException.wrapperException(e);
return lObject;
} // executeSql
public void setAttribute3(OAPageContext pageContext, String dateValue)
OAApplicationModule rootAM = pageContext.getRootApplicationModule();
OAApplicationModule apprAM = (OAApplicationModule)rootAM.findApplicationModule("AppraisalsAM");
OAViewObject appraisalVO = (OAViewObject)apprAM.findViewObject("AppraisalVO");
writeLog("XXPER",pageContext,"appraisalVO "+appraisalVO);
if(appraisalVO !=null)
AppraisalVORowImpl appraisalVORow = (AppraisalVORowImpl) appraisalVO.getCurrentRow();
if(appraisalVORow !=null)
int attrCount = appraisalVO.getAttributeCount();
writeLog("XXPER",pageContext,"Attrbuute count "+attrCount);
String[] attributeNames = appraisalVORow.getAttributeNames();
appraisalVORow.setAttribute3(dateValue);
public String getAttribute3(OAPageContext pageContext)
OAApplicationModule rootAM = pageContext.getRootApplicationModule();
OAApplicationModule apprAM = (OAApplicationModule)rootAM.findApplicationModule("AppraisalsAM");
String attribute3Value = "N";
OAViewObject appraisalVO = (OAViewObject)apprAM.findViewObject("AppraisalVO");
writeLog("XXPER",pageContext,"appraisalVO "+appraisalVO);
if(appraisalVO !=null)
AppraisalVORowImpl appraisalVORow = (AppraisalVORowImpl) appraisalVO.getCurrentRow();
if(appraisalVORow !=null)
int attrCount = appraisalVO.getAttributeCount();
writeLog("XXPER",pageContext,"Attrbuute count "+attrCount);
String[] attributeNames = appraisalVORow.getAttributeNames();
writeLog("XXPER",pageContext," AppraisalId :- "+ appraisalVORow.getAppraisalId());
attribute3Value = (String)appraisalVORow.getAttribute3();
String attribute1Value = (String)appraisalVORow.getAttribute1();//getAttribute2
String attribute2Value = (String)appraisalVORow.getAttribute2();
writeLog("XXPER",pageContext," attribute3Value :- "+attribute3Value + " attribute1Value "+ attribute1Value +"attribute2Value "+attribute2Value);
}else
writeLog("XXPER",pageContext," appraisalVORow is null ");
}else
writeLog("XXPER",pageContext," appraisalVO is null ");
return attribute3Value;
}

Similar Messages

  • How to change data format from  MM/DD/YYYY to DD/MM/YYYY

    HI,
    How can we change data format from MM/DD/YYYY to DD/MM/YYYY in Prompt and Report Level in obiee 11g.
    Please help me ont this.
    Thanks

    Hi,
    In Prompt:
    Try using EVALUATE function.
    Eg: Evaluate('TO_CHAR(%1,%2)' as character(30),"D5.Times"."Day Date",'DD-MON-YYYY')
    Report level:
    Try this in the column formula-
    Evaluate('TO_CHAR(%1,%2)' as character(30),"D5.Times"."Day Date",'MM/DD/YYYY')
    (or)
    EVALUATE('TO_CHAR(%1,%2)' AS CHARACTER ( 30 ), "Dim- Date".Start Date, 'MON-YY')
    http://108obiee.blogspot.in/2009/03/how-to-change-date-format-mask-in-date.html
    http://obiee-bip.blogspot.in/2011/08/customizing-obiee-calendar-display.html
    Some other methods.
    Metdhod 1:
    'Save System-Wide Column Formats' Option
    Check this.
    http://siebel-essentials.blogspot.com/2010/10/11-obiee-11g-tips-9-system-wide.html?m=1
    Thanks
    satya

  • Change date format in reporting (query)

    I need to change date format from dd.mm.yyyy to dd/mm/yyyy in reporting (query)

    Hi Suresh,
    Go to transaction su01d in that enter your user.
    Now go to defaults and change the date format.
    Ya but this format will be user specific, so if you want everyone to see that format you have to change it for all.
    Regards
    Mansi

  • How to change date format for prentation variable in Formula

    Hi experts.._
    I need to change date format for presentation variable in formula..
    my dashbord date prompt format: mm/dd/yyyy(i have created one presentation variable for this prompt: pv_date)
    now i need to show it as : month-dd-yyyy
    Thanks in advance
    Regards
    Frnds

    Hi Kishor...Thanks for reply...
    But i need to change my precentation variable date formt...
    i need to write one text like: 'Year to dd/month/yy' in one column formula..
    So how can i achieve it..

  • How to change date format in alv report

    hi ,
    i wanna change date format which is in yyyy.mm.dd to mm/dd/yyyy in alv report.
    plz advise.
    thanks
    sudheer

    Hi sudheer,
    There is no direst Fm fro that.
    But u can follw the below way. it worked for me. kindly chk it.
    [code]DATA: V_DATE_IN(10) TYPE C,
    V_DATE_SAP TYPE SY-DATUM.
    V_DATE_IN = '01.01.2005.'.
    CONCATENATE V_DATE_IN+6(4) "<--for Year
    V_DATE_IN+3(2) "<--for month
    V_DATE_IN+0(2) "<--for Day
    INTO V_DATE_SAP.
    now V_DATE_SAP will have value like 20060101.
    now use.
    CONVERSION_EXIT_PDATE_OUTPUT Conversion Exit for Domain GBDAT: YYYYMMDD -> DD/MM/YYYY[/code]
    regards
    anver
    <b><i>if hlped pls mark points</i></b>

  • Change Date Format in MSDS report

    SAP EHS expert:
    I would like to change Date Format when printing MSDS in different languages. For example, print date in MM.DD.YYYY format when printing MSDS in English, but print date in YYYY. MM. DD format when printing MSDS in Chinese.The Generation Variant setting is MM.DD.YYYY because most of time we print that MSDS in English.
    Does any one know how to do it?
    Thanks
    Tina Wu

    hi,
    create a new generation variant for the Report template and select the date format that you want in the new GV. While printing the report template select the generation varient created for the required date format.
    Ashish

  • Changing date format in bw report

    Hi,
    Could anybody pls Explain How can I change date format in bw report from 19-03-2008 to 19 mar 2008.Is there any setting we need to do. Else do i need to write some ABAP code to get desired format.
    Regards,
    Sarath

    Hi Sarath,
    I could have the routine enabled and its wrk for my DATS obj ...
    else pls go through the following code
    Check this example of how to get this format..
    TABLES: T247.
    DATA: V_DATE TYPE SYDATUM.
    DATA: V_STRING(20).
    V_DATE = SY-DATUM.
    SELECT SINGLE * FROM T247
    WHERE SPRAS = SY-LANGU
    AND MNR = V_DATE+4(2).
    IF SY-SUBRC = 0.
    CONCATENATE V_DATE+6(2) '-' T247-KTX '-' V_DATE(4)
    INTO V_STRING.
    WRITE: / V_STRING.
    ENDIF.
    or make use of the routine make use of the FM
    CONVERSION_EXIT_IDATE_OUTPUT
    hope it helps you out...
    regards,
    pradeep
    Assign points if useful.

  • Changing date format in EP 5.0

    Hi,
    I am working on EP 5.0 on ITS Server .For designing GUI i am using HTMLB with jsp .
    When i choose the date from date picker(calender in this case) it comes in the format mm/dd/yyyy  . But the requirement is like when i choose date , on the screen it should appear in dd.mm.yyyy  format .
    Can anybody tell how to achive this .Whether i have to change the user settings in Portal or i have to change the code in JSP .If i can get the detailed procedure in how to do this then it would be more useful to me .
    Thanks a lot .

    Hi Jain,
    Refer the following links where the question has been answered.
    Changing the date format in a HTMLB Input field component
    /thread/33623 [original link is broken]
    how can i change date format in portal?
    Regards,
    Tamil K

  • Function module to change date format

    hi
    is there any function module to change date format from 20080318 to 18.03.2008

    Hi,
    Use this FM  CONVERT_DATE_FORMAT            Convert date from yyyymmdd to ddmmyyyy format
    Regards,
    Jyothi CH.

  • How to change Data Format

    I'm using Sql Developer vers. 1.1.2. for Oracle 8.1.7 and I can't change Data Format. Even if first I run "alter session set nls_date_format = 'DD/MM/YYYY';" and after I run "select data_field from table;" in the SQL Worksheet, it goes on reporting the field in format "MM/DD/YYYY HH:MI:SS". It seems to me as if the "alter session" doesn't work.
    I've got a problem with decimal separator too. I mean when I run "select salary_field from table;" and the item is for example 2300,32 the report gets null column even if I've set Decimal Separator to "," from Tools>NSL Parameters>Decimal Separator.
    I need help.
    Thanks in advance
    Marco

    Marco,
    It isn't really a great help, as you need to access 8.1.7, but the current version doesn't have this problem - it uses the current NLS_DATE_FORMAT setting to format the date, regardless of the NLS preferences.
    I have vague memories (1.1.2 has largely faded from my memory) that when they first introduced the NLS preferences that they took precedence over the DB NLS settings (ie date formatted in SQL Developer based on NLS preferences).
    On the decimal separator, I have other vague memories of problems if you didn't set both the Decimal and Group separator, although a quick search on the forum didn't highlight something that seemed the same as your problem. After logging on (ie with the NLS preferences as the DB NLS settings), what do you get if you the NLS_NUMERIC_CHARACTERS parameter in the NLS_SESSION_PARAMETERS view? This should have two characters - the first one being the decimal separator and the second being the group separator.
    theFurryOne

  • Change date format

    Hi,
    I imported RFC model in Web Dynpro application. One of imported fields is date.
    I'll like to change date format.
    How I can changed it?
    Thanks
        Vedran

    how did you do it?

  • How to change date format in OBIEE

    Hello
    I have a need to change the date column to a varchar column in OBIEE..
    The date column stores data in the format of 'YYYY/MM/DD', I need to change this to a varchar column with this format 'YYYYMM'..
    Since I am pointing directly at the transactional database, I can't make any changes at the database level, so I will have to do it in OBIEE layer, any ideas how it could be done?
    Many thanks in advance!

    hi user,
    Refer : http://varanasisaichand.blogspot.com/2010/01/how-to-change-data-format-to-our-custom.html
    http://varanasisaichand.blogspot.com/2010/05/evaluate-function.html
    Thanks,
    Saichand.v

  • How to change date format in select-option (mm.yyyy).

    Hi,
       Plz, How to change date format in select-option (mm.yyyy).
      in my selection screen date type selection-option is there ,when i am enter date   it's  taken  dd.mm.yyyy format,but i want mm.yyyy format.
    how to set that .
    Regards,
    Kk.

    sorry
    parameters : pmonyr type spmon or
    select-options : sspmon for PGPL-spmon .
    or what table ccontains spmon.
    regards
    shiba dutta

  • How to change Date format in Prompts.

    Hi,
    How to change Date format to DD/MM/YYYY in Dashboard Prompts.Kindly let me know.

    Hi,
    try to below ways
    1) By using cast fxn you can solve it.
    SELECT CAST("YOUR COLUMN" AS DATE) FROM "SUBJECT AREA NAME"
    2) This is a known bug get patch Bug 9280334: CALENDAR DD/MM/YYYY PROMPT IN DASHBOARD RETURNING FORMAT YYYY-MM-DD HH:MI:SS from support.oracle.com
    3) refer
    http://108obiee.blogspot.com/2009/04/changing-date-format-mask-in-javascript.html
    Thanks
    Deva

  • How to change date format

    Can anyone help me with this, Please?
    I have a form with start date and end date and the date format I am getting is YYYY-MM-DD. But I would like to change it to MM-DD-YYYY format. How do I achieve this??
    When I went to JFPREAMBLE_1, i see it reads:
    ^define group:PO_DOC_COMM__SVC_STRT_DT!FldNotAvail  \groupG_Commodity_Line\fieldPO_DOC_COMM__SVC_STRT_DT.
    ^define group:PO_DOC_COMM__SVC_STRT_DT!FldUsed      \groupG_Commodity_Line\fieldPO_DOC_COMM__SVC_STRT_DT.
    ^define group:PO_DOC_COMM__SVC_END_DT!FldNotAvail  \groupG_Commodity_Line\fieldPO_DOC_COMM__SVC_END_DT.
    ^define group:PO_DOC_COMM__SVC_END_DT!FldUsed      \groupG_Commodity_Line\fieldPO_DOC_COMM__SVC_END_DT.
    Can I change anything here to change the format??? Or how do I change date format??
    I would really appreciate your help on this. Thanks in advance.

    Hi,
    Try this in the column formula-
    Evaluate('TO_CHAR(%1,%2)' as character(30),"D5.Times"."Day Date",'MM/DD/YYYY')
    (or)
    EVALUATE('TO_CHAR(%1,%2)' AS CHARACTER ( 30 ), "Dim- Date".Start Date, 'MON-YY')
    http://108obiee.blogspot.in/2009/03/how-to-change-date-format-mask-in-date.html
    http://obiee-bip.blogspot.in/2011/08/customizing-obiee-calendar-display.html
    Some other methods.
    Metdhod 1:
    'Save System-Wide Column Formats' Option
    Check this.
    http://siebel-essentials.blogspot.com/2010/10/11-obiee-11g-tips-9-system-wide.html?m=1
    Thanks
    satya
    Edited by: Satya Ranki Reddy on Jul 2, 2012 3:57 PM
    Edited by: Satya Ranki Reddy on Jul 2, 2012 3:59 PM
    Edited by: Satya Ranki Reddy on Jul 2, 2012 4:13 PM

Maybe you are looking for