Handling LOVs in Mobile Applications
In this article, we will see how to handle LOV bean in MWA.
In this example, we will create an LOV which displays the list of users from fnd_user ptable starting with ‘S’.
You can use these code snippets and make changes to the Hello world Sample Program which was published earlier and test it out.
The following are the steps to be performed.
Step 1:
In CustomTestPage.java, declare the variable for LOV, set properties like prompt, ID, Listener and add a handler method to the LOV
LOVFieldBean mUserNames;
mUserNames = new LOVFieldBean();
mUserNames.setName("TEST.LOV");
mUserNames.setPrompt("User LOV");
addFieldBean(mUserNames);
mUserNames.addListener(fieldListener);
public LOVFieldBean getUserLOV()
{
return mUserNames;
}
Please note that the handler method will be used in Listener Class to get handle of the bean.
Step 2:
Getting the List of Values for LOV. As we know LOV is nothing but a result set of a query. This result set can be attached to the LOV by 2 ways.
By SQL Query.
By a PLSQL package which executes the query and gives the result set as OUT parameter (via REF CURSOR)
In this example, we are going to use the following PLSQL package. This package basically gets all the users from FND_USER starting with the alphabet provided as a input parameter. The Code is as follows:
create or replace package XXX_MWA_LOV_TEST AS
TYPE t_ref_csr IS REF CURSOR;
PROCEDURE XXX_USERS_LOV (x_users OUT NOCOPY t_ref_csr
,p_user_name IN VARCHAR2);
end XXX_MWA_LOV_TEST;
create or replace package body XXX_MWA_LOV_TEST AS
PROCEDURE XXX_USERS_LOV (x_users OUT NOCOPY t_ref_csr
,p_user_name IN VARCHAR2
)
IS
BEGIN
OPEN x_users FOR
select user_id,user_name,description
from fnd_user
where user_name like p_user_name;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('ERROR IN USER LOV '|| SQLERRM);
END XXX_USERS_LOV;
end XXX_MWA_LOV_TEST;
Step 3:
In CustomTestListener.java, as we know there are two methods “fieldEntered” and “fieldExited”.
In FieldEntered, we have to execute PLSQL procedure and get the results and display it to user.
In FieldExited, we have to get the values selected by the user in the LOV.
public void fieldEntered(MWAEvent mwaevent)
throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException {
ses = mwaevent.getSession();
String s = UtilFns.fieldEnterSource(ses);
if (s.equals("TEST.LOV")) {
userLOVEntered(mwaevent);
return;
}
}
public void fieldExited(MWAEvent mwaevent) throws AbortHandlerException,InterruptedHandlerException, DefaultOnlyHandlerException {
ses = mwaevent.getSession();
String s = UtilFns.fieldEnterSource(ses);
if (s.equals("TEST.LOV")) {
userLOVExited(mwaevent);
return;
}
}
In the above code, we call the custom methods userLOVEntered() and userLOVExited() to handle the events.
public void userLOVEntered(MWAEvent mwaevent) throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException
{
UtilFns.trace("User LOV Entered");
try{
Session session = mwaevent.getSession();
//set the package and procedure name to be called
pg.getUserLOV().setlovStatement("XXX_MWA_LOV_TEST.XXX_USERS_LOV");
//Parameter Type, parameters and Prompts of the field in LOV
// C – cursor, AS/S – String, N – Numeric, AN - AlphaNumeric
String paramType[] = {"C", "AS" };
String parameters[] = {" ", "S%" };
//Set the prompts and visible fields for LOV result table
//We don’t want user id to be displayed in result table. So we //are setting it to false.
//These fields directly map to the selected columns in SELECT //statement of REF CURSOR
String prompts[] = { "USER_ID", "User Name", "Description" };
boolean flag[] = { false,true,true };
//Associate the properties to the LOV bean
//Properties for SQL Query
pg.getUserLOV().setInputParameterTypes(paramType);
pg.getUserLOV().setInputParameters(parameters);
//Properties for LOV Result Table
pg.getUserLOV().setSubfieldPrompts(prompts);
pg.getUserLOV().setSubfieldDisplays(flag);
}
catch(Exception e){
UtilFns.error("Error in calling LOV");
}
}
In the above code, we have pointed out the PLSQL procedure to be executed for List of Values and also we set the parameters, parameter types. Also, we mentioned the prompts for LOV results table and also what are all the visible fields available to user.
In this example, we have hardcoded the input parameter to “S%” so that the result set will have all users from FND_USER starting with “S”. In real time scenario, we can link this parameter dynamically to any variables.
public void userLOVExited(MWAEvent mwaevent) throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException
{
UtilFns.trace("User LOV Exited");
try{
//Get the selected row in a vector and print it
Vector v = pg.getUserLOV().getSelectedValues();
if(v!=null) {
UtilFns.trace("first " + v.elementAt(0).toString());
UtilFns.trace("second " + v.elementAt(1).toString());
UtilFns.trace("third " + v.elementAt(2).toString());
}
}
catch(Exception e){
UtilFns.error("Error in processing LOV");
}
}
In the above method, as soon as the user selects the values, we get the selected values in a Vector.
After that we print the user_id, user name and description of the selected user in the Log.
See the following screen shots for further understanding.
Fig 1: Mobile page with Text Bean and LOV

Fig 2: When the user clicks LOV, result page is displayed in a different window.

Fig 3: After the value is selected, the LOV field is populated with the selected value.

Values printed in Log file:
[Fri Feb 15 14:50:11 CET 2008] (Thread-15) User LOV Entered
[Fri Feb 15 14:51:39 CET 2008] (Thread-15) CustomFListener:fieldExited:fldName = TEST.LOV
[Fri Feb 15 14:51:39 CET 2008] (Thread-15) User LOV Exited
[Fri Feb 15 14:51:39 CET 2008] (Thread-15) first 1589
[Fri Feb 15 14:51:39 CET 2008] (Thread-15) second SENTHILK
[Fri Feb 15 14:51:39 CET 2008] (Thread-15) third Shanmugam, SenthilKumar
The above error log is done by the code written in userLOVExited() method.
In this example, we have just printed the selected value in the Log file. In real time scenario, we can use this selected value to be the criteria for the next field or it will be used to do some validations etc.
written by sivakumar , February 21, 2008
I have followed
http://oracle.anilpassi.com/xml-publisher-concurrent-program-xmlp-2.html
link to do the same.
I am facing the follwoing issue.
I am getting empty output after did all the changes as per the abl**e link
But only modification i did is, as in R12 we ahve separate top for Payments. But we dont have Report folder under IBY_TOP. So I am keeping my RDF report in AP_TOP and I have created executable under ap_top then Program under Payment_top. Remaining are same.
But I am not getting the output.
Pl. let me know, what I did is same or how to proceed
this is very urgent. so expecting the reply at the earliest
written by Ritesh M , February 22, 2008
Actually if you will see the LOV display unit on Standard MSCA forms the unit size is same as of text field...but if you create any custom LOV its dispaly unit size is small as compare to TEXTFIELDBEAN. I tried my level best..but couldn't find any property.......if you know pls share ?
Regards,
Ritesh
written by brad , March 17, 2008
Quick question. If I wanted to populate the LOV based on entering a partial value in the user field, how do I represent that partial value in the user field in the parameter array rather than the hard coded "S%"??
Thanks,
Brad
written by Brad , March 17, 2008
Can you show me some example code? I have been trying to figure out how to pass the partial value and can't seem to figure it out. I am a pl/sql programmer and have just rudimentary java skills. I've been looking at the LOV classes for examples, but I'm still puzzled.
Thanks!
Brad
written by Himanshu Joshi , May 06, 2008
I am very new to MSCA framework.
I am getting an error while populating LOV.On the first hit, I am getting the error below:
(Thread-13) MWA_LOV_ROW_CONS_FAIL: Unsuccessful row construction
java.lang.NullPointerException
at oracle.apps.mwa.container.LOVRuntimePageHandler.pageEntered(LOVRuntimePageHandler.java:89)
at oracle.apps.mwa.container.StateMachine.callListeners(StateMachine.java:1666)
at oracle.apps.mwa.container.StateMachine.handleEvent(StateMachine.java:1067)
at oracle.apps.mwa.presentation.telnet.PresentationManager.handle(PresentationManager.java:702)
at oracle.apps.mwa.presentation.telnet.ProtocolHandler.run(ProtocolHandler.java:820)
But when I go to next LOV and traverse back to first one, It gives me the LOV.
Please help me in resolving the issue.
written by Himanshu Joshi , June 22, 2008
Currently I am working on MSCA Customization.The requirement is to display on/off a field on custom mobile screen.
But the issue is when this field is displayed conditionally, the curosr/control does not appear with the same field.It gous to next button.
I have Used method : session.setNextFieldName("FieldName");
but its not working.
will appreciate your help on this .
written by nisha , July 03, 2008
In my page I have an Lov, for which I have set true for ValidateFromLOV and required .
First time the LOV is invoked and I'm selecting a value and that is being set to the field. The control comes to the next field. When I traverse back to LOV field which already have a valid value and move to some other field, the LOV is invoked again.
This should not happen as the field already has a valid value.
Following is the code
LOVFieldBean testLOV = new LOVFieldBean();
String subFieldPrompts[] = { "abc", "efg", "hij", "klm" };
boolean subFieldDisplays[] = { true, false, false, false };
testLOV.setlovStatement(query);
testLOV.setSubfieldPrompts(subFieldPrompts);
testLOV.setSubfieldDisplays(subFieldDisplays);
testLOV.setValidateFromLOV(true);
testLOV.setRequired(true);
String as[] = {"N", "S", "AN"};
testLOV.setInputParameterTypes(as);
The values are being fetched properly.
Please help in solving this issue. Am I missing any thing?
Thanks in Advance.
Regards,
Nisha
written by nisha , July 04, 2008
What you say is true. I tried and checked that earlier itself. But that will not validate the value at all.
But if you see the standard LOVs available like the DeliveryLOV or AccountLOV in the standard page, if you type any invalid value, that will not be set and you will not be able to come out of the field.
I checked the DeliveryLOV class, there also they have set true for required and validateFromLOV.
Once the valid value is set, the LOV is not invoked every time to exit out of the field.
I would like to have the similar effect. Kindly help.
Thanks & Regards
Nisha
written by Ritesh M , July 16, 2008
1) let the validatefromLOV set as FALSE
2) Create a procedure
-- Read the Value/selected to entered by user
-- pass that value to database and verify for its correctness...
-- if valid then use setNextFieldName(FN) to set the next field......
-- if invalid then display an error message to the user and place the control back to the current field only..
hope this will help
Regards,
Ritesh
written by Ritesh M , July 16, 2008
Thanks,
Ritesh
written by Pramod , July 17, 2008
I created method rell**entered which populates the LOV and I am calling this method in fieldEntered method. LOV works fine and brings all values when I press CTRL L. Now I am trying to bring values based on the value entered in the field. When I try to get user entered value using field.getValue(), it always returns null as field enreted will not have any value. How can I read this entered value and pass it to LOV query.
Regards,
Pramod
written by Pramod , July 20, 2008
Thanks. I will try your solution.
written by Srilakshmi B V , August 21, 2008
We have a requirement to hide an LOV field defined in the WIP Issue transaction page. We have created an extension and we are trying the below code - super.projectField.sethidden(true) in the page entered event. However we are getting unexpected error and the control goes back to the login page. Can you please advice on this? Are we missing something?
written by Srilakshmi B V , August 21, 2008
Thanks for your inputs. Below is the code. It prints the message up to - "Entered into ISSUE_SN1". After this it fails and returns to login page. It doenst log any other details. It is failing at projectField.setHidden(true) statement. Can you please help?
public class SerialMaterialPage_2 extends oracle.apps.wip.wma.page.SerialMaterialPage
implements MWAPageListener,MWAFieldListener
{
public SerialMaterialPage_2(Session session)
{
super(session);
UtilFns.error("session2");
addListener(this);
UtilFns.error("addListener2");
}
public void pageEntered(MWAEvent mwaevent)
throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException
{
super.pageEntered(mwaevent);
UtilFns.error("test pageEntered2");
String s = getOrgCode(session);
String s1 = (String)mwaevent.getSession().getValue("TXN.TXNTYPE");
UtilFns.error(s1);
if(s1.equals("ISSUE_SN"))
{
UtilFns.error("Entered into ISSUE_SN1");
projectField.setHidden(true);
UtilFns.error("out");
}
}
public void pageExited(MWAEvent mwaevent)
throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException
{
super.pageExited(mwaevent);
UtilFns.error("test pageExited");
}
public void fieldEntered(MWAEvent mwaevent)
throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException
{
//super.fieldEntered(mwaevent);
UtilFns.error("test fieldEntered");
}
public void fieldExited(MWAEvent mwaevent)
throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException
{
//super.fieldExited(mwaevent);
UtilFns.error("test fieldExited");
}
}
Thanks,
Sri
written by Srilakshmi B V , August 21, 2008
My answers to your questions are below -
1) We tried without the package public class SerialMaterialPage_2 extends SerialMaterialPage. However we were not able to navigate to the customized page eventhough we were importing the package.
2) We just wanted to check whether its getting triggered and messages were getting logged. However we were not able to see any of the messages from that method.
3) Can you please give me a sample code for getter methods usage in such a scenario?
Thanks for your help!
Sri
written by Srilakshmi B V , August 22, 2008
First of all, thanks for the help you are extending to us.
I checked the seeded source of ShipLPNPage and saw that there are getLpnFld and getDockDoorFld public methods defined in the page class which you are using in the extended class to access the fields. However the seeded class we are extending (SerialMaterialPage) doesnt have any such methods defined for accessing the fields. What should be our approach in that case?
Thanks,
Sri
written by Srilakshmi B V , August 22, 2008
Actually further analyzing the seeded sources, we found that there was getProjFld() method in one of the super classes. Hence we used this in the custom code as below-
UtilFns.error("Entered into ISSUE_SN2");
getProjFld().setHidden(true);
UtilFns.error("out");
But the project field is still getting displayed. However when we verify the log, we can see "Entered into ISSUE_SN2" and "out" messages. That means it has successfully parsed getProjFld().setHidden(true) code as well. Any inputs?
Thanks,
Sri
written by Srilakshmi B V , August 22, 2008
We are on 11.5.9 version. Hence personalization is not available for us. And we are calling super() first and then calling the piece of code for hiding.
Thanks,
Sri
written by Malar Selvam , October 28, 2008
I need to develop some Custom MWA Pages .
I am new to Oracle Mobile Web Applications. I deployed the Helloworld Application successfully and can access the Page. But the problem is the Text Field is coming as READ ONLY (NOT EDITABLE).
Also, I tried to create LOV Page, there also i am facing the following problem:
1) Instead of LOV, i am getting TextBox only.
2) The TextBox also NotEditable.
3) Also the Text Box is coming with the value >[7m[0m
Please help me out.
Regards.
A.Malar Selvam.
written by PrathapReddy K , October 29, 2008
I need to develop some Custom MWA Pages .
I am new to Oracle Mobile Web Applications. I deployed the Helloworld Application successfully and can access the Page. But the problem is the Text Field is coming as READ ONLY (NOT EDITABLE).
Also, I tried to create LOV Page, there also i am facing the following problem:
1) Instead of LOV, i am getting TextBox only.
2) The TextBox also NotEditable.
3) Also the Text Box is coming with the value >[7m[0m
Please help me out.
Regards.
written by PrathapReddy K , October 29, 2008
---------------------
package xxx.custom.server;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.mwa.beans.MenuItemBean;
import oracle.apps.mwa.container.Session;
import oracle.apps.mwa.eventmodel.MWAAppListener;
import oracle.apps.mwa.eventmodel.MWAEvent;
public class TestAppLpn extends MenuItemBean
implements MWAAppListener
{
public static final String RCS_ID = "$Header: TestAppLpn.java 120.0 2005/05/25 12:36:20 appldev Malar $";
public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: TestAppLpn.java 120.0 2005/05/25 12:36:20 appldev Malar $", "xxx.custom.server");
public TestAppLpn()
{
this.m_firstPageName = "xxx.custom.server.TestFnLpn";
addListener(this);
setMenuConfirmMessage("Go to menu");
}
public void appEntered(MWAEvent paramMWAEvent)
{
Session localSession = paramMWAEvent.getSession();
if (localSession.getObject("ORGID") == null)
{
localSession.putObject("MWA_FIRSTPAGENAME", this.m_firstPageName);
this.m_firstPageName = "oracle.apps.mwa.beans.OrganizationPageBean";
}
}
public void appExited(MWAEvent paramMWAEvent)
{
}
}
-------------------
written by PrathapReddy K , October 29, 2008
--------------------
package xxx.custom.server;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.mwa.beans.ButtonFieldBean;
import oracle.apps.mwa.beans.LOVFieldBean;
import oracle.apps.mwa.beans.PageBean;
import oracle.apps.mwa.container.Session;
import oracle.apps.mwa.eventmodel.AbortHandlerException;
import oracle.apps.mwa.eventmodel.MWAEvent;
import oracle.apps.mwa.eventmodel.MWAPageListener;
public class TestFnLpn extends PageBean
implements MWAPageListener
{
public static final String RCS_ID = "$Header: TestFnLpn.java 120.0 2005/05/25 12:53:41 appldev Malar $";
public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: TestFnLpn.java 120.0 2005/05/25 12:53:41 appldev Malar $", "xxx.custom.server");
public TestFnLpn(Session paramSession)
{
//setPrompt("Certification Page 3 (Testing long page title, Testing long page title, Testing long page title)");
addListener(this);
this.setPrompt("Drop Loaded LPN - 29-10-2008");
TestLisLpn localCertificationFieldHandler = new TestLisLpn();
LOVFieldBean localLOVFieldBean = new LOVFieldBean();
localLOVFieldBean.setName("CurTaskLov");
localLOVFieldBean.setPrompt("LPN : ");
String[] arrayOfString1 = { "C", "N", "N", "S" };
String[] arrayOfString2 ={" ", "ORGID", "EMPID", "xxx.custom.server.TestLpnFn.CurTaskLov", "TXN.PAGE_TYPE"};
localLOVFieldBean.setInputParameterTypes(arrayOfString1);
localLOVFieldBean.setInputParameters(arrayOfString2);
localLOVFieldBean.setValidateFromLOV(true);
localLOVFieldBean.setRequired(false);
localLOVFieldBean.setEditable(true);
localLOVFieldBean.setlovStatement("WMS_Task_Dispatch_LOV.GET_TASKS_LOV");
localLOVFieldBean.setSubfieldNames(new String[] { "status", "lpn", "task_type", "task_mo_status", "to_sub", "to_loc", "item", "qty", "uom_code", "lpn_id", "task_id", "lpn_context", "is_bulk_pick", "content_lpn" });
localLOVFieldBean.setSubfieldPrompts(new String[] { "S", "LPN", "Task_Type", "Status", "To_Sub", "To_Loc", "Item", "Qty", "UOM", "LPN_ID", "Task_ID", "LPN_Context", "Bulk", "Content_LPN" });
localLOVFieldBean.setSubfieldDisplays(new boolean[] { true, true, true, true, true, true, true, true, true, false, false, false, false, false });
addFieldBean(localLOVFieldBean);
ButtonFieldBean localButtonFieldBean1 = new ButtonFieldBean();
localButtonFieldBean1.setName("drop");
localButtonFieldBean1.setPrompt("Drop");
addFieldBean(localButtonFieldBean1);
localButtonFieldBean1.addListener(localCertificationFieldHandler);
localLOVFieldBean.addListener(localCertificationFieldHandler);
}
public void pageEntered(MWAEvent paramMWAEvent)
{
}
public void pageExited(MWAEvent paramMWAEvent)
throws AbortHandlerException
{
}
public void specialKeyPressed(MWAEvent paramMWAEvent)
{
}
}
-------------------
written by PrathapReddy K , October 29, 2008
----------------------
package xxx.custom.server;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.mwa.beans.FieldBean;
import oracle.apps.mwa.container.Session;
import oracle.apps.mwa.eventmodel.AbortHandlerException;
import oracle.apps.mwa.eventmodel.MWAEvent;
import oracle.apps.mwa.eventmodel.MWAFieldListener;
public class TestLisLpn implements MWAFieldListener
{
public static final String RCS_ID = "$Header: TestLisLpn.java 120.0 2008/10/28 04:11:19 appldev Malar $";
public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: TestLisLpn.java 120.0 2008/10/28 04:11:19 appldev Malar $", "xxx.custom.server");
public void fieldEntered(MWAEvent paramMWAEvent)
{
Session localTelnetSession = paramMWAEvent.getSession();
FieldBean localFieldBean = localTelnetSession.getCurrentPage().getCurrentFieldBean();
if (localFieldBean.getName().equals("drop"))
localTelnetSession.setStatusMessage("Drop is Working");
}
public void fieldExited(MWAEvent paramMWAEvent) throws AbortHandlerException
{
}
}
---------------------
The above are the classes what i wrote for LOV but it is simply returning read only TextField with the value ">[7m[0m"
Even I tried a sample with Simple TextBox. That also giving the same problem.
Please help me out.
Regards.
Prathap Reddy
written by Malar Selvam , October 29, 2008
Regards.
Malar.
written by Malar Selvam , October 30, 2008
Thank you very much for your support.
We have gone through your sample code and deployed it. But Whenever we access the page, it is simply returning to Change Responsibility & Change Organization Menu Page.
And again we tried to convert the page whatever you have given as per our requirement, this time the page is displaying. But the LOV is not coming, it is raising error - "Unsuccessfull row construction". From the Error, I guess some parameters are going as null. But i don't know how to track the Parameter Values. Also, I don't know where the Error Log is Stored and how to access it.
public void userl**entered(MWAEvent mwaevent) throws AbortHandlerException,
InterruptedHandlerException,
DefaultOnlyHandlerException {
UtilFns.trace("User LOV Entered");
try {
Session session = mwaevent.getSession();
//set the package and procedure name to be called
pg.getUserLOV().setlovStatement("WMS_Task_Dispatch_LOV.GET_TASKS_LOV");
UtilFns.trace("Value of pg.getUserLOV() " + pg.getUserLOV());
//Parameter Type, parameters and Prompts of the field in LOV
String paramType[] = { "C", "N", "N", "S" };
String parameters[] = {" ", "ORGID", "EMPID", "xxx.custom.lpn.lovtest.CustomTestPage.TEST.LOV", "TXN.PAGE_TYPE"};
String prompts[] = { "S", "LPN", "Task_Type", "Status", "To_Sub", "To_Loc", "Item", "Qty", "UOM", "LPN_ID", "Task_ID", "LPN_Context", "Bulk", "Content_LPN" };
boolean flag[] = { true, true, true, true, true, true, true, true, true, false, false, false, false, false };
pg.getUserLOV().setInputParameterTypes(paramType);
pg.getUserLOV().setInputParameters(parameters);
pg.getUserLOV().setSubfieldPrompts(prompts);
pg.getUserLOV().setSubfieldDisplays(flag);
} catch (Exception e) {
UtilFns.error("Error in calling LOV");
}
}
The above is the Code, given by you which has been modified as per our requirement.
Please help us to track what may be the cause?
Also, Kindly help us, how to track the parameter values, how to access the Error Log file and where it will be placed.
Regards.
Malar.
written by Malar Selvam , October 30, 2008
Thank you very much for your valuable comment. What u said is exactly right. The problem is difference in Number of Parameter Type & Number of Parameters only.
Thanks a lot.
REgards.
Malar.
written by Malar Selvam , November 11, 2008
I am trying to load one lov in my mobile web application custom page. It is raising error - Unsuccessful row construction.
I tracked the problem, whenever we assing the LOV (pg.getUserLOV().setlovStatement("XXX_MWA_LOV_TEST.XXX_USERS_LOV")) to the LOV Bean it is raising the error.
Please help me out how to assign the Oracle Stored Procedure in LOV.
I paste below the code.
------------------------------------------------------------------
try {
Session session = mwaevent.getSession();
//set the package and procedure name to be called
pg.getUserLOV().setlovStatement("XXX_MWA_LOV_TEST.XXX_USERS_LOV");
UtilFns.error("LOV Assigned");
UtilFns.trace("Value of pg.getUserLOV() " + pg.getUserLOV());
//Parameter Type, parameters and Prompts of the field in LOV
String paramType[] = { "C", "AS" };
String parameters[] = { " ", "S%" };
String prompts[] = { "USER_ID", "User Name", "Description" };
boolean flag[] = { false, true, true };
UtilFns.error("Parameter Types & Parameters Defined");
pg.getUserLOV().setInputParameterTypes(paramType);
pg.getUserLOV().setInputParameters(parameters);
pg.getUserLOV().setSubfieldPrompts(prompts);
pg.getUserLOV().setSubfieldDisplays(flag);
UtilFns.error("Parameters & its types assigned");
} catch (Exception e) {
UtilFns.error("Error in calling LOV");
}
------------------------------------------------------------------
pg.getUserLOV().setlovStatement("XXX_MWA_LOV_TEST.XXX_USERS_LOV"); //Here it is raising the error.
I paste below the Oracle Stored Procedure:
/* Formatted on 2008/11/11 15:22 (Formatter Plus v4.8.
*/ CREATE OR REPLACE PACKAGE APPS.XXX_MWA_LOV_TEST
AS
TYPE T_REF_CSR IS REF CURSOR;
PROCEDURE XXX_USERS_LOV (
X_USERS OUT NOCOPY T_REF_CSR,
P_USER_NAME IN VARCHAR2
);
END XXX_MWA_LOV_TEST;
/
CREATE OR REPLACE PACKAGE BODY APPS.XXX_MWA_LOV_TEST
AS
PROCEDURE XXX_USERS_LOV (
X_USERS OUT NOCOPY T_REF_CSR,
P_USER_NAME IN VARCHAR2
)
IS
BEGIN
OPEN X_USERS FOR
SELECT USER_ID, USER_NAME, DESCRIPTION
FROM FND_USER
WHERE USER_NAME LIKE P_USER_NAME;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE ('ERROR IN USER LOV ' || SQLERRM);
END XXX_USERS_LOV;
END XXX_MWA_LOV_TEST;
/
---------------------------------------------
If, i use direct query, the lov is working fine. But i should use Oracle Stored Procedure, since we are doing process and depending upon the result of process we are running specific query.
Regards.
Malar.
written by PrathapReddy K , November 13, 2008
Please helpme out.I am placing the source below.
public void userl**entered(MWAEvent mwaevent) throws AbortHandlerException,
InterruptedHandlerException,
DefaultOnlyHandlerException {
try {
Session session = mwaevent.getSession();
//set the package and procedure name to be called
pg.getUserLOV().setlovStatement("XXX_MWA_LOV_TEST.XXX_USERS_LOV");
UtilFns.error("LOV Assigned");
UtilFns.trace("Value of pg.getUserLOV() " + pg.getUserLOV());
//Parameter Type, parameters and Prompts of the field in LOV
String paramType[] = {"C"};
String parameters[] = {" "};
String prompts[] = { "USER_ID", "User Name", "Description" };
boolean flag[] = { false, true, true };
UtilFns.error("Parameter Types & Parameters Defined");
pg.getUserLOV().setInputParameterTypes(paramType);
pg.getUserLOV().setInputParameters(parameters);
pg.getUserLOV().setSubfieldPrompts(prompts);
pg.getUserLOV().setSubfieldDisplays(flag);
UtilFns.error("Parameters & its types assigned");
} catch (Exception e) {
UtilFns.error("Error in calling LOV");
}
}
public void userl**exited(MWAEvent mwaevent) throws AbortHandlerException,
InterruptedHandlerException,
DefaultOnlyHandlerException {
UtilFns.trace("User LOV Exited");
try {
Vector v = pg.getUserLOV().getSelectedValues();
if (v != null) {
UtilFns.trace("first " + v.elementAt(0).toString());
UtilFns.trace("second " + v.elementAt(1).toString());
UtilFns.trace("third " + v.elementAt(2).toString());
}
pg.getUserLOV().setValue(v.elementAt(1).toString());
} catch (Exception e) {
UtilFns.error("Error in processing LOV");
}
}
Modified Package
-----------------------
/* Formatted on 2008/11/13 11:58 (Formatter Plus v4.8.
*/ CREATE OR REPLACE PACKAGE APPS.XXX_MWA_LOV_TEST
AS
TYPE T_REF_CSR IS REF CURSOR;
PROCEDURE XXX_USERS_LOV (
X_USERS OUT NOCOPY T_REF_CSR,
P_USER_NAME IN VARCHAR2
);
END XXX_MWA_LOV_TEST;
/
CREATE OR REPLACE PACKAGE BODY APPS.XXX_MWA_LOV_TEST
AS
PROCEDURE XXX_USERS_LOV (
X_USERS OUT NOCOPY T_REF_CSR,
P_USER_NAME IN VARCHAR2
)
IS
BEGIN
OPEN X_USERS FOR
SELECT USER_ID, USER_NAME, DESCRIPTION
FROM FND_USER
WHERE USER_NAME LIKE 'S%';
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE ('ERROR IN USER LOV ' || SQLERRM);
END XXX_USERS_LOV;
END XXX_MWA_LOV_TEST;
/
Thanks--
PrathapReddy
written by PrathapReddy K , November 13, 2008
Thanks for the quick response.
I have modified the PLSQL procedure so that it has only one parameter that is the OUT parameter.
Even still I am facing the same old "Unsuccessful row construction" Problem.
Please help me out to overcome this issue.
below is the modified PLSQL package.
/* Formatted on 2008/11/13 11:58 (Formatter Plus v4.8.
*/ CREATE OR REPLACE PACKAGE APPS.XXX_MWA_LOV_TEST
AS
TYPE T_REF_CSR IS REF CURSOR;
PROCEDURE XXX_USERS_LOV (
X_USERS OUT NOCOPY T_REF_CSR
);
END XXX_MWA_LOV_TEST;
/
CREATE OR REPLACE PACKAGE BODY APPS.XXX_MWA_LOV_TEST
AS
PROCEDURE XXX_USERS_LOV (
X_USERS OUT NOCOPY T_REF_CSR
)
IS
BEGIN
OPEN X_USERS FOR
SELECT USER_ID, USER_NAME, DESCRIPTION
FROM FND_USER
WHERE USER_NAME LIKE 'S%';
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE ('ERROR IN USER LOV ' || SQLERRM);
END XXX_USERS_LOV;
END XXX_MWA_LOV_TEST;
/
Thank--
PrathapReddy
written by PrathapReddy K , November 13, 2008
I posted the source in the fourm, with the subject name "LOV Problem - Unsuccessful row construction".
Plese have a look.
Thanks--
Prathapreddy
written by Mit , March 03, 2009
I am reating new custom MSCA form and creating LOV as per your method but having chanllange in passing the cusrrent field value to filer the LOV values beofre dispay for example you have use "S%", instead of which I want to pass the value user already entered in the firls but unable to refer the value.
I have tried (string)session.getvalue("") also tried passing "oracle.apps.inv....XxCustomPage.XX_FIELDNAME" but all are showing null in the debug/trace.
The real code looks like
public void cchdrl**entered(MWAEvent mwaevent) throws AbortHandlerException,
InterruptedHandlerException,
DefaultOnlyHandlerException {
UtilFns.trace("CC Header LOV Entered");
try {
ses = mwaevent.getSession();
pg = (XxCycleCountPage)ses.getCurrentPage();
pg.getCcHeaderFld().setName("XXAMW.CYC_CNT_HDR");
ses.setRefreshScreen(true);
pg.getCcHeaderFld().setValidateFromLOV(true);
//set the package and procedure name to be called
pg.getCcHeaderFld().setlovStatement("xxamw_mwa_cc_lovs_pkg.cc_header_lov");
//Parameter Type, parameters and Prompts of the field in LOV
// C – cursor, AS/S – String, N – Numeric, AN - AlphaNumeric
String paramType[] = { "C", "AS", "AS" };
//System.out.println("pg.getCcHeaderFld().getValue().toString() = " + pg.getCcHeaderFld().getValue().toString());
String parameters[] =
{ " ", sorg, (String)pg.getCcHeaderFld().getValue() }; // I need help here to pass the value
//Set the prompts and visible fields for LOV result table
//We don’t want user id to be displayed in result table. So we //are setting it to false.
//These fields directly map to the selected columns in SELECT //statement of REF CURSOR
String prompts[] = { "CC Header ID", "CC Hedaer Name" };
boolean flag[] = { false, true };
//Associate the properties to the LOV bean
//Properties for SQL Query
pg.getCcHeaderFld().setInputParameterTypes(paramType);
pg.getCcHeaderFld().setInputParameters(parameters);
//Properties for LOV Result Table
pg.getCcHeaderFld().setSubfieldPrompts(prompts);
pg.getCcHeaderFld().setSubfieldDisplays(flag);
} catch (Exception e) {
UtilFns.error("Error in calling LOV");
}
}
Regards
Mithun
written by Siddhi Dwivedi , July 21, 2009
I am facing one issue related to LOV.
I have created an LOV.In which i am able to get the list of value and I can select any value from the LOV.
But instead of selecting value from LOV if I am entering value from keyboard and click on enter it opens LOV.
Please advise.
Thanks & Regards,
Siddhi
written by Siddhi Dwivedi , July 21, 2009
Thanks for the prompt response.
I have used this API in my code.
So I have to set it as LOV.setValidateFromLOV(false);
or I should have to comment this in my code.
Thanks & Regards,
Siddhi
written by Siddhi Dwivedi , July 21, 2009
My requirement is to validate values from LOV also.
User can either select value from LOV or if user knows the input value can directly enter value and perform next operation.
On entering correct value LOV should not get populated.It should get populate only on cntrl+L like LPN LOV or other standard LOVs used in WMS coding.
In case user enters incorrect value it should not let him perform next operation.
Please advise.
Thanks & regards,
Siddhi
written by Anju , July 29, 2009
I have to do a validation on Item field.
So i made "mItemFld.setValidateFromLOV(false)".
In that case, if I manually type the complete item like 'MPC3500' which is present in the Item LOV, the seeded functionality like displaying description does not work.
If Ii do a CTRL L and then select MPC3500 from the List, the seeded functionality like displaying description works fine.
Could you please advice on this.
Thanks,
Anjana.
written by Anju , July 29, 2009
Item LOV query will return sub fields like description etc.
This is in the Next field.
Thanks,
Anjana.
written by srini p , September 29, 2009
I am trying to load one lov in my mobile web application custom page. It is raising error - Unsuccessful row
construction. I have called XXX_MWA_LOV_TEST.XXX_USERS_LOV procedure outside and got 7 records.
I tracked the problem, whenever we assigning the LOV (pg.getUserLOV().setlovStatement
("XXX_MWA_LOV_TEST.XXX_USERS_LOV")) to the LOV Bean it is raising the error.
Please help me out.
-----------------------------------------------------------
Here follows Oracle Procedure
----------------------------------------------------------
PROCEDURE XXX_USERS_LOV (x_users OUT NOCOPY SYS_RefCursor
)
IS
BEGIN
OPEN x_users FOR
select user_id,user_name,description
from fnd_user
where user_name like 'SP%';
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('ERROR IN USER LOV '|| SQLERRM);
END XXX_USERS_LOV;
END XXX_MWA_LOV_TEST;
-----------------------------------------------------------
Here follows Java Code
-----------------------------------------------------------
public void userl**entered(MWAEvent mwaevent) throws AbortHandlerException, InterruptedHandlerException,
DefaultOnlyHandlerException
{
UtilFns.trace("User MWA LOV Entered");
try{
Session session = mwaevent.getSession();
//set the package and procedure name to be called
pg.getUserLOV().setlovStatement("APPS.XXX_MWA_LOV_TEST.XXX_USERS_LOV");
//Parameter Type, parameters and Prompts of the field in LOV
// C – cursor, AS/S – String, N – Numeric, AN - AlphaNumeric
//int wshOrg = 87;
//String paramType[] = { "AS", "N","C" };
// String parameters[] = {"FED%","87"," " };
//Set the prompts and visible fields for LOV result table
//We don’t want user id to be displayed in result table. So we //are setting it to false.
//These fields directly map to the selected columns in SELECT //statement of REF CURSOR
//CARRIER_NAME,CARRIER_ID,SCAC_CODE
String paramType[] = {"C"};
String parameters[] = {" "};
//Set the prompts and visible fields for LOV result table
//We don’t want user id to be displayed in result table. So we //are setting it to false.
//These fields directly map to the selected columns in SELECT //statement of REF CURSOR
//USER_ID,USER_NAME,DESCRIPTION
String prompts[] = { "USER_ID", "USER_NAME" };
boolean flag[] = { false,true};
// String prompts[] = { "CARRIER_ID", "CARRIER_NAME" };
//boolean flag[] = { false,true};
//Associate the properties to the LOV bean
//Properties for SQL Query
pg.getUserLOV().setInputParameterTypes(paramType);
pg.getUserLOV().setInputParameters(parameters);
//Properties for LOV Result Table
pg.getUserLOV().setSubfieldPrompts(prompts);
pg.getUserLOV().setSubfieldDisplays(flag);
}
catch(Exception e){
UtilFns.error("MWA Error in calling LOV " + e.toString());
}
}
----------------------------------------------------------
Here follows INV LOG
-----------------------------------------------------------
[Tue Sep 29 11:21:52 EDT 2009] (Thread-12) MWA Error in calling LOV java.lang.NullPointerException
[Tue Sep 29 11:22:25 EDT 2009] (Thread-12) Error in processing LOV
[Tue Sep 29 12:05:51 EDT 2009] (Thread-14) MWA Error in calling LOV java.lang.NullPointerException
--------------------------------------------------------------------
written by srini p , September 30, 2009
Thanks for your prompt reply. Now I changed procedure to REF CURSOR and has no parameters except
out parameter Cursor. Again I executed procedure outside and got 7 records as expected. Still I am getting "Unsuccessful row construction." error through mobile. I checked at system log and got this information.
------------------------------------------------------------------------------------------------
System Log
------------------------------------------------------------------------------------------------
[Tue Sep 29 10:18:01 EDT 2009] (Thread-17) MWA_LOV_ROW_CONS_FAIL: Unsuccessful row construction
java.lang.NullPointerException
at oracle.apps.mwa.container.LOVRuntimePageHandler.pageEntered(LOVRuntimePageHandler.java:89)
at oracle.apps.mwa.container.StateMachine.callListeners(StateMachine.java:1666)
at oracle.apps.mwa.container.StateMachine.handleEvent(StateMachine.java:1067)
at oracle.apps.mwa.presentation.telnet.PresentationManager.handle(PresentationManager.java:1261)
at oracle.apps.mwa.presentation.telnet.ProtocolHandler.run(ProtocolHandler.java:820)
-------------------------------------------------------------------------------------------------
But I successfully test your TextFieldBean example.
By any chance. Do you have complete code exampe for CustomLov. I want to try this.
Thanks in Advance.
Srini.
written by Manohar Baddam , March 10, 2010
Is it possible to default the LOV value and skip the navigation of this LOV field.
Thank you
written by Manohar Baddam , March 10, 2010
Thanks a ton for the quick response...I greatly appreciate your contribution to the Oracle Apps Community.
Skipping means I need to default some valid value in the LOV and bring the cursor to next field Instead of going into LOV and hitting ctr+l/tab/enter.
Thanks & Regards
Manohar
written by Manohar Baddam , March 10, 2010
Thanks for the code...it will definitely help me...
Let me be clear with the requirements...
Actually I have a requirement wherein when I enter into the page: Materials & Mfg --> Reciepts --> Deliver --> PO
after entering the PO number, Line number and Item Name when I hit tab the Project and Task LOV fileds should get populated if there is only one value without taking the user input (enter/ctlr+l) and then the cursor should directly jump from Item Name to SubLoc or any other field.
If I have multiple projects and tasks then I need the navigation going through those fields which enables the user to select the value.
I hope I am making sense...Please help me by suggesting the approach..
Waiting for your valueble reply
Thanks
Manohar Baddam
written by Manohar Baddam , March 11, 2010
Thanks for the update....
I am able to catch in the ItemExit listener and default the Project...after doing that I have setted session.setnextfield SunInv, but still the navigation is going into ProjectLOv, tried a lot to achieve this but no success.
One more question do we have any function to count number of values in the LOV, also return the refcursor value in the LOV using just a function call.
Thanks & Regards
Manohar Baddam
written by Stelios , May 26, 2010
As an example when I am requesting the delivery LOV I would like to know if his has passed a partial value (all the deliveries starting from "406").
public void DEL_LOV_Entered(MWAEvent mwaevent) throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException
{
UtilFns.trace("User LOV Entered");
try{
XX_AssigntoTrip.ses = mwaevent.getSession();
//set the package and procedure name to be called
pg.getDEL_LOV().setlovStatement("XXINTER_MWA.XXINTER_DEL_LOV");
String p_org_id = (String) XX_AssigntoTrip.ses.getObject("ORGID");
UtilFns.trace("User LOV Entered: Pass org id:" + p_org_id);
// I do not know how to get the partial value entered in delivery
String p_delivery = pg.mDEL_LOV.getValue();
UtilFns.trace("Value of pg.getDEL_LOV() " + p_delivery);
//Parameter Type, parameters and Prompts of the field in LOV
// C cursor, AS/S String, N Numeric, AN - AlphaNumeric
String paramType[] = {"C", "AN","AN" };
String parameters[] = {" ",p_org_id ,p_delivery}; //orgid
//These fields directly map to the selected columns in SELECT //statement of REF CURSOR
String prompts[] = { "Delivery" };
boolean flag[] = { true };
//Associate the properties to the LOV bean
//Properties for SQL Query
pg.getDEL_LOV().setInputParameterTypes(paramType);
pg.getDEL_LOV().setInputParameters(parameters);
//Properties for LOV Result Table
pg.getDEL_LOV().setSubfieldPrompts(prompts);
pg.getDEL_LOV().setSubfieldDisplays(flag);
}
catch(Exception e){
UtilFns.error("Error in calling LOV");
}
}
written by Stelios , May 27, 2010
The above snippet is in the Listener Class.
Regarding the first question I was trying to capture the data that has been input by the user before calling the LOV. I am trying to capture the data that the user has input in the LOV before pressing the CNTRL-L to get the list value. Is that possible ?
As regard the second question please let me know where I am re-initialize the LOV again? Which is the statement ?
Regards,
Stelios
written by Stelios , May 28, 2010
======================================================= ===
String p_delivery = pg.mDEL_LOV.getValue();
UtilFns.trace("Value of pg.getDEL_LOV() " + p_delivery);
======================================================= ===
is the following:
xxinter.custom.server.XX_AssigntoTripFListener.DEL_LOV
Regards,
Stelios
written by Stelios , May 28, 2010
As an example we know that an event is fired when a user is entered in a field ("fieldEntered").
written by Stelios , May 31, 2010
The userl**exited() could not fulfill my requirement as this method is called when the value selected the value from the LOV. I would like to get the data the user is typed in before calling the LOV.
Let us assume that the user wants to get all the deliveries that start from "416%" and some other time wants all the deliveries that started from "478%". His partially entered the values and he is expecting back in the LOV all the deliveries that started from these numbers.
Regards,
Stelios
written by Stelios , June 01, 2010
I am stacked.
This is the same question which I can see many times in the forum without finding any useful answer (for me).
If I am typing in some data in a "LOVFieldBean" (before calling the LOV procedure), how can I get/capture the data that I have typed in?
Is this possible ?
Regards,
Stelios
written by GirishNarne , September 20, 2010
I have built a custom wms page with two text fields, a Submit button and a Cancel Button. The two text fields are required fields and when I click on the Cancel button the cursor does not come out of the required field. But all the standard pages exit out of the page when the cancel button is clicked. Could you please let me know how to get the Cancel button functionality.
Thanks,
Girish.
written by shailendra singh , December 01, 2010
i am having problem with LOV ,the value i am entering is not able to get ,becouse the proble is i am calling
userl**entered function which is called just in pageEnetered event ,and i also need the paramere for calling package in this event ,please tell me how this can be done.
thanks,
shailendra
written by shailendra singh , December 01, 2010
the problem me and Stelios are getting are same.
Partial entered LOV data (how to get the data enetered before calling the LOV)
hello Stelios if u also solve the problem please answer
written by shailendrasingh , December 21, 2010
thanks
shailendra
written by alobato , January 14, 2011
i'm in a wip development and i need to do a wip personalization but is not the same like wms. i can't find the page or form where i do this changes. do you have any idea where can i do this personalization and look it in a telnet terminal?
thanks
written by Manjula Rani , March 07, 2011
I have extended MainPickPage and Main PickFListener files.
After extening, UOM Lov field is not working as expected. Can anyone help in resolving this.
xxdbdGSLMainPickPage.java
-------------------------------------------
public class xxdbdGSLMainPickPage extends MainPickPage//ConfigPage
implements ConfigConstants, DualUOMInterface, MWAPageListener
{
public xxdbdGSLMainPickPage(Session session)
throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException
{
super(session);
System.out.println("Inside custom MainPickPage");
}
public void pageEntered(MWAEvent mwaevent)
throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException
{
System.out.println("inside pageEntered");
super.pageEntered(mwaevent);
ButtonFieldBean buttonfieldbean = (ButtonFieldBean )getField("MAIN.DROP");
xxdbdGSLMainPickFListener mListener = new xxdbdGSLMainPickFListener();
buttonfieldbean.addListener(mListener);
}
public void pageExited(MWAEvent mwaevent)
throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException
{
super.pageExited(mwaevent);
}
}
xxdbdGSLMainPickFListener.java
-------------------------------------------
public class xxdbdGSLMainPickFListener extends MainPickFListener//xxdbdGSLTdFListener//TdFListener
{
public xxdbdGSLMainPickFListener()
{ super();
}
public void fieldEntered(MWAEvent mwaevent)
throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException
{
System.out.println("inside fieldEntered of Mainpickpage listerenr");
super.fieldEntered(mwaevent);
}
}
Thanks in advance.
written by Dhamayanthi , April 12, 2011
I have created XXP4URetailPOLOV and XXP4URetailPOLineLOV for this. Below are the code snippets. In POLINENumber field, if I press Ctl+ L it shows me " Unsuccessful row construction " but, If i manually type 1 in that coulmn, It gives me correct item as below.
LPN>2012
PO No>1001
Supplier: O3 Orange
PO Line No>1
Item
10343223 I set the below prompts and flags to get POLIneNumber LOV
public XXP4URetailPOLineLOV()
{
if(UtilFns.isTraceOn)
{
UtilFns.trace("XXP4URetailPOLineLOV: XXP4URetailPOLOV()");
}
setName("PO_LINE_NO");
setRequired(true);
setValidateFromLOV(true);
String resultPrompts[] = {"PO_LineNo", "PO_LineItem", "PO_LineId"};
boolean resultFlags[] = {true, true, false};
setSubfieldPrompts(resultPrompts);
setSubfieldDisplays(resultFlags);
addListener(this);
}
public XXP4URetailPOLineLOV(String paramString)
{
this();
if (paramString.equals("PO_LINE_POREV"))
{
setlovStatement("XXP4U_PO_REVERSAL_PKG.GET_RETURN_PO_LINE_LOV");
String inputParams[]={"C", "AN", "N"};
setInputParameterTypes(inputParams);
}
}
I set inputParameters as below in Listeners :
public void Po_Line_Entered(MWAEvent mwaevent)
{
XXP4URetailPOLOV poLov = pg.getPOFld();
if (UtilFns.isTraceOn)
{
UtilFns.trace("XXP4UReturnFListener - Inside -> Po_Line_Entered: ");
UtilFns.trace("XXP4UReturnFListener - Inside -> Po_Line_Entered: Header Id: " + poLov.getPOHeaderID());
}
pg.getPOLineNoFld().setInputParameters(new String[] {" ", poLov.getPOHeaderID(),
"oracle.apps.inv.rcv.server.XXP4UReturnPage.PO_LINE_NO"});
}
The procedure is as below:
PROCEDURE get_return_po_line_lov (
x_po_lov OUT NOCOPY t_genref,
p_po_hdr_id IN NUMBER,
p_po_line_num IN NUMBER
)
IS
--
lc_debug NUMBER := NVL (fnd_profile.VALUE ('INV_DEBUG_TRACE'), 0);
--
BEGIN
--
OPEN x_po_lov FOR
SELECT DISTINCT
pol.line_num,
msi.segment1,
pol.po_line_id
FROM po_lines_all pol,
mtl_system_items_b msi
WHERE
pol.po_header_id = p_po_hdr_id
AND pol.item_id = msi.inventory_item_id
ORDER BY pol.line_num;
END get_return_po_line_lov;
Appreciate your help on this.
Thanks.
written by Sergio , June 17, 2011
I have a problem when I try to show the textfieldbean on screen.
My code:
TextFieldBean cajaPrueba = new TextFieldBean();
cajaPrueba.setName("prueba");
cajaPrueba.setPrompt("Prueba: ");
cajaPrueba.setEditable(true);
cajaPrueba.addListener(listener);
addFieldBean(cajaPrueba);
The screen show this:
Prueba[:[7m[0m]
And I can't write in the textfield.
I don't know what could be the problem.
Can you help me?
Thanks and Regards,
Sergio
written by sahiti , November 02, 2011
I have read all your documentation regarding MSCA/MWA customization. They are all very valuable and thanks a ton for providing the information as Oracle itself doesn’t provide any documentation in the first place. I need a favor from you. I work for a company located in US and our business wants to customize the mobile Wip Material Issue form. I have looked at the structure for these forms (oracle.apps.wip.mwa.page.MaterialPage
) and it is not coded the same way as the other MSCA forms like traditionally there will be a Function,Page and Listener classes. For this form that I wanted to customize (oracle.apps.wip.mwa.page.MaterialPage
), I don’t see a listener class. I need to customize the item LOV on this page. Could you please provide me some examples for this? This page is also coded differently for ex, it has MaterialPageHandler, that handles all the LOV functionality. I tried customizing this based on the examples that were provided on your site and it didn’t work. I followed the example for lpn page and it didn’t work the same for me.
Any help would be appreciated. Thanks for your time.
Sahiti
written by sahiti , November 02, 2011
Please see below the definition of the page that I want to customize. As you can see, it says it implements MWAPageListener. Is this what I need to extend? Please advice!!
public class MaterialPage extends WMALotSerialPage
implements MWAPageListener
{
protected class MaterialPageHandler extends PageAdapter
{
private void initializeMessages(Session session)
{
}
}
}
Thanks!!
written by sahiti , November 02, 2011
public WMALotSerialPage(Session session)
{
addListener(new PageSetupHandler());
}
Also, in the MaterialPage, the fields on the page were added to different listeners. For ex, the first field Job is added to the below listener ‘FieldAdapter’.
lovfieldbean.addListener(new FieldAdapter())
Send Field item is added to listener ‘Itemhandler’ as below.
lovfieldbean1.addListener(new ItemHandler());
So, I am confused on which listener to customize.
Thanks!!
written by sahiti , November 02, 2011
Thanks!!
Sahiti
written by sahiti , November 02, 2011
Hmm..ok. What other options do I have here to customize this form? I can I customize the next listener QualityHandler.QualityParentPageHandler?
Thanks,
Sahiti
written by sahiti , November 02, 2011
QualityHandler$QualityParentPageHandler is defined as public static class. I think we are ok to customize this, right? So, I need to define a custom listener named QualityHandler$QualityParentPageHandler and add the custom LOV query to this listener, right? Does the syntax 'QualityHandler$QualityParentPageHandler' sounds alright to you?
Thanks!!
Sahiti
written by sahiti , November 02, 2011
In my previous post I meant XXQualityHandler$QualityParentPageHandler.
Thanks!!
Sahiti
written by sahiti , November 02, 2011
Ok, could you help me out with this then?
Thanks!!
Sahiti
written by sahiti , November 02, 2011
Please see below the info from log file.I have defined a custom menu which calls custom page XXSPMaterialPage.
Wed Nov 02 13:20:00 CDT 2011] (Thread-12) (SPTMSC) loadPage: done loading 'xxsp.custom.server.XXSPMaterialPage' (pageIx = 5, fieldIx = 0)
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) (SPTMSC) handleEvent: entering new page (pageIx = 5)
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) (SPTMSC) callListeners: executing 5 listeners, action = 0
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) (SPTMSC) callListeners: PageBean
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) Retrieving from AK - controller object type
racle.apps.wip.wma.util.WMAAKResourceTable AttributeCode:JOBPROMPT [Wed Nov 02 13:20:00 CDT 2011] (Thread-12) AK request returning:Job
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) Argument passed not of form Controller:Attribute
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) Retrieving from AK - controller object type:xxsp.custom.server.XXSPMaterialPage AttributeCode:JOBPROMPT
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) AK request returning:JOBPROMPT
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) Argument passed not of form Controller:Attribute
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) Retrieving from AK - controller object type:xxsp.custom.server.XXSPMaterialPage AttributeCode:ASSEMBLYPROMPT
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) AK request returning:ASSEMBLYPROMPT
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) Retrieving from AK - controller object type
racle.apps.wip.wma.util.WMAAKResourceTable AttributeCode:ITEMPROMPT [Wed Nov 02 13:20:00 CDT 2011] (Thread-12) AK request returning:Item
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) Argument passed not of form Controller:Attribute
.....................
......................
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) setCurrentFieldIndex: i = 0 = job
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) (SPTMSC) callListeners: executing 1 listeners, action = 0
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) (SPTMSC) callListeners: FieldBean
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) (SPTMSC) callListeners: fieldEntered() for job, Listener=oracle.apps.wip.wma.page.MaterialPage$1
[Wed Nov 02 13:20:00 CDT 2011] (Thread-12) (SPTMSC) handleEvent: done (pageIx = 5, fieldIx = 0, memory used = 8067136)
As u can see, it says exceuting 5 listeners and PageBean listener.
Thanks,
Sahiti
written by sahiti , November 02, 2011
Listener WMALotSerialPage.GenericCleanupHandler is defined as public. Do you think we can extend this one?
Thanks,
Sahiti
written by sahiti , November 03, 2011
Do you want me to send the full log file? Any thoughts on this?
Thanks,
Sahiti
written by sahiti , November 03, 2011
I am not sure how to even extend this listener WMALotSerialPage.GenericCleanupHandler? Could you guide me in the syntax or at least point to the documentation as this is different. I tried extending the custom listener to 'WMALotSerialPage$GenericCleanupHandler'. It's giving me syntax errors.
Thanks!!
Sahiti
written by sahiti , November 08, 2011
Just want to follow-up on extending the listener 'WMALotSerialPage$GenericCleanupHandler'. Do you have any pointers? I cannot find the syntax anywhere else.
Thanks,
Sahiti






I'm working on Oracle Apps 11i manf modules along with MSCA. I've created 4 custom MSCA forms. One of the problem that i experienced is the Field width....generally if you create a MSCA screen and include two fields 1) TextField 2) LOVBean the width of both of fields varies...you can enter the larger value but lovfield dispalys lesser width than TextField. I raised an TAR too..but couldn't find any solution for this. Is there any way to control the LOV filed Size.
Regards,
Ritesh