Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 14 Oracle Analytics Lounge
- 211 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 78 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
How to use the Order Management Extension to retrieve attribute information using Standard Lookup?

We need to retrieve attribute information using standard lookup, but there are errors occurring during the retrieval process.
Code:
import oracle.apps.scm.doo.common.extensions.ValidationException;
TransactionTypeCode = header.getAttribute("TransactionTypeCode");
BuyingPartyNumber = header.getAttribute("BuyingPartyNumber");
def lines = header.getAttribute("Lines");
while( lines.hasNext() ) {
def line = lines.next();
def itemNumber = line.getAttribute("ProductNumber");
}
def rules = getStandardLookupDetails("XXXXX_PRETRANSFORMATION_RULES");
while (rules.hasNext()) {
def rules_row = rules.next();
throw new ValidationException("Unable to fetch Item Types from Lookup " + rules_row.getAttribute("AttributeChar1"));
}
Object getStandardLookupDetails(String lookupType) {
def lookupPVO = context.getViewObject("oracle.apps.fnd.applcore.lookups.model.publicView.LookupPVO");
def vc = lookupPVO.createViewCriteria();
def vcrow = vc.createViewCriteriaRow();
vcrow.setAttribute("LookupType", lookupType);
vc.add(vcrow);
def rowset = lookupPVO.findByViewCriteria(vc, -1);
if (!rowset.hasNext()) {
throw new ValidationException("Unable to fetch Item Types from Lookup " + lookupType);
}
return rowset;
}
Answers
-
Hi Yash,
I have a same requirement did you find any pvo for standard lookups that stores dff values.
Thanks,
Bhavani
0 -
Hi Team,
I have also same requirement to get the DFF value present on standard lookup.
I could not find any PVO which keep information of DFF.
PVO: oracle.apps.fnd.applcore.lookups.model.publicView.LookupPVO was used to get the description , lookup code, tag data but for DFF, there is no field defined in this PVO.
Please help.
0 -
Use Below Code to get DFF values
def rules =getCommonLookupDFF("ComonLookupType" ,"CommonLookupCode");
while (rules.hasNext())
{
def rules_row = rules.next();def attribute1= rules_row.getAttribute("Attribute1");
}
//————————Lookup Defination
Object getCommonLookupDFF(String LookupType , String LookupCode)
{
def lookupPVO = context.getViewObject("oracle.apps.fnd.applcore.lookups.model.publicView.CommonLookupPVO");
def vc = lookupPVO.createViewCriteria();
def vcrow = vc.createViewCriteriaRow();
vcrow.setAttribute("LookupType", LookupType);
vcrow.setAttribute("LookupCode", LookupCode);
vc.add(vcrow);
def rowset = lookupPVO.findByViewCriteria(vc, -1);
if (!rowset.hasNext())
{
throw new ValidationException("Common Lookup Error , Unable to fetch Item Types from Lookup :" + lookupType);
}return rowset;
}0 -
Just one comment, CommonLookupPVO does not contain the same lookup types as LookupPVO, e.g I defined many attributes for sales order type lookup ORA_DOO_ORDER_TYPES and when I use this value as LookupType in the function getCommonLookupDFF, the following error arises:
On Save event couldn't be completed. oracle.jbo.JboException: JBO-29000: Unexpected exception caught: groovy.lang.MissingPropertyException, msg=No such property: lookupType
Regards,
Rasto
0