Pages

Recently Viewed

Sunday, August 7, 2011

OAF Page Customization

First the basic difference between personalization and customization !
Personalization is oracle provided flexibility to change standard behavior as personal need. using personalization we do not require to write any custom code.while Customization is process to write custom code to fulfill our need.

Below are the 3 basic components of OAF pages.
1) View Object (VO) ,
2) Controler (CO) and
3) Application Module (AM)  , components in  MVC architecture.    

in OAF Customization we need to write custom code for any of the above 3 based on the requirement.

Now checkout the existing CO or AM name (From About this page at the left below of each html page) and download the class file then ftp to your local system.

(assume QuickUpdateCO.java is standard file)

use any decompiler and get the source java code and follow below steps -
1) Rename the standard CO/AM (QuickUpdateCO.java) with custom name XXXXXQuickUpdateCO.java
2) extend the standard CO/AM
3) import the standard package
4) define constructor for the custom program
5) define the package name (location where code resides)

package xxxxx.oracle.apps.pos.supplier.webui;
import oracle.apps.pos,suppliers.webui.QuickUpdateCO.java;
XXXXXQuickUpdateCO.java extends QuickUpdateCO.java;
{
XXXXXQuickUpdateCO{};
ProcessRequest(){
super();
};
ProcessFormRequest{
super();
};


6) Write code in processRequest (if customization need to be invoked on page display) or in processFormRequest (if customization required on any event on the page).
7)FTP the new java code and compile using javac XXXXXQuickUpdateCO.java
8)Place the class file at xxxxx.oracle.apps.pos.supplier.webui (package defined at top of CO)

CO -:
a) Click on personalization link
b) Click on pencil button against page layout property
c) Give the new controller name along with package name at the desired level 
d) Tab out and apply

VO/AM-:
Oracle does not provide option to extend the VO and AM using personalization.Though there is concept of SUBSTITUTION which is being used to extend the standard VO and AM.
You can use JDeveloper to generate the substitution and then import substitution using  jpximport .

Sunday, March 13, 2011

OAF Personalization & Migration

1)      OAF bean Personalization –
Objective – Make OAF bean read only through personalization
Bean Name – Search Published Negotiations available on Sourcing Page
1)      Open the page where personalization is required and Click on Personalize Page link available on right top of the page


2)      Check for the target bean and click the pencil symbol
 
3)      Check for the read only property 
4)       Set the property value for Read Only = TRUE at Responsibility level and press apply button.
5)      Return to Application and check the personalized bean 

1)      2) Migration of OAF Personalization –
Responsibility Purchasing Super User –
1)      Personalized the header detail of supplier page to make fields read only


2)      Check the personalization from back end
BEGIN
JDR_UTILS.LISTCUSTOMIZATIONS('/oracle/apps/pos/supplier/webui/QuickUpdatePG');
END;
/

/oracle/apps/pos/supplier/webui/customizations/responsibility/2007/QuickUpdatePG

** 2007 – Responsibility ID

3)      Check the xml code generated by system for personalization
BEGIN
JDR_UTILS.PRINTDOCUMENT('/oracle/apps/pos/supplier/webui/customizations/responsibility/2007/QuickUpdatePG');
END;

     <?xml version='1.0' encoding='UTF-8'?>
<customization xmlns="http://xmlns.oracle.com/jrad" version="9.0.6.0.0_35" xml:lang="en-US" customizes="/oracle/apps/pos/supplier/webui/QuickUpdatePG">
   <modifications>
      <modify element="SupplierName" readOnly="true"/>
 
</modifications>
</customization>

4)      Save the above xml code as QuickUpdatePG.xml
5)      Create the below files structure at your local disk and place the QuickUpdatePG.xml in 2007/
     xxXXX/oracle/apps/pos/supplier/webui/customizations/responsibility/2007/

6)      Create another folder under responsibility named 2008 for responsibility Payables Manager and place the QuickUpdatePG.xml
   xxXXX/oracle/apps/pos/supplier/webui/customizations/responsibility/2008/

7)      Zip the xxXXX folder to xxXXX.zip
8)      Place the xxXXX.zip file and install script (XXXXX_OAF_PERS_RESP_LEVEL.sh) to unix box
9)      Execute script - XXXXX_OAF_PERS_RESP_LEVEL.sh with following parameters
1)      APPS username
2)      APPS pwd
3)      DB IP Address – Host Name
4)      DB Port Number
5)      DB SID
6)      Responsibility Id – Target Responsibility Id
7)      Log File Name


POST Successful execution of Install script -

Responsibility XXX Co Payables Manager –

10)   Check the personalization from back end
BEGIN
JDR_UTILS.LISTCUSTOMIZATIONS('/oracle/apps/pos/supplier/webui/QuickUpdatePG');
END;
/

/oracle/apps/pos/supplier/webui/customizations/responsibility/2007/QuickUpdatePG
/oracle/apps/pos/supplier/webui/customizations/responsibility/2008/QuickUpdatePG


** 2008– Responsibility ID for XXX Co Payables Manager


11)   Check the xml code generated by system for personalization
BEGIN
JDR_UTILS.PRINTDOCUMENT('/oracle/apps/pos/supplier/webui/customizations/responsibility/2008/QuickUpdatePG');
END;

<?xml version='1.0' encoding='UTF-8'?>
<customization xmlns="http://xmlns.oracle.com/jrad" version="9.0.6.0.0_35" xml:lang="en-US" customizes="/oracle/apps/pos/supplier/webui/QuickUpdatePG">
   <modifications>
      <modify element="SupplierName" readOnly="true"/>
     
</modifications>
</customization>

12)   Sometime personalization does not reflect immediate to the target responsibility. Please
Logout and login again to application. Open the Page, click on personalization link.
Click on pencil symbol for any personalized item check the field value and press apply. 


1)    3) OA Personalization using Functional Administrator Responsibility

a)      Login to Application
b)      Select Functional Administrator Responsibility
c)       Click the Personalization Tab then Application Catalog
d)      Give the complete path with page name in Document Path field and press Go

e)      If there exist any personalization It has Personalized = Yes otherwise No.
f)       To do any personalization on this page click the pencil icon on Personalize Page, It will navigate you to same page as you click on personalization link on this page
g)      Using Manage Personalization pencil icon, you can delete or activate/deactivate the existing personalization.

Import Export of OA Personalization –
1)      Set the path to profile FND: Personalization Document Root Path (path where the exported personalization will reside)
2)      Click on Import/Export link followed by Personalization Repository link
3)      Search for your personalization and select those need to be exported
4)      Click Export To File System button
5)      Personalized file ( with xml extn) with full repository structure exported to given path

6)      To import the existing personalization place the xml file with complete file structure to the root path defined
7)      For single file import select the check box or directly check the root path for all files and click Import From File System.

SQL Script to Delete Personalization –

Begin
jdr_utils.deletedocument(p_document=>'/oracle/apps/pos/supplier/webui/customizations/site/0/QuickUpdatePG');
END;
/















XML Publisher - A Beginning ....

Basic steps to create BI Reports - 
1) Create the simple oracle report (rdf file) 
2) create concurrent program with executable as oracle report
3) set the output format as XML
4) run the program. output report will generate the xml tags
5) Now create Data Definition with code as concurrent program name in xml publisher admin(R)
6) create the rtf template (in word/excel/pdf)
7) use can xml tags generated in step 3 as data source to validate the output in rtf template
8) create the template with default output format and associate with created data definition and   attach the rtf file.  now run the concurrent program output will be in the specified format.






Better Coding Practice - To Capture log messages

Once the code in production and stuck with some issue.tough to debug.So the best practice to write custom programs is -
1) Create a profile with default value 'N'
2) Put debug statement based on profile value
       IF fnd_profile.value('Custom Profile') = 'Y' THEN
           Interface - FND_FILE.PUT_LINE(FND_FILE.LOG,'Debug Level 1' );  
           Reports -  SRW.MESSAGE(1,'Debug Level 1')     
      END IF;
3) Run interface by setting the profile value 'Y'