Extensions in OAF

  • Share this blog:

In this lesson we will see the different types of extensions in OAF (Oracle Apps Framework). We use extensions if we want to do any changes in the already shipped oracle E-Business suite. The main purpose we use extensions is to make changes in the already well designed Oracle E-Business suite pages. We have two types of extensions

  1. BC4J Extensions
  2. CO Extension

BC4J Extensions are again divide into three types and they are:  

  • VO Extension
  • AM Extension
  • EO Extension

  You can see in the further chapters how to create extensions in OAF and how the extensions will make changes in OAF. Slide1 The below image shows the Register Supplier User OAF page which will appear once we select Register Supplier User option as discussed. Slide2 When we click on  the Supplier Name search option (LOV) in the above page we will see Supplier Name and Supplier Number. So therefore our task is to add Vendor Lookup Code additional column in the search list. Using Customization we can add a column but we cannot carry data to that created column so therefore we need to go for extension if we want to carry data along with Supplier Name and Supplier Number. Hence we have to go for extension let us see how to extent and here the requirement is just to carry data and display it so therefore we know that using VO we can achieve it and hence no need to perform any DML operation like INSERT,UPDATE, DELETE. Let us see the requirement step wise: Step 1: Identify the VO from the page. It means first we need to identify which VO to be extend. Go to about this page and expand the “Business Component Reference Details”. For reference look at the below image: Slide3 After that select VendorsVO as we know that supplier called as Vendors  and their information stores in PO_VENDORS table. According to the naming convention VO ends with VO after name we can identify. Slide4 Click on the VendorsVO so that we can see the query statement used for that VendorsVO, the below image shows the query of vendorsVO which is used in Register Supplier User OAF page. Slide5 Step 2: Identify the page and copy or download it from Application Top. Note that all the Pages and Regions will be there in Application Top and all the Controller (CO), Application Module (AM), View Object (VO) will be there in Java Top. We can identify the page when we click on About this page, we can find one path which contains page name. Below image shows the page in Server Application Top, from that we need to copy the file. Slide6 From the above Application Top we need to copy the “RegSuppUserPG.xml” page, note that the path may be different in your environment so check the path properly or concern the DBA for your required file to copy. After copying the file move it to any existing project of OAF in desktop system for example see the below image it was moved into the following location in Desktop. Note that we need to paste the page in Webui of JDeveloper. Slide7 After copying open the JDeveloper so that we can see the copied page if JDeveloper is already open then refresh the JDeveloper so that the page will appear automatically. Select the page and we can see VO Name in the page structure. For reference look at the below image:- Slide8 Here in the above page structure we can identify that VO name is RegistrationVO but for Supplier Name we can see that Oracle OAF standard page used External VO hence we need to carry the External VO too from the server. The below image shows the finding process of External VO in the original page structure. Slide9 Now we can observe that the external LOV name is SupplierLOVRN, copy the SupplierLOVRN.xml file and paste it in the same location where we pasted the Register Supplier page. Refresh the JDevelper so that we can see the External LOV. Now in the external LOV we can identify the Exact VO which we need to extend to achieve our requirement. The below image shows the finding process of exact VO from the External VO. Slide10 Step 3: Now finally after finding the exact VO download the VO from the Java Top and create the directory structure whatever the VO had in myProjects of desktop JDeveloper folder. Note that the following image shows the pos directory in Apps server is copying to apps folder in Desktop JDeveloper, here if we are copying from oracle on wards then the JDevelper will take heavy time for further process, and hence we need to download only the required things from the Server. The below image screenshot is of WinSCP tool. Slide11 The below is image shows after copying and creating the same directory structure it looks like the following. Slide12 Step 4: After creating the directory structure now create one dummy workspace and Project in JDeveloper for VOExtension. And in the project creation process in step1 the default package name must be same as the path which we found in About this page. But here we need to remove the slash (/) symbol and in that place we have to keep dots (.), for reference have a look into the below image. Slide13 After creating project check that in applications “oracle.apps.pos” structure is available if you didn’t find that package then open the project properties, select Project Content. Slide14 Click on Add button and select the proper directory structure. Select it and click on Ok now check that the Oracle.apps.pos package will appear. Slide15 Step 5:Copy the SQL Query from the VendorsVO and modify the Query in Toad or SQL Developer Tool or if any other and save the query and keep it aside. In query add the column name “vendor_type_lookup_code”. The modified SQL Query is shown below: SELECT * FROM (Select vendor_id, vendor_name, segment1, vendor_type_lookup_code               from PO_VENDORS where enabled_flag = 'Y'               and ( START_DATE_ACTIVE is null OR START_DATE_ACTIVE < SYSDATE )                 and ( END_DATE_ACTIVE is null OR END_DATE_ACTIVE > SYSDATE )               and (vendor_type_lookup_code is null or vendor_type_lookup_code <> 'EMPLOYEE')) QRSLT        ORDER BY upper(vendor_name) Step 6: Now create the New VO in custom directory. Extract the Package select Registration right click on it and then select New View Object… For reference look into the below image. Slide16 Some times while creating VO JDeveloper may show some dialogue box errors that required “so and so” file not found in the “package”, we can ignore these kind of messages click on OK but we must be very cautious about the missing files may be which are must required for our extension process. The below image shows the package name specification process. Slide17 After that in the extends part click on the Browse button and then select the Original VO name that we can find in the directory structure which we copied and created same as it is in the server. Slide18 The below sample image shows After selecting the Extends VO. Slide19 After clicking next to the query remove the existing SQL Query and place the modified SQL Query in which we added a coloumn “vendor_type_lookup_code” and finish the VO creation process. Step 7: Now we need to substitute the new VO with the existing VO for that select Tools  -> Project Properties, for reference look into the below image. Extract the Business Components, select Substitutions and then Select the proper VO from the available list and in Substitute list, for example as shown in the below image: Slide20 After adding into the project properties now we need to move the project folder from MyClasses to the server environment Classes Directory. Be cautious while moving the files from desktop to the server. Here no need to replace the existing files at all for the first time. Below figure shows the moving process from the desktop to the server.Slide21 After that run the jpxImport script, the below one is the sample JPXImport script.

java oracle.jrad.tools.xml.importer.JPXImporter $JAVA_TOP/xxvoextension/VOExtensionPrj.jpx -username apps -password apps -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host =www.newtonapples.com)(port = 1521))) (connect_data = (service_name = naora1)))"

After successfully running import script, now go to Functional Administrator, click on Core Service Tab and then select Caching Framwork -> Click on Clear All Cache button. We can even click on Clear All Statistics button if we want. The below image shows the functional administrator page. Slide22 After that check whether the Extended VO is available or not in the About this page once the extended VO appears then now click on the LOV option of Supplier Name. Click on “Personalize Supplier Table”. After clicking on it create one item and select level as site and item type as Message Styled Text. We need to create one item because we modified VO and we added column to the VO but we not yet displayed it in OAF page so to display it in OAF page we need to create one item. Here in View Instance we need to give the old VO name rather than the new VO name. For view attribute give the attribute name which is generated when we click on the Next button after modifying VO we will find the attribute name for Vendor_type_lookup_code that name we need to give here. Slide23 Save the newly created item and now again click on the Supplier name so there fore here we go and we can find the Vendor Lookup Code which we created.Slide24 So therefore finally we finished the VO Extension process in OAF. Slide25 Check out our Popular Trainings  Structure of OAF Advantages and Dis-Advantages of OAF OBIEE Training in Hyderabad Creating First OAF Page in Project

You liked the article?

Like : 0

Vote for difficulty

Current difficulty (Avg): Medium

Recommended Courses


About Author
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.