Thursday, May 5, 2016

SQL to fetch first day and last day of the month

SELECT LEVEL,
       TO_CHAR (TRUNC (ADD_MONTHS (SYSDATE, LEVEL - 1), 'MM'), 'DD-MON-RRRR'),
       TO_CHAR (LAST_DAY (ADD_MONTHS (SYSDATE, LEVEL - 1)), 'DD-MON-RRRR')
FROM DUAL
CONNECT BY LEVEL <= 100;

How to open wrapped Package Source Code in Oracle Apps

http://www.codecrete.net/UnwrapIt/

How to fetch current login user using sql

select SYS_CONTEXT('USERENV', 'SESSION_USER') from dual;

Tuesday, March 15, 2016

set system date to OAMessageDateField in OAF

       SimpleDateFormat f = new SimpleDateFormat("yyyy-mm-dd");
       String dateString = f.format(cal.getTime());
       Date currdate = new Date();
       currdate = (Date)f.parse(dateString);
       OAMessageDateFieldBean oamessagedatefieldbean = (OAMessageDateFieldBean)oawebbean.findIndexedChildRecursive("CorporateRateDate");
       oamessagedatefieldbean.setValue(oapagecontext, currdate);

Thursday, March 10, 2016

Show line break in outputtext as per database in ADF

&lt div style="white-space: pre-wrap"&gt#{row.value}&lt/div&gt