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 

Tuesday, April 29, 2014

API to cancel an AP invoice in R12

Declare
v_boolean               BOOLEAN;
v_error_code            VARCHAR2(100);
v_debug_info            VARCHAR2(1000);
begin
v_boolean :=AP_CANCEL_PKG.IS_INVOICE_CANCELLABLE(
                P_invoice_id       => p_inv_id,
                P_error_code       => v_error_code,
                P_debug_info       => v_debug_info,
                P_calling_sequence => NULL);
IF v_boolean=TRUE
THEN
DBMS_OUTPUT.put_line ('Invoice '||p_inv_id|| ' is cancellable' );
ELSE
DBMS_OUTPUT.put_line ('Invoice '||p_inv_id|| ' is not cancellable :'|| v_error_code );
END IF;
End;



To cancel an AP invoice if cancellable.

Declare
v_boolean               BOOLEAN;
v_message_name          VARCHAR2(1000);
v_invoice_amount        NUMBER;
v_base_amount           NUMBER;
v_temp_cancelled_amount NUMBER;
v_cancelled_by          VARCHAR2(1000);
v_cancelled_amount      NUMBER;
v_cancelled_date        DATE;
v_last_update_date      DATE;
v_orig_prepay_amt       NUMBER;
v_pay_cur_inv_amt       NUMBER;
v_token                 VARCHAR2(100);
begin
v_boolean := AP_CANCEL_PKG.AP_CANCEL_SINGLE_INVOICE
            (p_invoice_id                 => P_xx_invoice_id,
             p_last_updated_by            => P_xx_last_updated_by,
             p_last_update_login          => P_xx_last_update_login,
             p_accounting_date            => P_xx_accounting_date,
             p_message_name               => v_message_name,
             p_invoice_amount             => v_invoice_amount,
             p_base_amount                => v_base_amount,
             p_temp_cancelled_amount      => v_temp_cancelled_amount,
             p_cancelled_by               => v_cancelled_by,
             p_cancelled_amount           => v_cancelled_amount,
             p_cancelled_date             => v_cancelled_date,
             p_last_update_date           => v_last_update_date,
             p_original_prepayment_amount => v_orig_prepay_amt,
             p_pay_curr_invoice_amount    => v_pay_cur_inv_amt,
             P_Token                      => v_token,
             p_calling_sequence           => NULL
             );

IF v_boolean
THEN
DBMS_OUTPUT.put_line ('Successfully Cancelled the Invoice' );
COMMIT;
ELSE
DBMS_OUTPUT.put_line ('Failed to Cancel the Invoice' );
ROLLBACK;
END;



Friday, April 25, 2014

FND Debug Log metalink notes


Wednesday, April 16, 2014

HRMS APIs with hard coded syntax

Click to add to FavoritesHardcoded HRMS API Examples (Doc ID 1505063.1)

Thursday, April 10, 2014

FNDLOAD for webadi in R12


Fndload scripts for WebAdi in R12

FNDLOAD apps/$apps 0 Y DOWNLOAD $BNE_TOP/patch/115/import/bneintegrator.lct XX_TEST_INTG.ldt BNE_INTEGRATORS INTEGRATOR_ASN="PER" INTEGRATOR_CODE=""

FNDLOAD apps/$apps 0 Y UPLOAD $BNE_TOP/patch/115/import/bneintegrator.lct XX_TEST_INTG.ldt



Update Custom WebADI:

 After moving the custom webadi’s from one instance to another instance, whenever you query for your integrator,update option is disabled for that particular custom Integrators.
 To get enabled ‘Update’ use the below query.

UPDATE bne_integrators_b
SET source  = 'C'
WHERE integrator_code IN ('INTEGRATOR_CODE');

Thursday, February 13, 2014

OADialogPage message in controller extension in oaf

The below code perform based on some condition and invokes warning message and user click OK button to proceed further

   if (oapagecontext.getParameter("paApply")!=null)
   {
String msg = " ";
MessageToken tkns[] = null;
msg = oapagecontext.getMessage("XX","XX_ADJ_MSG",tkns);
OAException message = new OAException(msg);
OADialogPage dialogPage = new OADialogPage(OAException.WARNING, message, null, "",null);
dialogPage.setOkButtonItemName("SaveYesButton");
dialogPage.setOkButtonToPost(true);
dialogPage.setOkButtonLabel("Ok");
oapagecontext.writeDiagnostics(this,"setPostToCallingPage: ",6);
dialogPage.setPostToCallingPage(true);
       oapagecontext.redirectToDialogPage(dialogPage);
    }

---Always add the handle as separate if condition
if (oapagecontext.getParameter("SaveYesButton")!=null)
{
System.out.println("Continue");
oapagecontext.writeDiagnostics(this,"Continue: ",6);
oapagecontext.writeDiagnostics(this,"paApply: "+oapagecontext.getParameter("paApply"),6);
oapagecontext.putParameter("paApply", new String("paApply"));
oapagecontext.writeDiagnostics(this,"paApply1: "+oapagecontext.getParameter("paApply"),6);
super.processFormRequest(oapagecontext, oawebbean);
}

Tuesday, January 14, 2014

REP-0300: ORACLE error occurred in oracle reports

If the below error occurs

REP-0300: ORACLE error occurred.
REP-0069: Internal error
REP-57054: In-process job terminated:Terminated with error: 
REP-300: ORACLE error occurred.

Answer:Please check the report parameter data types.It should be correct to overcome the issue.

Saturday, January 4, 2014

CE_RECONCILED_TRANSACTIONS_V returns no rows in R12

MO_GLOBAL.Init('SQLAP');
MO_GLOBAL.Set_Policy_Context('S', &l_org_id);
FND_GLOBAL.Apps_INITIALIZE (l_user_id, l_resp_id, l_resp_appl_id);
cep_standard.init_security;

See also: