Wednesday, 3 July 2019

Find all Attributes of a OAF Page

 package oracle.apps.iby.fundcapture.setup.components.webui;
 import oracle.apps.fnd.framework.webui.OAPageContext;
 import oracle.apps.fnd.framework.OAApplicationModule;
 import java.util.Enumeration;
 import oracle.jdbc.OracleCallableStatement;
 import oracle.apps.fnd.framework.OAException;
 import oracle.apps.fnd.framework.server.OADBTransaction;

  public class xx_CreateExtBankAcctCO extends CreateExtBankAcctCO {
    public xx_CreateExtBankAcctCO() {
    }
public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
        super.processRequest(pageContext, webBean);
     }
     public void processFormRequest(OAPageContext pageContext,
                                   OAWebBean webBean)
{
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule oaapplicationmodule1 = pageContext.getApplicationModule(webBean);  
//  Main code Start from here
Enumeration enums = pageContext.getParameterNames();
            while(enums.hasMoreElements()){
               String paramName = enums.nextElement().toString();
               String s10 = "Param name: " +paramName+ "  <=>  Value: "+pageContext.getParameter(paramName);
   OADBTransaction txn = oaapplicationmodule1.getOADBTransaction();
               OracleCallableStatement  cs1 = (OracleCallableStatement)txn.createCallableStatement("begin xx_debug_proc(:1); end;",1);
               try
         {
                   cs1.setString(1, s10);
                   cs1.execute();
                   cs1.close();
                 }
               catch (Exception e1)
                 {
                   throw OAException.wrapperException(e1);
                 }
        // End here.
}
}
  }

Procedure XX_DEBUG_PROC:
   
     CREATE OR REPLACE PROCEDURE xx_debug_proc (p_msg VARCHAR2)
     IS
       PRAGMA AUTONOMOUS_TRANSACTION;
       BEGIN
          INSERT INTO xx_debug_tbl
  VALUES(FND_LOG_MESSAGES_S.nextval, p_msg);
  COMMIT;
       EXCEPTION
       WHEN OTHERS THEN
        ROLLBACK;
       END;

Table XX_DEBUG_TBL:
       CREATE TABLE xx_debug_tbl (SEQ_NUM NUMBER, DEBUG_MSG VARCHAR2(250));
  

Sunday, 3 March 2019

"Exception Name: java.lang.ArrayIndexOutOfBoundsException - 1" While uploading the GL Daily Rates Integrator

Symptoms:
When trying to upload GL Daily Rates Integrator, the following error occurs.

Error:
Exception Name: java.lang.ArrayIndexOutOfBoundsException - 1

Log File Bookmark: 786581

Steps:
1. Login the application.
2. Navigate to R) General Ledger Superuser > Setup > Currencies > Currency Rates Manager >Daily Rates.
3. Click on Create in Spreadsheet button.

Cause:
Excel 2003 is not available in WEB ADI viewer LOV.

Solution:
1. Login the application.
2. Navigate to R) System Administrator > Application > Function
3. Search the function with "GL_CRM_DR_WEBADI_CREATE" (Daily Rates Web-ADI Spreadsheet).
4. Go to Web HTML tab and change the viewer value from EXCEL2003 to EXCEL2007.
5. Save the function and re-test the issue.

Previous HTML Call Value:
BneApplicationService?bne:page=BneCreateDoc&bne:reporting=N&bne:integrator=SQLGL:GL_DAILY_RATES&bne:layout=SQLGL:GL_DAILY_RATES_ORIGINAL&bne:content=GL_DR_NONE&bne:viewer=EXCEL2003&bne:noreview=anything

Changed HTML Call Value:
BneApplicationService?bne:page=BneCreateDoc&bne:reporting=N&bne:integrator=SQLGL:GL_DAILY_RATES&bne:layout=SQLGL:GL_DAILY_RATES_ORIGINAL&bne:content=GL_DR_NONE&bne:viewer=EXCEL2007&bne:noreview=anything