Our business requirement is to add ‘Voucher Number’, ‘Invoice Pay Group’ and ‘Pay Alone Flag’ on the seeded ‘Invoice Approval Notification’ page.
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.
Now, click on ApInvoiceHeaderVO which is an EO based [ApInvoicesAllEO] to check whether it has the additional attributes that need to be added
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 :
User Name:
Password:
Application Short Name: < Application_Short_Name >
Responsibility Key:
Now right click on AOAInvNotifEx project to open project properties –>Project Content –>Add to include the standard VO package in current project.
After adding BC4J package i.e. oracle.apps.ap the project looks like
Creating New View Object (VO): -
Right click on your project and select New–>Adf business Components–>View Object
Give the package name as ‘aoa.oracle.apps.ap.invoice.request.negotiation.server’, VO name as ‘AOAApInvoiceHeaderVOEx’ and in the extends property select ‘ApInvoiceHeaderVO’
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.
Note 1: On adding the first field we receive the following message:
Click on ‘OK’ and continue adding the remaining fields.
Note 2: The new attribute you would be adding will be ‘Transient‘
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).
Modify your sql statement to add new created attributes
Click on next – >Next
Generate RowImpl and click on finish
Now verify that the newly created attributes are not transient:
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
(Run the above command from ‘Command Prompt’)
Personalize the page to create new items:-
On InvPoReqNegoPG, click on personalize page –> complete view –> Expand All, and click on Create Item on Message Component Layout: (region4)
Set the item style as messageStyledText. Give the id, CSS Class, prompt , View Instance and View Attribute.
Create two items for ‘Pay Group Lookup Code’ and ‘Exclusive Payment Flag’ following the above steps.
Click on Apply -> return to application. You can notice that the page has the three columns.
















