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

Tuesday, December 9, 2014

ADF Page in OAF Page

1.Develop the ADF Page
2.Create a function to the ADF Page of Type ADFX.
3.Develop a OAF Page with pageLayout Region
4.Add a Rich Text Container item in PageLayout Region.
5.In the Rich Text Container Item,give the destination Functional property to ADF Page registered function.
6.Create Page Controller.
7.In the process Request get the session id and userid and assign the values of &SessionId and &UserId
8.Deploy the OAF Page to EBS Application Server.
9.Deploy the ADF Page to Web Logic Server.

Monday, November 17, 2014

PA_INTERFACE_UTILS_PUB.SET_GLOBAL_INFO is getting failed with Org Context Issue for single org

If the below API is unable to set the org context where MOAC is not enabled.

  PA_INTERFACE_UTILS_PUB.SET_GLOBAL_INFO( P_API_VERSION_NUMBER => 1.0
                                      , P_RESPONSIBILITY_ID =>
                                      , P_USER_ID =>
                                      , P_OPERATING_UNIT_ID =>
                                      , P_MSG_COUNT => v_msg_count
                                      , P_MSG_DATA => v_msg_data
                                      , p_return_status => v_return_status);

We can use the below APIs to set the org context where MOAC is not enabled.



declare
l_msg_count number;
l_msg_data varchar2(1000);
l_return_status varchar2(10);
l_org_id number;
begin

PA_MOAC_UTILS.SET_POLICY_CONTEXT('S',); 

PA_MOAC_UTILS.MO_INIT_SET_CONTEXT(p_org_id          =>l_org_id
                             , p_product_code   =>'PA'
                             , p_msg_count       =>l_msg_count
                             , p_msg_data      =>l_msg_data
                             , p_return_status  =>l_return_status);
end;