Thursday, December 31, 2015

Deployment Steps for OA Framework on R 12.2.x or R 12.2.4


Steps to deploy custom OA Framework page on R 12.2.4

1) Copy class files on server
2) Create ZIP file
3) Make Jar file from the ZIP file created before
4) Bounce the services

1) Copy class files on server
==================================
Copy files to custom folder path on server.

2) To Make .ZIP file
==================================
A) Create a temporary custom.zip file which contains all the custom application's directories/files at non-standard location. Please follow the following steps:

    1) cd $JAVA_TOP

    2) zip -r customprod.zip. Where the list of all directory paths are present, relative to $JAVA_TOP, for custom application's java files at non-standard location.

    Command: zip -r xxtest.zip xxtest

    3) Generate & sign customprod.jar file.

    Command: adjava oracle.apps.ad.jri.adjmx -areas $JAVA_TOP/customprod.zip -outputFile $JAVA_TOP/customprod.jar -jar $CONTEXT_NAME 1 CUST jarsigner -storePass -keyPass

3) To Make .JAR file
==================================
example : adjava oracle.apps.ad.jri.adjmx -areas $JAVA_TOP/customprod.zip -outputFile $JAVA_TOP/customprod.jar -jar $CONTEXT_NAME 1 CUST jarsigner -storePass <KeyStore Password> -keyPass <Key Password>

Command:     adjava oracle.apps.ad.jri.adjmx -areas $JAVA_TOP/xxtest.zip -outputFile $JAVA_TOP/xxtest.jar -jar $CONTEXT_NAME 1 CUST jarsigner


4) Bounce the Apache and mid-tier service by using the following commands.
==================================
adapcctl.sh stop

adapcctl.sh start

admanagedsrvctl.sh stop oacore_server1

EnterWeblogic Password: <pwd>

admanagedsrvctl.sh start oacore_server1

EnterWeblogic Password: <pwd>

Wednesday, December 23, 2015

FNDLOAD for multi-language OR Multilingual

Some time we are facing situation where we have to move AOL objects in Oracle EBS Multilingual/Territory environment.
For example we want to move Lookups, Concurrent Programs, Messages etc with their translation also for Multilingual/Territory like English and Arabic.

In such scenario we have to download and upload LDTs for both languages.
Lets suppose we have to move Concurrent Program with both English and Arabic translations.

==============
DOWNLOAD
==============
Before downloading we have to set the export language style like,

For English           
-------------------------------------------------------------------------------
export NLS_LANG=AMERICAN_AMERICA.AR8MSWIN1256

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XXTST_CONCURRENT_PRG_US.ldt PROGRAM APPLICATION_SHORT_NAME="XXTST" CONCURRENT_PROGRAM_NAME="XXTST_CONCURRENT_PRG"

For Arabic           
-------------------------------------------------------------------------------
export NLS_LANG=ARABIC_AMERICA.AR8MSWIN1256

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XXTST_CONCURRENT_PRG_AR.ldt PROGRAM APPLICATION_SHORT_NAME="XXTST" CONCURRENT_PROGRAM_NAME="XXTST_CONCURRENT_PRG"

==============
UPLOAD
==============
Similarly for Upload LDTs we have to set the language style.

For English           
-------------------------------------------------------------------------------
set NLS_LANG=AMERICAN_AMERICA.AR8MSWIN1256

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XXTST_CONCURRENT_PRG_US.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE


For Arabic           
-------------------------------------------------------------------------------
set NLS_LANG=ARABIC_AMERICA.AR8MSWIN1256

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XXTST_CONCURRENT_PRG_AR.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE



Sunday, December 6, 2015

Download file from Server in OA Framework

To download a file from server location.

In controller class call downloadFileFromServer method on any event.

//on button click in process form request
//call this method
            downloadFileFromServer(
                        pageContext,--pagecontext
                        "/xx/xxx/ssss/120devg.pdf",--full file path with file name and ext
                        "120devg.pdf" --file name with extension
            );


After process form request copy below methods in controller class,

/**
* @param pageContext the current OA page context
* @param file_name_with_path - this is fully qualified file name with its path on unix application
* server. eg "/xxcrp/xxapplcrp/mukul/abc.pdf"
* @param file_name_with_ext - this is file name with extension, you wanna display user
* for download. eg- i wanna display the abc.pdf file download with name five_point_someone.pdf
* then I can pass this as "five_point_someone.pdf"
*/
public void downloadFileFromServer(OAPageContext pageContext,
                                  String file_name_with_path,
                                  String file_name_with_ext) {
  HttpServletResponse response = (HttpServletResponse) pageContext.getRenderingContext().getServletResponse();
  if (((file_name_with_path == null) || ("".equals(file_name_with_path)))){
    throw new OAException("File path is invalid.");
  }

  File fileToDownload = null;
  try{
    fileToDownload = new File(file_name_with_path);
  }catch (Exception e){
    throw new OAException("Invalid File Path or file does not exist.");
  }

  if (!fileToDownload.exists()){
    throw new OAException("File does not exist.");
  }

  if (!fileToDownload.canRead()){
    throw new OAException("Not Able to read the file.");
  }

  String fileType = "application/pdf";
  response.setContentType(fileType);
  response.setContentLength((int)fileToDownload.length());
  response.setHeader("Content-Disposition", "attachment; filename=\"" + file_name_with_ext + "\"");

  InputStream in = null;
  ServletOutputStream outs = null;

  try{
    outs = response.getOutputStream();
    in = new BufferedInputStream(new FileInputStream(fileToDownload));
    int ch;
    while ((ch = in.read()) != -1){
      outs.write(ch);
    }
  }catch (IOException e){
    // TODO
    e.printStackTrace();
  }finally{
    try{
      outs.flush();
      outs.close();
      if (in != null){
        in.close();
      }
    }catch (Exception e){
      e.printStackTrace();
    }
  }
}




Source: http://mukx.blogspot.com/search?q=downloadFileFromServer

Oracle E-Business Suite | How to deploy cutom JAR file and use in OA Framework

There are two ways to deploy custom JAR file on Server.

Deploying on Custom path.


Steps :
1. Deploy your JAR file at some custom location in R12 server
i.e. –
/u01/app/apnac03r12/XX_TEST/

2. Open “orion-application.xml” file present at path –
$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployments/oacore/

3. Edit “orion-application.xml” file to add JAR file path

i.e. –
<library path="/u01/app/apnac03r12/XX_TEST/jxl.jar" />


4. Bounce Apache Server




Deploying with Standard libraries.
 
Steps :
1. Place jxl.jar into

    $OA_HTML/WEB-INF/lib/


2. Bounce Apache Server








Thursday, October 22, 2015

PL/SQL How to set proxy to access URL



Below is script to set proxy from DB session in PL/SQL.


    BEGIN
      --
      UTL_HTTP.SET_PROXY('<IP Address>', NULL);
      UTL_HTTP.SET_PERSISTENT_CONN_SUPPORT(TRUE);
      --
    END;


Once proxy is set, you can check access for particular URL using below SQL statement,

select utl_http.request('<URL>')
  from dual;

Thursday, September 17, 2015

Oracle Application Framework | Create Popup window


How to add popup window in OA Framework.

1) Create Image bean on your page or region.
    Lets say you have created Image bean having id DetailsIMG

2) Create a page or region that you want to open as a popup.

3) Add following code in process request method of main page's controller.

 /** Opening the popup
      */
          OAImageBean img = (OAImageBean) webBean.findChildRecursive("DetailsIMG");
          String url = "/xxtst/oracle/apps/per/selfservice/job/webui/XxTstPG";
//          String Popupparams = "P_OrderNo={@OrderNo}&P_EmpCi={@EmpCi}";
        
//          String page = url + "&retainAM=Y&fndOAJSPinEmbeddedMode=y" + "&" + Popupparams;
          String page = url + "&retainAM=Y&fndOAJSPinEmbeddedMode=y";
          String destURL = OAWebBeanConstants.APPS_HTML_DIRECTORY + OAWebBeanConstants.APPLICATION_JSP + "?" + OAWebBeanConstants.JRAD_PAGE_URL_CONSTANT + "=" + page;
        
          OABoundValueEmbedURL jsBound = new OABoundValueEmbedURL(img, "openWindow(self, '", destURL, "' , 'longTipWin', {width:750, height:450}, true); return false;");
        
          img.setAttributeValue(OAWebBeanConstants.ON_CLICK_ATTR, jsBound);

4) To close the popup add link bean or button on popup page or region and add below code on Destination URI property.

javascript:opener.submitForm('DefaultFormName',0,{XXX:' abc'});window.close();

Note: You can pass parameters also to main page.




Tuesday, September 15, 2015

Usage of FNDLOAD for Oracle EBS AOL objects

Following are the usage list of FNDLOAD command to upload and download application objects.

Concurrent Program

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XXCUST_CP.ldt PROGRAM APPLICATION_SHORT_NAME="XXCUST" CONCURRENT_PROGRAM_NAME="XXCUST_CP"

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XXCUST_CP.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE

Lookups

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct XXCUST_LKP.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME="XXCUST" LOOKUP_TYPE="XXCUST_LKP"

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/aflvmlu.lct  XXCUST_LKP.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE

Messages

FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct XXCUST_MESG.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME="XXCUST" MESSAGE_NAME="XXCUST_MESG%"

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afmdmsg.lct XXCUST_MESG.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE

Request Set and Link

FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct XXCUST_RS.ldt REQ_SET REQUEST_SET_NAME='XXCUST_RS'

FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct XXCUST_LNK.ldt REQ_SET_LINKS REQUEST_SET_NAME='XXCUST_LNK'


FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct  XXCUST_RS.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct  XXCUST_LNK.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE

Form Function

FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct XXCUST_FUNC.ldt FUNCTION FUNC_APP_SHORT_NAME='XXCUST' FUNCTION_NAME='XXCUST_FUNC'

FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afsload.lct XXCUST_FUNC.ldt

Profile

FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct XXCUST_PROF.ldt PROFILE PROFILE_NAME="XXCUST_PROFILE" APPLICATION_SHORT_NAME="XXCUST"

FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct XXCUST_FUNC.ldt

Menu

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct XXCUST_MENU.ldt MENU MENU_NAME="XXCUST_MENU"

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afsload.lct XXCUST_MENU.ldt

Data Definition

FNDLOAD apps/apps 0 Y DOWNLOAD $XDO_TOP/patch/115/import/xdotmpl.lct XXCUST_DD.ldt XDO_DS_DEFINITIONS APPLICATION_SHORT_NAME=XXCUST DATA_SOURCE_CODE=XXCUST_DS

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afsload.lct XXCUST_DD.ldt