Monthly Archives: July 2015

Oracle EBS: View Object (VO) Extension in OAF

comment flirter avec un homme timide 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

que dire sur site de rencontre Navigation

(N) Payables Manager –> Suppliers –> Entry or Inquiry –> Query Supplier -> Update -> Click on Invoice Management Hyperlink -> site de rencontre my love Invoice Match Option

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

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

https://www.ronnipedersen.com/ypysti/8936 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’.

hombre con un solo ojo 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 

rencontre kuwait 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

WebLogic Server : Security Roles

A security role is a privilege granted to users based on specific conditions, and these are computed and granted to users and groups dynamically based on the conditions .

There are two types of security roles in WebLogic server
Global roles : Applies to all WebLogic resources deployed within a security realm
Scoped roles : Applies to a specific instance of WebLogic resource with in security realm

The roles can be combined when creating a security policy for WebLogic resource.

Here is a scenario, where we have to deploy more than one application to the same WebLogic container. How does security roles can be defined here, when the security is set on JavaEE level and the on the deployed applications ?

We can define global roles on the WebLogic domain level here,
But why not scoped roles? As we already learnt, scoped roles are defined for specific instance level of WebLogic resource (such as a method on an EJB).

Global roles can used in any security policy, Oracle provides default global roles that can be used out of box to secure WebLogic Resource.

Just to note, we cannot setup security policies or roles for auto-deployed applications.

We have several default global roles provided by Oracle such as Anonymous, Admin, Deployer, Operator, Monitor & AppTester. We can learn in later post how they work, their scope and default group assignments.