Hello,
Achieving Dependent LOV in Oracle Web ADI is quite tedious task. But don't worry, I am sharing the steps to create one.
You must know basics of Oracle Web-ADI before trying below steps.
Dependent LOV in Oracle Web ADI is created by writing 3 Java Classes as,
1)SQL Class
2)Validator Class
3)Component Class
The Java Source Code of these classes is present below,
Scenario-
Consider we have two columns in Web-ADI,
1)Supplier
2)Supplier Site
We want to show only Supplier Sites of selected Supplier, i.e., we want to filter Supplier Sites as per the Supplier selection.
We will create Supplier as static LOV.We can also create Supplier as static pop-list.
The steps are as below,
(1)Create Web-ADI containing Supplier and Supplier Site as plain enterable columns, i.e., on which LOV is not set yet.
(2)Create Static LOV (Table LOV) for Supplier using following API,
begin
BNE_INTEGRATOR_UTILS.CREATE_TABLE_LOV
(P_APPLICATION_ID => 200,
P_INTERFACE_CODE => 'GENERAL_1_INTF', --BNE_INTERFACE_COLS_B.INTERFACE_CODE
P_INTERFACE_COL_NAME => 'P_SUP', --BNE_INTERFACE_COLS_B.INTERFACE_COL_NAME
P_ID_COL => 'SEGMENT1',
P_MEAN_COL => 'VENDOR_NAME',
P_DESC_COL =>NULL,
P_TABLE => 'AP_SUPPLIERS',
P_ADDL_W_C => null,
P_WINDOW_CAPTION => 'Suppliers',
P_WINDOW_WIDTH => 400,
P_WINDOW_HEIGHT => 300,
P_TABLE_BLOCK_SIZE => 10,
P_TABLE_SORT_ORDER => 'ascending',
P_USER_ID => -1
,P_TABLE_COLUMNS =>NULL,
P_TABLE_SELECT_COLUMNS =>NULL,
P_TABLE_COLUMN_ALIAS =>NULL,
P_TABLE_HEADERS =>NULL,
P_POPLIST_FLAG =>'N'
);
commit;
end;
(3)Copy below 3 java files to JAVA_TOP and compile in given order only
a)SagarSupplierSiteNameSQL.java-below is source code
package sagar.oracle.apps.lovtest.sql;
import java.sql.Connection;
import java.sql.SQLException;
import oracle.apps.bne.exception.BneException;
import oracle.apps.bne.framework.BneWebAppsContext;
import oracle.apps.bne.utilities.sql.BneBaseSQL;
public class SagarSupplierSiteNameSQL extends BneBaseSQL {
public SagarSupplierSiteNameSQL(BneWebAppsContext paramBneWebAppsContext,
String paramString) throws SQLException,
BneException {
Connection connection = paramBneWebAppsContext.getJDBCConnection();
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("SELECT ss.vendor_site_code, ss.address_line1 || ',' || ss.city || ',' || ss.state address FROM ap_suppliers s,ap_supplier_sites_all ss WHERE ss.vendor_id = s.vendor_id AND s.vendor_name = :1");
if ((paramString != null) && (!paramString.trim().equals(""))) {
stringBuffer.append("AND " + paramString);
}
//stringBuffer.append(" ORDER BY VENDOR_SITE_CODE, ADDRESS ");
setQuery(connection, stringBuffer.toString());
}
}
b)SagarSupplierSiteNameValidator.java-below is source code
package sagar.oracle.apps.lovtest.validator;
import java.util.Hashtable;
import oracle.apps.bne.exception.BneException;
import oracle.apps.bne.exception.BneFatalException;
import oracle.apps.bne.exception.BneMissingParameterException;
import oracle.apps.bne.framework.BneWebAppsContext;
import oracle.apps.bne.integrator.validators.BneUploadValidator;
import oracle.apps.bne.utilities.sql.BneCompositeSQLCriteria;
import oracle.apps.bne.utilities.sql.BneResultSet;
import oracle.apps.bne.utilities.sql.BneSQLStatement;
import sagar.oracle.apps.lovtest.sql.SagarSupplierSiteNameSQL;
public class SagarSupplierSiteNameValidator extends BneUploadValidator {
public String[] getDomainParameters() {
return new String[] { "P_SUP" };
}
public BneResultSet getDomainValues(BneWebAppsContext paramBneWebAppsContext,
Hashtable paramHashtable,
BneCompositeSQLCriteria paramBneCompositeSQLCriteria) throws BneException {
SagarSupplierSiteNameSQL sagarSupplierSiteNameSQL = null;
BneResultSet bneResultSet = null;
BneSQLStatement bneSQLStatement1 = new BneSQLStatement();
if (paramBneCompositeSQLCriteria != null) {
bneSQLStatement1 =
paramBneCompositeSQLCriteria.evaluate(bneSQLStatement1);
}
String str1 = (String)paramHashtable.get("P_SUP");
if (str1 == null) {
throw new BneMissingParameterException("Supplier Field Error");
}
try {
sagarSupplierSiteNameSQL =
new SagarSupplierSiteNameSQL(paramBneWebAppsContext,
bneSQLStatement1.getStatement());
BneSQLStatement bneSQLStatement2 =
new BneSQLStatement(sagarSupplierSiteNameSQL.getQuery(),
new Object[] { str1 });
bneSQLStatement2.append("", bneSQLStatement1.getBindValues());
bneResultSet =
sagarSupplierSiteNameSQL.getBneResultSet(bneSQLStatement2.getBindValuesAsArray());
} catch (Exception exception) {
throw new BneFatalException(exception.toString());
}
return bneResultSet;
}
}
(c)SagarSupplierSiteNameComponent.java-below is source code
package sagar.oracle.apps.lovtest.component;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.Hashtable;
import java.util.Vector;
import oracle.apps.bne.exception.BneException;
import oracle.apps.bne.exception.BneMissingParameterException;
import oracle.apps.bne.exception.BneParameterException;
import oracle.apps.bne.exception.BneSQLException;
import oracle.apps.bne.framework.BneBajaContext;
import oracle.apps.bne.framework.BneBajaPage;
import oracle.apps.bne.framework.BneWebAppsContext;
import oracle.apps.bne.integrator.component.BneAbstractListOfValues;
import oracle.apps.bne.parameter.BneParameter;
import oracle.apps.bne.repository.BneResourceString;
import oracle.apps.bne.utilities.BneUIXUtils;
import oracle.apps.bne.utilities.sql.BneCompositeSQLCriteria;
import oracle.apps.bne.utilities.sql.BneResultSet;
import oracle.apps.bne.utilities.sql.BneSimpleSQLCriteria;
import oracle.apps.bne.webui.control.BneLOVControlBean;
import sagar.oracle.apps.lovtest.validator.SagarSupplierSiteNameValidator;
import oracle.cabo.servlet.Page;
import oracle.cabo.servlet.event.PageEvent;
import oracle.cabo.ui.data.DictionaryData;
public class SagarSupplierSiteNameComponent extends BneAbstractListOfValues {
private SagarSupplierSiteNameValidator VALIDATOR = null;
private String[] VALIDATOR_PARAMS = null;
private String FILTERFIELD = null;
private String FILTERVALUE = null;
public String getLOVProcessorType() {
return "TABLE";
}
public void init(BneBajaContext paramBneBajaContext, Page paramPage,
PageEvent paramPageEvent) {
if (VALIDATOR == null) {
VALIDATOR = new SagarSupplierSiteNameValidator();
VALIDATOR_PARAMS = VALIDATOR.getDomainParameters();
}
}
public BneBajaPage handleListOfValues(BneBajaContext paramBneBajaContext,
Page paramPage,
PageEvent paramPageEvent,
BneLOVControlBean paramBneLOVControlBean) throws BneException {
BneWebAppsContext bneWebAppsContext =
paramBneBajaContext.getBneWebAppsContext();
BneCompositeSQLCriteria bneCompositeSQLCriteria = null;
Hashtable hashtable = new Hashtable();
handlePageParameters(paramPageEvent);
for (int i = 0; i < VALIDATOR_PARAMS.length; i++) {
String str2 =
getParameterValue(bneWebAppsContext, VALIDATOR_PARAMS[i]);
if (str2 == null)
continue;
hashtable.put(VALIDATOR_PARAMS[i], str2);
}
if ((FILTERVALUE != null) && (!FILTERVALUE.trim().equals(""))) {
bneCompositeSQLCriteria = new BneCompositeSQLCriteria();
if (FILTERFIELD != null && !FILTERFIELD.equals("")) {
BneSimpleSQLCriteria bneSimpleSQLCriteria;
if (FILTERFIELD.equals("VENDOR_SITE_CODE"))
bneSimpleSQLCriteria =
new BneSimpleSQLCriteria(0, "VENDOR_SITE_CODE", 0,
9, FILTERVALUE, 2);
else
bneSimpleSQLCriteria =
new BneSimpleSQLCriteria(0, "ADDRESS_LINE1 || ',' || CITY || ',' || STATE",
0, 9, FILTERVALUE, 2);
bneSimpleSQLCriteria.setSearchsCaseInsensitivity(true);
bneCompositeSQLCriteria.addCriteria(bneSimpleSQLCriteria);
}
}
setTableFilter(true);
setTableData(getTableData(bneWebAppsContext, paramBneLOVControlBean,
hashtable, bneCompositeSQLCriteria));
return null;
}
public void getListOfValueParameters() throws BneParameterException {
for (int i = 0; i < VALIDATOR_PARAMS.length; i++) {
String str1 = VALIDATOR_PARAMS[i];
String str2 =
"Oracle Applications Sup Sup Site Test." + str1 + " field.";
addComponentParameter(new BneParameter(str1, "", str2));
}
}
private void handlePageParameters(PageEvent paramPageEvent) throws BneException {
FILTERFIELD =
BneUIXUtils.getPageEventParameter(paramPageEvent, "listOfValues:bne:filterField");
FILTERVALUE =
BneUIXUtils.getPageEventParameter(paramPageEvent, "listOfValues:bne:filterValue");
}
public DictionaryData[] getTableData(BneWebAppsContext paramBneWebAppsContext,
BneLOVControlBean paramBneLOVControlBean,
Hashtable paramHashtable,
BneCompositeSQLCriteria paramBneCompositeSQLCriteria) throws BneException {
DictionaryData dictionaryData = null;
Vector vector = new Vector();
BneResultSet bneResultSet = null;
ResultSetMetaData resultSetMetaData = null;
try {
String str = null;
bneResultSet =
VALIDATOR.getDomainValues(paramBneWebAppsContext, paramHashtable,
paramBneCompositeSQLCriteria);
if (bneResultSet != null) {
resultSetMetaData = bneResultSet.getResultSet().getMetaData();
while (bneResultSet.next()) {
dictionaryData = new DictionaryData();
for (int i = 1; i <= resultSetMetaData.getColumnCount();
i++) {
str = bneResultSet.getString(i);
if (str == null) {
dictionaryData.put(resultSetMetaData.getColumnName(i),
"");
} else {
dictionaryData.put(resultSetMetaData.getColumnName(i),
str);
}
}
vector.addElement(dictionaryData);
}
}
} catch (SQLException sqlException) {
throw new BneSQLException(BneResourceString.getMlsString(-1L, -1L,
"Cannot get Supplier Site Name information"),
sqlException);
} catch (BneMissingParameterException bneMissingParameterException) {
paramBneLOVControlBean.addError(bneMissingParameterException.getMessage());
}
DictionaryData[] arrayOfDictionaryData =
new DictionaryData[vector.size()];
for (int i = 0; i < vector.size(); i++) {
arrayOfDictionaryData[i] = ((DictionaryData)vector.elementAt(i));
}
return arrayOfDictionaryData;
}
public String getComponentName() {
return "SupplierSiteName";
}
public String getComponentVersion() {
return "R12";
}
}
Achieving Dependent LOV in Oracle Web ADI is quite tedious task. But don't worry, I am sharing the steps to create one.
You must know basics of Oracle Web-ADI before trying below steps.
Dependent LOV in Oracle Web ADI is created by writing 3 Java Classes as,
1)SQL Class
2)Validator Class
3)Component Class
The Java Source Code of these classes is present below,
Scenario-
Consider we have two columns in Web-ADI,
1)Supplier
2)Supplier Site
We want to show only Supplier Sites of selected Supplier, i.e., we want to filter Supplier Sites as per the Supplier selection.
We will create Supplier as static LOV.We can also create Supplier as static pop-list.
The steps are as below,
(1)Create Web-ADI containing Supplier and Supplier Site as plain enterable columns, i.e., on which LOV is not set yet.
(2)Create Static LOV (Table LOV) for Supplier using following API,
begin
BNE_INTEGRATOR_UTILS.CREATE_TABLE_LOV
(P_APPLICATION_ID => 200,
P_INTERFACE_CODE => 'GENERAL_1_INTF', --BNE_INTERFACE_COLS_B.INTERFACE_CODE
P_INTERFACE_COL_NAME => 'P_SUP', --BNE_INTERFACE_COLS_B.INTERFACE_COL_NAME
P_ID_COL => 'SEGMENT1',
P_MEAN_COL => 'VENDOR_NAME',
P_DESC_COL =>NULL,
P_TABLE => 'AP_SUPPLIERS',
P_ADDL_W_C => null,
P_WINDOW_CAPTION => 'Suppliers',
P_WINDOW_WIDTH => 400,
P_WINDOW_HEIGHT => 300,
P_TABLE_BLOCK_SIZE => 10,
P_TABLE_SORT_ORDER => 'ascending',
P_USER_ID => -1
,P_TABLE_COLUMNS =>NULL,
P_TABLE_SELECT_COLUMNS =>NULL,
P_TABLE_COLUMN_ALIAS =>NULL,
P_TABLE_HEADERS =>NULL,
P_POPLIST_FLAG =>'N'
);
commit;
end;
(3)Copy below 3 java files to JAVA_TOP and compile in given order only
a)SagarSupplierSiteNameSQL.java-below is source code
package sagar.oracle.apps.lovtest.sql;
import java.sql.Connection;
import java.sql.SQLException;
import oracle.apps.bne.exception.BneException;
import oracle.apps.bne.framework.BneWebAppsContext;
import oracle.apps.bne.utilities.sql.BneBaseSQL;
public class SagarSupplierSiteNameSQL extends BneBaseSQL {
public SagarSupplierSiteNameSQL(BneWebAppsContext paramBneWebAppsContext,
String paramString) throws SQLException,
BneException {
Connection connection = paramBneWebAppsContext.getJDBCConnection();
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("SELECT ss.vendor_site_code, ss.address_line1 || ',' || ss.city || ',' || ss.state address FROM ap_suppliers s,ap_supplier_sites_all ss WHERE ss.vendor_id = s.vendor_id AND s.vendor_name = :1");
if ((paramString != null) && (!paramString.trim().equals(""))) {
stringBuffer.append("AND " + paramString);
}
//stringBuffer.append(" ORDER BY VENDOR_SITE_CODE, ADDRESS ");
setQuery(connection, stringBuffer.toString());
}
}
b)SagarSupplierSiteNameValidator.java-below is source code
package sagar.oracle.apps.lovtest.validator;
import java.util.Hashtable;
import oracle.apps.bne.exception.BneException;
import oracle.apps.bne.exception.BneFatalException;
import oracle.apps.bne.exception.BneMissingParameterException;
import oracle.apps.bne.framework.BneWebAppsContext;
import oracle.apps.bne.integrator.validators.BneUploadValidator;
import oracle.apps.bne.utilities.sql.BneCompositeSQLCriteria;
import oracle.apps.bne.utilities.sql.BneResultSet;
import oracle.apps.bne.utilities.sql.BneSQLStatement;
import sagar.oracle.apps.lovtest.sql.SagarSupplierSiteNameSQL;
public class SagarSupplierSiteNameValidator extends BneUploadValidator {
public String[] getDomainParameters() {
return new String[] { "P_SUP" };
}
public BneResultSet getDomainValues(BneWebAppsContext paramBneWebAppsContext,
Hashtable paramHashtable,
BneCompositeSQLCriteria paramBneCompositeSQLCriteria) throws BneException {
SagarSupplierSiteNameSQL sagarSupplierSiteNameSQL = null;
BneResultSet bneResultSet = null;
BneSQLStatement bneSQLStatement1 = new BneSQLStatement();
if (paramBneCompositeSQLCriteria != null) {
bneSQLStatement1 =
paramBneCompositeSQLCriteria.evaluate(bneSQLStatement1);
}
String str1 = (String)paramHashtable.get("P_SUP");
if (str1 == null) {
throw new BneMissingParameterException("Supplier Field Error");
}
try {
sagarSupplierSiteNameSQL =
new SagarSupplierSiteNameSQL(paramBneWebAppsContext,
bneSQLStatement1.getStatement());
BneSQLStatement bneSQLStatement2 =
new BneSQLStatement(sagarSupplierSiteNameSQL.getQuery(),
new Object[] { str1 });
bneSQLStatement2.append("", bneSQLStatement1.getBindValues());
bneResultSet =
sagarSupplierSiteNameSQL.getBneResultSet(bneSQLStatement2.getBindValuesAsArray());
} catch (Exception exception) {
throw new BneFatalException(exception.toString());
}
return bneResultSet;
}
}
(c)SagarSupplierSiteNameComponent.java-below is source code
package sagar.oracle.apps.lovtest.component;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.Hashtable;
import java.util.Vector;
import oracle.apps.bne.exception.BneException;
import oracle.apps.bne.exception.BneMissingParameterException;
import oracle.apps.bne.exception.BneParameterException;
import oracle.apps.bne.exception.BneSQLException;
import oracle.apps.bne.framework.BneBajaContext;
import oracle.apps.bne.framework.BneBajaPage;
import oracle.apps.bne.framework.BneWebAppsContext;
import oracle.apps.bne.integrator.component.BneAbstractListOfValues;
import oracle.apps.bne.parameter.BneParameter;
import oracle.apps.bne.repository.BneResourceString;
import oracle.apps.bne.utilities.BneUIXUtils;
import oracle.apps.bne.utilities.sql.BneCompositeSQLCriteria;
import oracle.apps.bne.utilities.sql.BneResultSet;
import oracle.apps.bne.utilities.sql.BneSimpleSQLCriteria;
import oracle.apps.bne.webui.control.BneLOVControlBean;
import sagar.oracle.apps.lovtest.validator.SagarSupplierSiteNameValidator;
import oracle.cabo.servlet.Page;
import oracle.cabo.servlet.event.PageEvent;
import oracle.cabo.ui.data.DictionaryData;
public class SagarSupplierSiteNameComponent extends BneAbstractListOfValues {
private SagarSupplierSiteNameValidator VALIDATOR = null;
private String[] VALIDATOR_PARAMS = null;
private String FILTERFIELD = null;
private String FILTERVALUE = null;
public String getLOVProcessorType() {
return "TABLE";
}
public void init(BneBajaContext paramBneBajaContext, Page paramPage,
PageEvent paramPageEvent) {
if (VALIDATOR == null) {
VALIDATOR = new SagarSupplierSiteNameValidator();
VALIDATOR_PARAMS = VALIDATOR.getDomainParameters();
}
}
public BneBajaPage handleListOfValues(BneBajaContext paramBneBajaContext,
Page paramPage,
PageEvent paramPageEvent,
BneLOVControlBean paramBneLOVControlBean) throws BneException {
BneWebAppsContext bneWebAppsContext =
paramBneBajaContext.getBneWebAppsContext();
BneCompositeSQLCriteria bneCompositeSQLCriteria = null;
Hashtable hashtable = new Hashtable();
handlePageParameters(paramPageEvent);
for (int i = 0; i < VALIDATOR_PARAMS.length; i++) {
String str2 =
getParameterValue(bneWebAppsContext, VALIDATOR_PARAMS[i]);
if (str2 == null)
continue;
hashtable.put(VALIDATOR_PARAMS[i], str2);
}
if ((FILTERVALUE != null) && (!FILTERVALUE.trim().equals(""))) {
bneCompositeSQLCriteria = new BneCompositeSQLCriteria();
if (FILTERFIELD != null && !FILTERFIELD.equals("")) {
BneSimpleSQLCriteria bneSimpleSQLCriteria;
if (FILTERFIELD.equals("VENDOR_SITE_CODE"))
bneSimpleSQLCriteria =
new BneSimpleSQLCriteria(0, "VENDOR_SITE_CODE", 0,
9, FILTERVALUE, 2);
else
bneSimpleSQLCriteria =
new BneSimpleSQLCriteria(0, "ADDRESS_LINE1 || ',' || CITY || ',' || STATE",
0, 9, FILTERVALUE, 2);
bneSimpleSQLCriteria.setSearchsCaseInsensitivity(true);
bneCompositeSQLCriteria.addCriteria(bneSimpleSQLCriteria);
}
}
setTableFilter(true);
setTableData(getTableData(bneWebAppsContext, paramBneLOVControlBean,
hashtable, bneCompositeSQLCriteria));
return null;
}
public void getListOfValueParameters() throws BneParameterException {
for (int i = 0; i < VALIDATOR_PARAMS.length; i++) {
String str1 = VALIDATOR_PARAMS[i];
String str2 =
"Oracle Applications Sup Sup Site Test." + str1 + " field.";
addComponentParameter(new BneParameter(str1, "", str2));
}
}
private void handlePageParameters(PageEvent paramPageEvent) throws BneException {
FILTERFIELD =
BneUIXUtils.getPageEventParameter(paramPageEvent, "listOfValues:bne:filterField");
FILTERVALUE =
BneUIXUtils.getPageEventParameter(paramPageEvent, "listOfValues:bne:filterValue");
}
public DictionaryData[] getTableData(BneWebAppsContext paramBneWebAppsContext,
BneLOVControlBean paramBneLOVControlBean,
Hashtable paramHashtable,
BneCompositeSQLCriteria paramBneCompositeSQLCriteria) throws BneException {
DictionaryData dictionaryData = null;
Vector vector = new Vector();
BneResultSet bneResultSet = null;
ResultSetMetaData resultSetMetaData = null;
try {
String str = null;
bneResultSet =
VALIDATOR.getDomainValues(paramBneWebAppsContext, paramHashtable,
paramBneCompositeSQLCriteria);
if (bneResultSet != null) {
resultSetMetaData = bneResultSet.getResultSet().getMetaData();
while (bneResultSet.next()) {
dictionaryData = new DictionaryData();
for (int i = 1; i <= resultSetMetaData.getColumnCount();
i++) {
str = bneResultSet.getString(i);
if (str == null) {
dictionaryData.put(resultSetMetaData.getColumnName(i),
"");
} else {
dictionaryData.put(resultSetMetaData.getColumnName(i),
str);
}
}
vector.addElement(dictionaryData);
}
}
} catch (SQLException sqlException) {
throw new BneSQLException(BneResourceString.getMlsString(-1L, -1L,
"Cannot get Supplier Site Name information"),
sqlException);
} catch (BneMissingParameterException bneMissingParameterException) {
paramBneLOVControlBean.addError(bneMissingParameterException.getMessage());
}
DictionaryData[] arrayOfDictionaryData =
new DictionaryData[vector.size()];
for (int i = 0; i < vector.size(); i++) {
arrayOfDictionaryData[i] = ((DictionaryData)vector.elementAt(i));
}
return arrayOfDictionaryData;
}
public String getComponentName() {
return "SupplierSiteName";
}
public String getComponentVersion() {
return "R12";
}
}
(4)Create Dynamic LOV (JAVA LOV) for Supplier Site using following API,
begin
BNE_INTEGRATOR_UTILS.CREATE_JAVA_LOV
(P_APPLICATION_ID => 200,
P_INTERFACE_CODE => 'GENERAL_1_INTF', --BNE_INTERFACE_COLS_B.INTERFACE_CODE
P_INTERFACE_COL_NAME => 'P_SUP_SITE', --BNE_INTERFACE_COLS_B.INTERFACE_COL_NAME
P_JAVA_CLASS => 'sagar.oracle.apps.lovtest.component.SagarSupplierSiteNameComponent',
P_WINDOW_CAPTION => 'Supplier Sites',
P_WINDOW_WIDTH => 500,
P_WINDOW_HEIGHT => 500,
P_TABLE_BLOCK_SIZE => 50,
P_TABLE_COLUMNS => 'VENDOR_SITE_CODE,ADDRESS',
P_TABLE_SELECT_COLUMNS => 'P_SUP_SITE',
P_TABLE_COLUMN_ALIAS => 'P_SUP_SITE,ADDRESS',
P_TABLE_HEADERS => 'Vendor Site Code, Address',
P_TABLE_SORT_ORDER => 'yes, yes',
P_USER_ID => -1);
commit;
end;
(5)Bounce the server and test whether Dependent LOV works?
Nice Article...
ReplyDeleteThanks
DeleteRegards,
Sagar
Hi Good stuff!
ReplyDeleteIs there any way we can debug this when things are not working straight away?
Perhaps show messages in the WebADI sheet, or write some of our own stuff to the BNE log?
Cheers
Jeroen van Meenen
Hi Jeroen van Meenan,
DeleteThanks.
Yes, we can write debug messages to BNE Log using below profiles and JAVA classes,
profiles:
BNE Server Log Level
BNE Server Log Filename
BNE Server Log Directory
classes:
oracle.apps.bne.framework.BneLogger
oracle.apps.bne.framework.BneTrace
Regards,
Sagar
Hi Sagar,
ReplyDeleteI have did same steps but After all I can able to open dependent value set and i can see values, but when i select a value that value is not being populated in Excel sheet column - Please advise...
Thanks,
Mahesh
Hello Mahesh,
DeleteYou have to set table-select-columns parameter.Also if table-columns is not equal to table-select-columns parameter, you have to set table-column-alias parameter.
Hope this helps.
Regards,
Sagar
Hi Sagar,
DeleteI tried the above steps but its still not populating in the excel sheet column. Please advice.
Thanks,
Pallavi
I have facing the same problem Sagar Please advice.
DeleteWonderfully article, explained very neatly.
ReplyDeleteI have did similar steps, its working fine but if enter supplir site as wrong valueas manual entry instead of lov selection still its considering. it should validate aga inst supplier?
Any idea how to validate manually entered value?
Hello Anil,
DeleteUnlike OAF, in Oracle Web ADI validating as soon as we exit an LOV after manually entering value is not available.But Web ADI validates LOV values, when we upload.
Regards,
Sagar
Hello Sagar,
ReplyDeleteThanks for your reply. If i want to pass multiple parameters to supplier site how can i do that any idea? I need to pass Vendor Name and OU name to my Vendor site query? Please advise.
Thanks,
Mahesh
Sagar,
ReplyDeleteThanks for your reply. Now I need to pass two bind values to my supplier site. 1 is vendor name other is OU Name. Please share the code if you have. I dont have java knowledge.
Here is my query:
SELECT ss.vendor_site_code, ss.address_line1 || ',' || ss.city || ',' || ss.state address FROM apps.ap_suppliers s,apps.ap_supplier_sites_all ss,hr_operating_units hru WHERE ss.vendor_id = s.vendor_id AND s.vendor_name = :1 AND hru.organization_id = ss.org_id AND hru.name = :2
Hi,
DeleteSorry for replying late.It is very much logical to handle two parameters.I hope you have got a Java resource and solved this issue.
Let me know if you still have this question unanswered.
Regards,
Sagar
Hi Sagar,
DeleteI have the same request (passing two bind values). Could you post an example of how the Component.java and Validator.java would look like?
Much appreciated
Jeroen
Hi Sagar,
Deleteplease provide the solution for this as soon as possible.
It will be great help.
Hi Sagar ,I am facing the same issue..I also dont know java..Can u please share the code for component and validator?
DeleteHi Sager,
ReplyDeleteI want to create dependent lov for 2 lookups ..
for example.
if i select one value in 1st column,
in second column only that related values should import
Hi,
DeleteYou have to write proper query to select from fnd_lookup_values and fnd_lookup_types.Once query is ready, you have to change above code accordingly.
Regards,
Sagar
Hi sagar,
ReplyDeleteWe are using R12.1.3 , Is it possible for you tell us the Front end Navigation to do the same using Desktop Integration Manager responsibility.
Regards
Apurba k Saha
Hi Apurba,
DeleteAre you asking, whether we can create JAVA LOV using Desktop Integration Manager responsibility, instead of API BNE_INTEGRATOR_UTILS.CREATE_JAVA_LOV?
If I am correct, yes we can create JAVA LOV using Desktop Integration Manager responsibility, but you need to change your integrator at lot of places.
These changes are done by API in a single shot.
Regards,
Sagar
Hi,
ReplyDeleteYour article really helps me in creating depending valueset. However selected Dependent value set value is not copied to the Excel sheet. Depending valueset showing correct values. Any idea what could be the reason.
Thanks
hari
Hi Hari,
DeleteYou have to set table-select-columns parameter.Also if table-columns is not equal to table-select-columns parameter, you have to set table-column-alias parameter.
Regards,
Sagar
Thanks Sagar. My issue got resolved. Thanks a Lot.
Deleteregards
Hari
You are welcome Hari! :)
DeleteRegards,
Sagar
Hi Sagar,
ReplyDeleteThanks for your posting about webadi.
We are able to see the LOV for Supplier Field and We had created the Java class files and complied in sequence but we are unable to get the Dependent LOV for Supplier site. Do we need to do any setups from front end after step no 4 to get the lov in supplier site field in Web adi Sheet?.
Thanks In Advance,
kalyan.
Hi Kalyan,
DeleteHave you bounced OACORE OC4J as last step? If not please do.
If the problem still persists, write debug messages to BNE Log using below profiles and JAVA classes,
profiles:
BNE Server Log Level
BNE Server Log Filename
BNE Server Log Directory
classes:
oracle.apps.bne.framework.BneLogger
oracle.apps.bne.framework.BneTrace
Check log for errors.
Hope this helps.
Regards,
Sagar
Hi,
ReplyDeleteI would like to add a note on this topic. If you are replacing any static (table type) LOVs, please note that the validation that you normally have in the WebADI disappears and needs to be done in your PL/SQL wrapper.
For example, if you would have a static table LOV on Supplier Site with let’s say 10 values (1 to 10), then you are not able to upload anything else that those 10 values because the WebADI would validate any value entered against the LOV when uploading.
However, when you change the LOV to become a Dependent LOV on Supplier, then this validation is lost. You would need to add this validation in you PL/SQL wrapper (the procedure called by the WebADI).
Cheers
Jeroen
Thanks a lot Jeroen for sharing this.
DeleteRegards,
Sagar
Hi Jeroen,
DeleteIs it possible you could provide steps how to add validation in my PL/SQL wrapper (procedure called by WebAdi) please.
Many Thanks
Smita
Hi Admin,
ReplyDeleteHow to find the path of java file.I have copied these files in java top folder .First of all how to compile these files?and then path of these files?
Cheers
Thanks
Faisal Abbasi
Hi Faisal,
DeleteThe first line of java file, which starts with keyword 'package' is nothing but the folder structure in $JAVA_TOP.
If folder structure is not present, you have to create it.
Then you have to copy the java file in this folder structure.
To compile you can use Putty.Using putty, connect to server using Telnet or FTP.
Then use cd command to go to folder structure in $JAVA_TOP.
After that use javac command to compile the java file.
This is the most basic way to compile any Java File.
Regards,
Sagar
Hi Sagar,
ReplyDeleteI am also looking for the source java file but did not get correct path . I could see the *.class file in $JAVA_TOP , but I can't read those file as they are compiled ones .
I am trying to open a seeded(standard) Java file to get more clarity on the source code. Would you be able to provide some help.
Hi Vijay,
DeleteYou have to use a Decompiler.
Regards,
Sagar
Hi Sagar,
ReplyDeleteI follow your steps and able to compile SQL and validator file,
however when i compiled Component files, i got error message
.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Any idea about this
Hi Vijay,
DeleteYou can ignore this message.It is a warning, not an error!
Let me know if you are stuck anywhere else.
Regards,
Sagar
Hi Sagar,
ReplyDeleteThanks for the article. I was able to create dependent LOV using the above code for fnd lookup meaning and code. But, when I select the value and click on Go button , the value wont get populated on excel sheet. I see an update above that we need to set Table select columns which I did, however, I am not able to get the value in the excel. Can you plz help what I am missing?
Thanks
Lavanya
Hi Lavanya,
DeleteIf table-columns is not equal to table-select-columns parameter, you have to set table-column-alias parameter also.
Regards,
Sagar
Hi Sagar, Thanks for the post.
ReplyDeleteQuestion:
I tried to create two independent LOVs - first one works great. I tried to create another LOV on the second column [really independent on the first column], but the bind variable always looks at the first column value for the second column LOV and pulls the data. Never looks at what is given the second column. Any ideas?
Your lov works great. Someone also asked this question - do you have an example with more than one depedency values like :1 and :2? I tried to look into your java files and try to find places where I need to handle more than one bind variable, but it seems very complex.
ReplyDeleteHi Sagar,
ReplyDeleteVery good article Sagar.
I have 1 query relating to Custom Integrator. I am able to develop WebADI, but while adding LOV for some columns, its not working. I am adding LOV for SEX/GENDER column.
I am using below code:
UPDATE bne_interface_cols_b int_col
SET val_id_col = 'LOOKUP_CODE',
val_mean_col = 'MEANING',
val_desc_col = 'DESCRIPTION',
val_type = 'TABLE',
lov_type = 'STANDARD',
val_obj_name = 'HR_LOOKUPS',
val_addl_w_c = 'LOOKUP_TYPE = SEX'
WHERE interface_col_name = 'P_SEX'
AND interface_code =
(SELECT ifb.interface_code
FROM BNE_INTERFACES_B ifb, BNE_INTEGRATORS_tl int
WHERE 1 = 1
AND user_name = 'XXHR_Integator_Name'
AND ifb.integrator_code = int.integrator_code);
Can you please help me on this. Appreciate your feedback.
Regards,
Vinit
Hi Sagar ,
ReplyDeleteI followed every steps. But I am getting below error.
Fatal error: Please have your system administrator view the bne.log file.
oracle.apps.bne.exception.BneFatalException: Unable to find component class xxinv.oracle.apps.xxinv6626.component.ItemNamesComponent6626cst.
Please contact your support representative.
Regards
Priya
Hi,
DeletePlease bounce APACHE and try.
Regards,
Vinit
Hi All,
ReplyDeleteCan any one worked on creating LOV in 11I??
thanks
hi Sagar,
ReplyDeleteI created dependent lov through new DIM resp. in that we create component .
in this case we need to create a JAVA component. for this there is no option of P_SELECT_COLUMNS and due to this when we select Suplier site in lov, it's not getting populated on excel created. any idea how to achieve it?
Hi,
DeleteI've achieved it using API, as instructed in tutorial. It seems you cannot use application to create dependant LOV.
Regards,
Marko
Hi Sagar,
ReplyDeleteThanks for the info it was really helpful however, I'm not a java guy and my requirement is to make the activity column that I have selected dependent on the operating column. The table for this is ar_receivables_trx_all. Where in the java file do I need to make the necessary changes for the codes to work properly?? any help from your side will be deeply appreciated.
Thanks,
Anurag
Hi,
ReplyDeleteThank you for a great tutorial. I was able to create LOV according to your instructions. Now I am trying to create LOV with ID and MEANING values (MEANING is shown in Excel, while ID is sent to API parameter). This functionality exists for standard Table-type LOV.
Could you please help?
Thank you,
Marko
Hi Marko,
DeleteI am trying to achieve the same thing (dependent LOV in webadi, MEANING is shown in Excel, while ID is sent to API parameter). Any clues?
Thanks in advance.
Ivan
Hi Ivan,
DeleteI have not managed to do it so. So I am passing meaning to API, not ID.
Regards,
Marko
Hi Sagar,
ReplyDeletethanks for the information which you provided in this article. do you have any other way to create depedent lov with out java classes in 11i.
i would appreciate if you can provide resolution for the same
Regards
Siva Rajesh
Hi Sagar
ReplyDeleteThanks for the article. Its very helpful. Can you please tell me how can we add LOV for accounting flexfield. I need it for AP Invoice interface. I would appreciate if you can provide some solution.
Thanks
Pallavi
Thanks Sagar, your article is very helpful.
ReplyDeleteB Rgds,
Balu.
Hi Sagar,
ReplyDeleteIs there a way of accomplishing this same supplier and supplier site LOV in Web ADI 12.1.3 via the front end without having to compile java code? For example, using the Desktop Integration Manager responsibility?
Thanks.
Y
Hi Sagar
ReplyDeleteI am facing an issue.
Fatal error: Please have your system administrator view the bne.log file.
oracle.classloader.util.AnnotatedClassFormatError: oracle/apps/lovtest/component/SagarSupplierSiteNameComponent : Unsupported major.minor version 51.0 Invalid class: oracle.apps.lovtest.component.SagarSupplierSiteNameComponent Loader: oacore.root:0.0.0 Code-Source: /tgmc5i/applmgr/common/java/classes/ Configuration: in /tgmc5i/applmgr/common/webapps/oacore/ Dependent class: oracle.apps.bne.integrator.component.BneComponentFactory Loader: oacore.root:0.0.0 Code-Source: /tgmc5i/applmgr/common/java/classes/ Configuration: in /tgmc5i/applmgr/common/webapps/oacore/ This class was compiled for a newer version of the JRE. Expected version 50.0, found 51.0.
Please contact your support representative.
I have installed JDK 1.7 Update 51 in local machine. In unix box it is java -version
java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01)
Java HotSpot(TM) Server VM (build 20.14-b01, mixed mode)
I tried -source option also but it is not working. Can you help me out?
Hi Kartheek,
DeleteDid you get this issue resolved...?... If yes, please let us know the solution.
Try giving version in javac
Deletee.g.
javac -source 1.6 -target 1.6 ./bolinf/oracle/apps/manchrg/component/bolinfCustSiteNumComponent.java
It solved above issue for me.
Had this requirement to create LOV's dependent on 2/3 other LOV's... Your article and the comments posted by you and others were of great help in doing so... Thanks a ton Sagar... Keep up the good work... :)
ReplyDeleteRegards,
Anoop S
Hi Sagar,
ReplyDeletewe have the same requirement.
We followed the instructions give by u and used code given by u.
But we are not getting any values in the dynamic LOV.
We are getting the filed names (site, address) but beside that it is showing no values found.
Could you please let us know what might be the problem.
Regards,
Eswar.B
Hi Sagar,
ReplyDeleteThanks for providing the solution for Dependent LOV. I have one question, when I enter partial value in the field , at the time of Upload, the field is not getting validated. is there any way to force the validation of the field ?
Thanks
Rajesh
Hi Sagar,
ReplyDeleteThanks for sharing very much valuable information in detailed steps.
I need to customize existing JAVA_LOV of a seeded Web ADI. Currently it is showing Address from HZ_LOCATIONS table in a single field as below
3784-148 AVENUE NE,,,,CALGARY,,T2Z 3V6,CA
My requirement is to display SiteNumber||Address.
Can you please explain how can we achieve?
Thanks You
-Raj
Hi Sagar,
ReplyDeleteThanks for the article . I am able to create the dependent LOV successfully. I have another requirement and appreciate if you help it out.
I have two LOV. First has the source of Table. The second LOV is not directly dependent on First. The values in the First LOV actually decides which query to be executed. So no bind parameters for the actual query but instead complete Dynamic Query.
for eg: First LOV has values like Customer,People,Order Number,etc. Based on the selection. if user selects Customer than all the customer and if people then all employees.
I am able to generate the query through PL/SQL. Also I can manage it to bring in any of the Java class..
The question is where to actually wirte the code and how to manage those 3 class files..
Its a bit urgent requirement. Appreciatte if you could help out sooner.
Thanks,
Yadnesh
Hi,
ReplyDeleteWith respect to my earlier comment.. I am able to resolve it. I have one small issue. The number or rows get restrcited to exact filter that should be.. But i am not able to see anything in the Poplist itself Only blank columns.. But the rows filtered are proper.. I am sure i am missing something very minute.. Please help at the earliest.
Hi Sagar,
ReplyDeleteI'm trying to doing something like this, but i have only to validate a column (ATTRIBUTE1 of GL_INTERFACE), how can i do this ??... Do you know how can i start to looking ?.. because i didn't found too much information regarding this..
Thanks!!
Pablo.-
Hi,
ReplyDeleteGreat work and i am new to webadi. where can we write this 3 JAVA Class in web adi?
Thanks,
Vamshi
I am copying a data in excel,then changed it............but while uploading that its doesn't get validated....wrong value updated to table..plz help me
ReplyDeleteI am done with creation dependent LOV,its work fine....but when i changed the data of excel after selecting data from lov,it doesn't validated........plz help me
ReplyDeleteIf we have requirement of creating multiple dependent javaLOVS in the same integrator, seems BNE_INTEGRATOR_UTILS.CREATE_JAVA_LOV is not able to handle creation of multiple components.
ReplyDeleteIs it expected to have all the different column validations in the same java validator, component and sql class files? If yes, do you have a a sample class file code to handle multiple dependent LOVs on the same integrator.
Regards,
Hi Sagar,
ReplyDeleteIn R12.2.5 I am getting below error:
"oracle.apps.bne.exception.BneFatalException: Unable to find component class ".
I have followed the steps in same sequence as suggested by you.
Could you help?
I have the same error in R12.2. Clear all cache, restart whole Weblogic, and still the same error.
DeleteHi Deepak, I am also facing the same issue, if you resolved could you please share me the resolution steps.
DeleteThanks,
Chidambaram
I am also facing the same program , could you please share the resolution method if you resolved plz
DeleteHi All,
ReplyDeleteI followed every steps. But I am getting below error.
Fatal error: Please have your system administrator view the bne.log file.
oracle.apps.bne.exception.BneFatalException: Unable to find component class
Please contact your support representative.
Hi,
DeleteR12.2.4 and up... You have to regenerate customall.jar after placing class files. Also we need to place class files in both run and patch file systems.
Thanks,
Sundeep.
LOV is working fine but When i try to search in the LOV using Search window the LOV errors out. Can you please help on this. Appreciate the Help
ReplyDeleteAny solution with the above point ?
DeleteHi Sagar How can we add LOV for Key flex field in Custom Web ADI, same as available in GL standard Web ADI.
ReplyDeleteRegards,
Umair
Your document is being created.
ReplyDeleteDo not close this window until processing completes.
Fatal error: Please have your system administrator view the bne.log file.
oracle.apps.bne.exception.BneFatalException: Unable to find component class sagar.oracle.apps.lovtest.component.SagarSupplierSiteNameComponent.
Please contact your support representative.
This works perfect. Thanks
ReplyDeleteHi Sagar and All,
ReplyDeleteCreating dependent list of values using bind parameters in sql query in R1227. It is giving error as sql query and appending UPPER(:1) and UPPER(:2) and UPPER(LIKE(:3) and giving error.
Could you please suggest how to fix the above issue.
Appreciated for your well Done Works...Keep It Up!!!
ReplyDeleteJava training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery
Good blog.Thanks you very much for sharing these links. Will definitely check this out.. oracle training in chennai
ReplyDelete