Friday, August 10, 2012

REP-0613: Value does not match mask 'DD-MON-RR'


REP-0613: Value does not match mask 'DD-MON-RR'


Oracle Reports Date Handling When you register the report in Oracle apps. 

Use the value set FND_STANDARD_DATE Value set in the Oracle apps front end.
and in the user parameters defined in the report use the following as input mask against the date field.for the parameter as  RRRR/MM/DD HH24:MI:SS.

Then the Input to the code will be in the format of 'DD-MON-RR' and it is a date data type.


v_date_where    VARCHAR2(2000) := NULL;
begin
  IF :P_FROM_DT IS NOT NULL THEN
-- 06/30/2004 NPRASAD Commented the following 
--   v_date_where := ' AND trunc(ctb.creation_date)  >= to_date('||''''||to_char(:P_FROM_DT, 'DD-MON-RR')||''''||','|| '''DD-MON-RR'||''')-14 ';
  v_date_where := v_date_where || ' AND trunc(ctri.creation_date) >= to_date('||''''||to_char(:P_FROM_DT, 'DD-MON-RR')||''''||','|| '''DD-MON-RR'||''') ';
  END IF;
  IF :P_TO_DT IS NOT NULL THEN
  v_date_where := v_date_where || ' AND trunc(ctri.creation_date) <= to_date('||''''||to_char(:P_TO_DT, 'DD-MON-RR')||''''||','|| '''DD-MON-RR'||''') ';
  END IF;  
  srw.message(100,'Date where:'|| v_date_where);  
  return (v_date_where);
exception
  when others then
  srw.message (101,'Error! CF_DATE_WHERE failed '||sqlerrm);
  return (NULL);

No comments:

Post a Comment