OAF View Object Extension
Analyzing the Page
click on “About this Page” link to check , which View Object is associated with the message component layout [region4]
Here we can see that message component layout (region 4) has ApInvoiceHeaderVO attached to it. Now click on ‘Business Component References details’ and check the path of ApInvoiceHeaderVO.
Here we can see that our VO does not have the attributes – ‘Voucher Number’, ‘Invoice Pay Group’ and ‘Pay Alone Flag’.
So for adding these attribute we need to perform VO Extension.
Now FTP the complete solution package (i.e. oracle.apps.ap) from Application server into myprojects\oracle\apps\ folder.
Open Jdeveloper and create a new OA workspace and project. (Enter the following at each step of the Oracle Application Project Wizard):
Step1: Name workspace as AOAInvNotifEx.jws and the project as AOAInvNotifEx.jpr.
Step2: Check the box for ‘Use Repository for Design Time’ and select the Database connection in use.
Step3: Provide the necessary details:
DBC File Name : <DBC file location>
User Name: <Application – User Name>
Password: <Application- Password>
Application Short Name: < Application_Short_Name >
Responsibility Key: <This is unique for the Application Short Name Entered>
Creating New View Object (VO): –
The next screen allows the addition or deletion of Entity Objects. No change is required here for this extension so simply select ‘Next’.
The next pane allows additional attributes to be added or attributes to be removed. In this case add ‘Voucher Num’, ‘Pay Group Lookup Code’ and ‘Exclusive Payment Flag’ attributes to the selected list.
Click on ‘OK’ and continue adding the remaining fields.
Click on Next
Since our attributes are created as Transient, to fix this issue follow the below steps:
At step 4 of the VO creation Wizard:
Select the newly added attribute – ‘VoucherNum’
Check the box: Mapped to column or SQL
Provide the alias name in the ‘Expression’ field.
(Repeat the above steps for the attributes – ‘Pay Group Lookup Code’ and ‘Exclusive Payment Flag’ as well).
Add the new VO (AOAExApInvoiceHeaderVO) to the main Application Module (The AM to which the parent VO (ApInvoiceHeaderVO) has been attached). Also Rename the instance name from ‘AOAExApInvoiceHeaderVO1’ to ‘AOAExApInvoiceHeaderVO’.
Substitute Your New VO for the Parent VO
Now we need to perform the VO substitution For this we will right click on AOAInvNotifEx project and open project properties–>Business Components–>Substitutions.
Select the ‘ApInvoiceHeaderVO’ in ‘Available’ and ‘AOAExApInvoiceHeaderVO’ in ‘Substitute’ list and click on Add button and then press Ok button.
FTP VO.xml, .class, and the AM.xml, .class files to the respective directories in $JAVA_TOP
(note: FTP the .java files of the VO and AM and compile the files on the server using the ‘javac’ command if the .java file do not compile successfully on ‘JDeveloper’).
Now Import the ‘Substitution’ from the local machine using the following command:
jpximport C:\JDeveloper\jdevhome\jdev\myprojects\ AOAInvNotifEx.jpx -username <user name> -password <password> -dbconnection “(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<host>)(PORT=<port number>))(CONNECT_DATA=(SID=<SID>)))”
(Run the above command from ‘Command Prompt’)
Personalize the page to create new items:-