Oracle Order Management Cloud — Extensions

Manikkavel N
2 min readMay 31, 2021

--

In this post, we will see how to find the PVO for Item Extensible Flexfields(EFF) in Order Management Extension rules.

As we all know Oracle has published the PVO (Public View Object) in Oracle Support FA: SCM: OM: Order Management Extensions: Public View Objects (PVO) Used in Groovy Code (Doc ID 2389833.1)

The above note is for all Oracle standard objects such as CustomerPVO, ItemPVO etc., which spans across all the objects that can be accessed in SCM, CRM, HR and Finance.

Follow the below naviation to retrieve the Item EFF PVO. Login into Oracle Applications > Setup and Maintenance > Manage Extensible Flexfields, search for Name = Item Extended Attributes and Download Flexfield Archive.

Wait for the processing to complete. Once done, Click download and save the zip file in local folder in your desktop. Unzip the file and navigate to folder: oracle\apps\scm\productCatalogManagement\advancedItems\publicFlex\egoItemEff\item\contexts\view. This will list PVOs for all the Item EFF Contexts.

You will need to match the Item EFF context code to get the desired PVO. For example, if your EFF context code is “Additional Attributes”, then PVO will be in this format: ItemEFFB<Concatenate of Context code with space separated by _>PublicVO. In this example PVO is “ItemEFFBAdditional__AttributesPublicVO”, now for invoking this in Order Management Groovy you will need to provide the complete path: oracle.apps.scm.productCatalogManagement.advancedItems.publicFlex.egoItemEff.item.contexts.view.ItemEFFBAdditional__AttributesPublicVO

The required view attribute name can be derived from the ItemEFFBAdditional__AttributesPublicVO.XML, the view attribute name will be the API name of the segment.

Sample code:

import oracle.apps.scm.doo.common.extensions.ValidationException;
import oracle.apps.scm.doo.common.extensions.Message;

def lines = header.getAttribute(“Lines”);

while( lines.hasNext() ) {
def line = lines.next();

def inventoryItemId = line.getAttribute(“ProductIdentifier”);
def orgId = line.getAttribute(“InventoryOrganizationIdentifier”);

def itemPVO = context.getViewObject(“oracle.apps.scm.productCatalogManagement.advancedItems.publicFlex.egoItemEff.item.contexts.view.ItemEFFBAdditional__AttributesPublicVO”);
def vc = itemPVO.createViewCriteria();
def vcrow = vc.createViewCriteriaRow();
vcrow.setAttribute(“InventoryItemId”, inventoryItemId);
vcrow.setAttribute(“OrganizationId”, orgId);
def rowset = itemPVO.findByViewCriteria(vc, -1);
def item = rowset.first();

itemData = item?.getAttribute(“erpSystem”);

line.setAttribute(“ShippingInstructions”,itemData);

}

--

--