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;

Wednesday, July 9, 2014

SQL query to check which user locked the table

SELECT objects.owner,
       objects.object_name,
       objects.object_type,
       user1.user_name         locking_fnd_user_name,
       login.start_time        locking_fnd_user_login_time,
       vs.module,
       vs.machine,
       vs.osuser,
       vlocked.oracle_username,
       vs.sid,
       vp.pid,
       vp.spid                 os_process,
       vs.serial#,
       vs.status,
       vs.saddr,
       vs.audsid,
       vs.process
  FROM fnd_logins      login,
       fnd_user        user1,
       v$locked_object vlocked,
       v$process       vp,
       v$session       vs,
       dba_objects     objects
 WHERE vs.sid = vlocked.session_id
   AND vlocked.object_id = objects.object_id
   AND vs.paddr = vp.addr
   AND vp.spid = login.process_spid(+)
   AND vp.pid = login.pid(+)
   AND login.user_id = user1.user_id(+)
--change the table name below
   AND objects.object_name LIKE '%' || upper('AP_INVOICES_ALL') || '%'
   AND nvl(vs.status,
           'XX') != 'KILLED';

Monday, June 16, 2014

Query to fetch DFF field details

select a.APPLICATION_TABLE_NAME,b.* from FND_DESCRIPTIVE_FLEXS_VL a,FND_DESCR_FLEX_COL_USAGE_VL b
where a.descriptive_flexfield_name=b.descriptive_flexfield_name
and a.descriptive_flexfield_name='GMS_INSTALLMENTS_DESC_FLEX'

Friday, May 2, 2014

SQL Query to fetch file version of standard package files

select distinct af.app_short_name
, af.filename
, afv.version
, afv.creation_date
from ad_file_versions afv, ad_files af
where afv.file_id = af.file_id
and upper(af.filename) like  
order by 4 desc