Oracle EBS: View Object (VO) Extension in OAF

http://chalet-location-toussuire.com/medved/614 Requirement

In an Oracle R12.1.3 upgrade, 11i Forms Personalization’s needs to be migrated or re-worked on R12 Forms or Oracle Application Framework Pages (OAF). Some personalization’s can be directly applied on R12 forms but some needs to be re-done on OAF pages.

This is one of the 11i Forms Personalization where a direct OAF Personalization is not possible and hence the Supplier Invoice Management Page has been extended to accommodate the custom functionality of enabling or disabling the Invoice Matching Option based on the presence of Supplier Site ‘ADMIN’ and custom override profile option XXORA_OVERRIDE_VENDOR_SITE_LOCK

rencontre ad hoc Navigation

(N) Payables Manager –> Suppliers –> Entry or Inquiry –> Query Supplier -> Update -> Click on Invoice Management Hyperlink -> find speed dating near me Invoice Match Option

Page Context: /oracle/apps/pos/supplier/webui/ByrInvPG

Standard View Object: oracle.apps.pos.supplier.server.VendorsVO (alias SupplierVO)

site de rencontre metisses gratuit Solution Overview

Oracle page and view object considered for VO extension are:

Page Context: /oracle/apps/pos/supplier/webui/ByrInvPG

View Object: oracle.apps.pos.supplier.server.VendorsVO (alias SupplerVO)

Create an Oracle Applications Workspace and Project configured for Oracle Applications

Create a custom View Object xxoraVendorsVO by extending standard VO VendorsVO available in the path oracle/apps/pos/supplier/server/VendorsVO

Add an additional attribute in the View Object SQL to determine if the Invoice Matching Option flag needs to be enabled or disabled

Create a new transient attribute of type Boolean, based on which the OAF page field ‘Invoice Matching Option’ is personalized to enable/disable the field.

Modify the custom VORowImpl.java file to return true or false based on the custom attribute in the View Object.

Transfer the .jpx file using jpximport utitlity to the target database

Transfer the .xml and .java files to middle tier $JAVA_TOP

Personalize the OAF Page Invoice Matching Option field using SPEL.

${oa.ViewObject.ViewAttribute}

i.e ${oa.xxoraVendorsVO.isInvMatchOptionReadOnly}

Disabling Invoice Matching Option

The Invoice matching Option on the Supplier Invoice Management page needs to be disabled based on the presence of supplier site ‘ADMIN’ and the custom profile option XXORA_OVERRIDE_VENDOR_SITE_LOCK is set to ‘N’.

Enabling Invoice Matching Option

The Invoice matching Option on the Supplier Invoice Management page needs to be enabled –

  1. If the supplier site code ‘ADMIN’ doesn’t exist.
  2. Supplier site code ‘ADMIN’ exists and profile option XXPSNL_OVERRIDE_VENDOR_SITE_LOCK is set to ‘Y’.

http://everythingsheltie.com/kolbasa/klepsiela/3051 Overview

Added the below additional attribute to extended View Object xxoraVendorsVO

 CASE
   WHEN (SELECT COUNT(1) FROM AP_SUPPLIER_SITES WHERE VENDOR_SITE_CODE = ‘ADMIN’ AND VENDOR_ID = pv.VENDOR_ID) > 0
    AND FND_PROFILE.VALUE(‘XXORA_OVERRIDE_VENDOR_SITE_LOCK’)=’N’
    THEN ‘Y’
   WHEN (SELECT COUNT(1) FROM AP_SUPPLIER_SITES WHERE VENDOR_SITE_CODE = ‘ADMIN’ AND VENDOR_ID = pv.VENDOR_ID) = 0
    THEN ‘N’
   ELSE ‘N’
END isInvMatchOptionReadOnlyStr 

why not look here Technical Steps

(I) Build the OA extension in JDeveloper

1. Create a new Project
Project Name: xxoraVendorsVO
Directory Name: C:\JDev1213\jdevhome\jdev\myprojects
Default Package: xxora.oracle.apps.pos.supplier

newproject

2. Creating a new View Object xxoraVendorsVO extending the standard View Object VendorsVO
Click on Next and Click Back to choose option ‘Updatable Access trhough Entity Objects’

3. Create two new attributes
a. isInvMatchOptionReadOnly, Boolean, Updateable Always
b. isInvMatchOptionReadOnlyStr, String, Updateable Always, Mapped to Column or SQL, Alias: isInvMatchOptionReadOnlyStr, Expression: isInvMatchOptionReadOnlyStr

4. Add the additional column to the existing SQL statement
CASE
WHEN (SELECT COUNT(1) FROM AP_SUPPLIER_SITES_ALL WHERE VENDOR_SITE_CODE = ‘ADMIN’ AND VENDOR_ID = pv.VENDOR_ID) > 0
AND FND_PROFILE.VALUE(‘XXORA_OVERRIDE_ADMIN_VENDOR_SITE_LOCK’)=’N’
THEN
‘Y’
WHEN (SELECT COUNT(1) FROM AP_SUPPLIER_SITES_ALL WHERE VENDOR_SITE_CODE = ‘ADMIN’ AND VENDOR_ID = pv.VENDOR_ID) = 0
THEN
‘N’
ELSE
‘N’
END isInvMatchOptionReadOnlyStr

5. Choose to Generate Java Class for xxoraVendorsVOImpl and xxoraVendorsVORowImpl

6. Click finish

7. Browse to the custom view ojbect and open properties to ensure the newly created view attributes are set correctly

8. Create a View Object Substitution so that the new/extended view xxoraVendorsVO replaces standard View Object VendorsVO

Open Project Properties –> Business Components –> Substitutions
Select the Standard VO from Available Objects
Select the Custom VO from Substitute Objects
Click on Add button
Click OK

9. Ensure the VO .xml, VOImpl and VORowImpl files are created.
C:\JDev1213\jdevhome\jdev\myprojects\xxora\oracle\apps\pos\supplier\server\
a. server.xml
b. xxoraVendorsVO.xml
c. xxoraVendorsVOImpl.java
d. xxoraVendorsVORowImpl.java

10. Modify function getisInvMatchOptionReadOnly in VORowImpl file to return Boolean true when getisInvMatchOptionReadOnlyStr is ‘Y’ otherwise Boolean false.

public String getisInvMatchOptionReadOnly() {
//return (String) getAttributeInternal(ISINVMATCHOPTIONREADONLY);
/* Added code for WGPSN R12 Upgrade, Ramananda (Version 1) */
if (“Y”.equals(getisInvMatchOptionReadOnlyStr())) {
setisInvMatchOptionReadOnly(Boolean.TRUE);
return Boolean.TRUE;
} else {
setisInvMatchOptionReadOnly(Boolean.FALSE); return Boolean.FALSE;
}
}

11. Rebuild the Project and Make

(II). Import OAF VO Extension into target instance
Deploy or FTP the files VO.xml, .class and .jpx files to $JAVA_TOP/xxora
$ cd <patch-top-level-directory>
$ cp xxoraVendorsVO.jpx $JAVA_TOP
$ cp *.xml *.java *.class $JAVA_TOP/xxora/oracle/apps/pos/supplier/server

(III) Upload Substitution to database

java oracle.jrad.tools.xml.importer.JPXImporter $JAVA_TOP/xxoraVendorsVO.jpx -username apps -password <apps_pwd> -dbconnection “(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=portno))(CONNECT_DATA=(SID=SID)))”
If applied successfully, returns message:-
Imported document : /oracle/apps/pos/supplier/server/customizations/site/0/VendorsVO
Import completed successfully

(IV). Bounce Apache

(V). Personalize page to enable/disable items.

The read-only property of ‘Invoice Match Option’ field is set to ${oa.SupplierVO.isInvMatchOptionReadOnly}
/oracle/apps/pos/supplier/webui/ByrInvPG

personalize

spel

Leave a Reply

Your email address will not be published. Required fields are marked *