How set the values programatically in custom tables ?

Hi Guru's,
Please help me where i did mistake....
My scenario is i have 4 columns that 4 columns are look up based on row i need save the "XX_hr_Vacancies_CompTab"
4 columns look like....
column1(15 questions ) column2(message choice) column3(message choice) column4(free text)
(1-15)question manually select (1-10) manually select (1-10) comments
this vo purpose i am using this query
SELECT ROWNUM,
xhv.VACANCY_ID
, xhv.RFP_NO
, hl.lookup_code
, hl.meaning
, XJCT.BUHR_RATING
, XJCT.COMBEN_RATING
, XJCT.RATIONALE
FROM hr_lookups hl ,
xx_hr_vacancies xhv,
XX_JOBEVAL_COMP_TAB XJCT
WHERE lookup_type = 'XX_JE_QUESTIONAIRE'
AND xhv.RFP_NO = 'IRC616'
AND XJCT.VACANCY_ID(+) = XHV.VACANCY_ID
ORDER BY ROWNUM
I am using sample code is for one column inserting.....please help where i am doing mistake.
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
am.invokeMethod("createjobVacancy1");
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
if (pageContext.getParameter("Save") != null)
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject vacncyVO = (OAViewObject)am.findViewObject("XXTableLookupVO1");
int fetchedrowcount = vacncyVO.getRowCount();
RowSetIterator multiIter;
multiIter = vacncyVO.createRowSetIterator("VacancyId");//Attribite of the select box
multiIter.setRangeStart(0);
multiIter.setRangeSize(fetchedrowcount);
System.out.println("no before for loop condition rows"+fetchedrowcount);
for(int i=0;i<fetchedrowcount;i++)
am.invokeMethod("createjobVacancy1");
OAViewObject vacncyVO1 =
(OAViewObject)am.findViewObject("XX_hr_Vacancies_CompTab_EOVO1");
Object vacancy = vacncyVO.getRowAtRangeIndex(i).getAttribute("VacancyId"); */*63 Line code is this one*/*
System.out.println("vacancy number is in table region current row is "+vacancy);
System.out.println("no or rows"+fetchedrowcount);
if(vacancy != null && !"".equals("vacancy"))
vacncyVO1.getCurrentRow().setAttribute("VacancyId",vacancy);
System.out.println("set create vacancy number is in table region current row is "+vacancy);
}else{
vacncyVO1.getCurrentRow().setAttribute("VacancyId",null);
am.invokeMethod("apply1");
System.out.println("out of for loop :"+fetchedrowcount);
Sop:
13/01/10 06:55:28 no before for loop condition rows15
13/01/10 06:55:29 Header is =725
13/01/10 06:55:30 vacancy number is in table region current row is 616
13/01/10 06:55:30 no or rows15
13/01/10 06:55:30 set create vacancy number is in table region current row is 616
13/01/10 06:55:30 Header is =726
Error:
## Detail 0 ##
java.lang.NullPointerException
at xxsup.oracle.apps.per.jobevaluation.webui.MainCO.processFormRequest(MainCO.java:63)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
Regards,
Srinivas

Thanks Keerthi,
i am getting values but i unable to set the values, once i am setting values i am facing null pointer exception ..
java.lang.NullPointerException
     at xxsup.oracle.apps.per.jobevaluation.webui.MainCO.processFormRequest(MainCO.java:86)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
     at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
     at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
i am using below coding in PFR
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
if (pageContext.getParameter("Save") != null)
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject oaviewobject =(OAViewObject)am.findViewObject("XXTableLookupVO1");
if(oaviewobject!=null)
pageContext.writeDiagnostics(this,"View Object is exists",OAFwkConstants.STATEMENT);
int rowcountValue = oaviewobject.getRowCount();
pageContext.writeDiagnostics(this,"Row returned by the View Object"+rowcountValue,OAFwkConstants.STATEMENT);
System.out.println("before for loop geting values = "+rowcountValue);
Row rowAdv= oaviewobject.first();
RowSetIterator iterator = oaviewobject.createRowSetIterator("iterator");
iterator.setRangeStart(0);
iterator.setRangeSize(oaviewobject.getRowCount());
for(int i=0; i<iterator.getRowCount(); i++)
pageContext.writeDiagnostics(this,"Inside For loop ",OAFwkConstants.STATEMENT);
rowAdv =iterator.getRowAtRangeIndex(i);
if(rowAdv != null)
pageContext.writeDiagnostics(this,"flag not null",OAFwkConstants.STATEMENT);
pageContext.writeDiagnostics(this,"Flag Value Checked as Y",OAFwkConstants.STATEMENT);
OAViewObject vacncyVO1 =
(OAViewObject)am.findViewObject("XX_hr_Vacancies_CompTab_EOVO1");
if(rowAdv.getAttribute("VacancyId")!=null)
Object vacancyname = rowAdv.getAttribute("VacancyId").toString();
vacncyVO1.getCurrentRow().setAttribute("VacancyId",vacancyname); This is the 86 line
System.out.println("Vacancy ID IS = "+vacancyname);
System.out.println("Vacancy ID IS = "+rowAdv);
am.invokeMethod("apply1");
// System.out.println("out of for loop :"+iterator);
please help me where i am doing mistake...
Regards,
Srinivas

Similar Messages

  • How to set the value of MaxRow Property of DB Adapter 11g dynamically

    I have the following requirement:-
    i am using DB Adapter to connect with MsSQL server for fetching the records from the table by using simple Select Query in my DB adapter.
    1. Receive request from Web Service Client number of records as input to fetch records form MsSQL Server.
    2. Return the result set to the service consumer
    So, here i m using MaxRow Property of Database Adapter for the number of records to be returned. But the problem is that how i can set the value to the MaxRow Property of DB Adapter dynamically from the value received as input.
    If you have any other idea to return the records dynamically from MsSQL server .Please help me.

    If you are using the DB Adapter as a reference and as you said, you are using custom SQL i guess...
    you can use the sql like...
    select top 1 * from tablename, this will result only 1 row from database(top record)...
    or select top 5 percent * from tablename, if the rows in the database are 100, then it will return the top 5 records in the database...
    check the exact syntax of top command with sql server...but using top keyword should solve your purpose to limit the number of records....
    Hope this helps...
    Thanks,
    N

  • How do I set the value of a dynamic row text field

    I have a repeated row form which contains a button and multiple text fields.  There is a text field (Input Data Field) further up with some information I want to place in the table and multiple buttons that I want to read the value of and set to the table.  I apologize there are multiple questions I have and I am using pseudocode to describe it.
    Top form looks like
    InputField
    | ButtonX1 | ButtonY1 | DescriptionX1 (read only Text Field)
    | ButtonXn | ButtonY1 | DescriptionXn
    OutputRow looks like
    | ButtonOutput | OutputField1 | OutputField2 | OutputField3 |
    So I would like it to do
    ButtonX1.click
    OutputTable.OutputRow.addInstance(true)  //this works - everything else I have questions on
    OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue
    Question 1
    How do I address the location in each table to set a value
    Question 2
    How do I get the value of the description field in the same table and row as the button
    I would like to say something to the effect of  OutputTable.OutputRow[??].OutputField1.rawValue = this.parent.DescriptionX
    OutputTable.OutputRow.OutputField2 = InputField.rawValue
      Same question as above - how do I specify a dynamic row - is this the proper syntax for getting the value from the input field?
    OutputTable.OutputRow.OutputField3 = this.ButtonLabel
    Question 3
      How can I get the value of the button's label to set in the field
      There should be very many of these buttons and buttons will be added - I would prefer to set the value based on the button's label to make the value easier - not requiring changing the code
    Question 4 - unrelated to those above.
    Is it possible to build the first table
    | ButtonX | ButtonY | Description |
    from an XML File.  I have seen examples of how to build if it is just data, but can the XML be pushed into a form with code to do the above actions?

    Each object in a form must have a unique name. I doing so it is not neccessarily the name but the path or SomExpression associated with that object that must be unique. In your case you have a Table.Row.object configuration. The Row is the part that is repeating so to give each object a unique name an instance number is placed on the repeating part. So objects in the 1st row woudl be Table.Row[0].object...objects in the second row woudl be Table.Row[1].object etc .....You can see this by adding a debug instruction on the Enter event of the description field. Put the code app.alert(this.somExpression) and when you enter the field you will see what the somExpression is. Do this for a few rows and you will see the pattern (don't forget to remove the debug code from the enter event). Now you know what you have to use to address the fields. If no instance is given it is assumed to be 0 ..that is why only the 1st row is being affected.
    So now to answer your questions:
    Question1: The square bracket notation is an issue for javascript (this is the notation for an array) so we have to use a different means of addressing the field to include the instance number. So to address the Description in the 3rd row we woudl use:
    xfa.resolveNode("Table.Row[2].Description").rawValue = "This is my new description";
    Note that the instance number is 2 for the 3rd row because the instance numbers are 0 based.
    Question2. The resolveNode notation allows you to pass a string so you can also concatinate expressions to make the string. If you are writing code on a button in the same row you can get the instance that you are on by using the expression this.parent.index. The "this" portion refers to the current object (the button) and the parent.index gets you th eindex of the Buttons parent. If the button is embedded deeper in a hierarchy then you can continue to add parent indicators until you get back to the node that you want. So rewriting your expression from Q1 it woudl be:
    xfa.resolveNode("Table.Row[" + this.parent.index + "].Description").rawValue = "This is my new description";
    Question3: The buttons caption can be retrieved by using ButtonName.caption.value.text.value
    Question4: When you say build from an XML file. What are you expecting to come from the XML file? The caption that goes on the button? Typically the XML file carries data (not to say that it cannot carry other things). Just need a bit of clarification on this one first.
    Hope that helps
    Paul

  • How to set the Value in Dropdownbyindex

    Hi Experts,
    I am New to Webdynpro-ABAP.
    I have one Dropdownbyindex field. I need to set the value from BAPI. how to set that values in Dropdown..
             I need Basic step-by-step procedure.
    Regards,
    P.Manivannan

    Hi,
    1. First import the BAPI in to WD component using create->service call.
    2.The BAPI import, export and Table parameters will be set in to the Component Controller context.Then drag this BAPI node to your view.
    3.In the 'texts' property of DDbyindex bind the BAPI output node which will be the Table parameter of the BAPI.It could be under CHANGING node.
    4.In WDDOINIT method just click the code wizard and enter the method name which you will give when importing the BAPI.Automatically the values from the BAPI will be loaded into your Dropdown when you run the application.
    Regards,
    Dinesh

  • How enter the values in to table when create entries option is not working

    hi everyone,
         can u please tell me How enter the values in to table when create entries option is not working.
    it's urgent.
    thanking u all

    Hi Shree,
    how many entries u want to insert ,,
    is it a ztable or custom table ..
    just tell me ur clear requirement ..
    clarify the same ..
    if no options avaliable then if its less entries or some value u can do it through debugging ..
    if its bulk entries then u can write a program ..
    just let me know ..
    regards,
    VIjay

  • How to programmatically set the value to current Page layout property?

    Hi,
    How do I set any text value to the current page layout [comment] property and save it.....here my current page is using a custom page layout called spPageLayout1
    To be very much generalized how I can set and save any value to current page property programmatically....on load event I need to set the value.
    It is a publishing page layout.

    Hi,
    According to your post, my understanding is that you want to set the value to current Page layout property.
    To get current page property, you can refer to:
    How to get current Pages details in SharePoint2010 publishing site
    Get Content Field Value in Article Page
    To get current page layout property, you can refer to:
    PublishingPage.Layout Property (Microsoft.SharePoint.Publishing)
    PageLayout.Title Property (Microsoft.SharePoint.Publishing)
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to set coumn value for an ADF Table?

    Hi,
    I am currently using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. I have an ADF table in which I have a column created using View Object as Select one choice. I want to set the value(first time as selected one) in it which is coming from my second View Object. Can anyone please provide me sample code for the same?
    Thanks,
    Vik

    Hi,
    I have no idea what you are asking for. Did you try model driven List-of-Values defined for the attribute you want to update using a select one choice ? See this document http://www.oracle.com/technetwork/developer-tools/adf/learnmore/dec2010-otn-harvest-199274.pdf and look for how to create dependent list of values. Just follow the first part of it that explains how to create model driven LOV
    Frank

  • How to retrieve the values from PL/SQL table types.

    Hi Every one,
    I have the following procedure:
    DECLARE
    TYPE t1 IS TABLE OF emp%ROWTYPE
    INDEX BY BINARY_INTEGER;
    t t1;
    BEGIN
    SELECT *
    BULK COLLECT INTO t
    FROM emp;
    END;
    This procedure works perfectly fine to store the rows of employee in a table type. I am not able to retrieve the values from Pl/SQL table and display it using dbms_output.put_line command.
    Can anybody help me please!!!!!
    Thanks
    Ahmed.

    You mean, you can't add this
    for i in t.first..t.last loop
    dbms_output.put_line(t(i).empno||' '||t(i).ename||' '||t(i).job);
    end loop;or you can't add this
    set serveroutput onor maybe, you are working in third party application where dbms_output is not applicable at all?
    You see, not able like very similar it is not working - both are too vague...
    Best regards
    Maxim

  • How to set the status for a customer plan to RELEASED.

    Hello all,
    I created a program for mass creation of customer plans. But after the creation of a plan, the status should be set to released, so that the user can go about creating the trade promotions for the customer plan. Can anybody tell me how to set the status of a customer plan to RELEASED.
    Thanks,
    Disha.

    Hi Clemens,
    I am not talking about doing it in the CRM_UI transaction..I created a program..which would create the customer plans based on the planning account data provided. I was succesfull in creating the plans, but I am not knowing how to release it, if only anybody can tell me about a Function module or method, which can help me do this, that would be great
    Thanks,
    Disha.

  • How to set the value of something in a component from the main application?

    Hi,
    Maybe I've been working on this too long, but I can't figure
    out how to set the value of the text property of a text input field
    in a component from my main application in an mx:Script block. I
    have a component called Login in the components folder, and I need
    to set the text value of empNum. In my mxml declaration at that the
    top, I've declared these components as xmlns:c="components.*" So
    logically, the property I'm trying to set is c.Login.empNum.text. I
    can't figure out the correct syntax to get this to work, and I've
    tried everything I can think of. Does anyone have any suggestions?
    I'm thinking this should be an easy one, and I'm just missing
    something.
    Thanks!
    Holli

    Did you try giving it an id ?
    <c:MyLogin id="loginScreen" /c>
    So later you can do loginScreen .empNum.text = "my text"
    Laurent,

  • How to set the value of process variables/payload using a managed bean?

    Hello,
    Someone can give me an example about how to set the values of a process payload in a managed bean?
    thank you!

    Try this:
    jsf page:
    <af:selectOneChoice label="Select Suburb"
    requiredMessageDetail="Select a suburb"
    valueChangeListener="#{selectOneChoiceBean.onValueChanged}"
    validator="#{selectOneChoiceBean.validate}"
    unselectedLabel="None" autoSubmit="true"
    binding="#{selectOneChoiceBean.selectOneChoice}"
    value="#{selectOneChoiceBean.value}">
    <f:selectItems value="#{selectOneChoiceBean.selectionList}"/>
    </af:selectOneChoice>
    backing bean:
    public class SelectChoiceBean {
    private List<SelectItem> selectionList;
    private String value = "B";
    private RichSelectOneChoice selectOneChoice;
    public SelectChoiceBean() {
    initSelectionList();
    public void setSelectionList(List<SelectItem> selectionList) {
    this.selectionList = selectionList;
    public List<SelectItem> getSelectionList() {
    return selectionList;
    public void onValueChanged(ValueChangeEvent valueChangeEvent) {
    System.out.println(valueChangeEvent.getNewValue());
    // Add event code here...
    public void validate(FacesContext facesContext, UIComponent uIComponent,
    Object object) {
    // Add event code here...
    private void initSelectionList() {
    selectionList = new ArrayList<SelectItem>();
    selectionList.add(new SelectItem("A", "A label"));
    selectionList.add(new SelectItem("B", "B label"));
    selectionList.add(new SelectItem("C", "C label"));
    public void setValue(String value) {
    this.value = value;
    public String getValue() {
    return value;
    public void setSelectOneChoice(RichSelectOneChoice selectOneChoice) {
    this.selectOneChoice = selectOneChoice;
    public RichSelectOneChoice getSelectOneChoice() {
    return selectOneChoice;
    }

  • How to set the value in the xml node.

    Hi
    I am having the application PDF which can be submitted by user using the button. while submitting 
    i am using below code to set the value in the xml node.
       xfa.data.assignnode("employee.id","123",0):
    So its generating the xml like below.
    <employee>.
    <id>123</id>.
    </name>
    </employee>
    Now i need to generate the xml like  below.
    <employee id= "123" >
      </Name>
    </employee>
    So how to set/create the id node like above?
    Advance Thanks.
    Regards,
    Dhiyane

    Hi Dhiyane,
    You will have to set the contains property if the id node to "metaData", that is;
    xfa.data.assignNode("employee.id","123",0);
    xfa.data.employee.id.contains = "metaData";
    Very clumsy if you have a number of them, in which case you might want to look at using E4X.
    Good luck
    Bruce

  • How to set the value in SelectOneChoice

    Hi,
    I need an help....
    can anyone please tell me how to set the value in SelectOneChoice.
    I want to set the value at index 3
    i am trying selectOneChoice1.setvalue(new Integer(3)); but it is throwing an NullPointerException.
    Thanks,
    Neha

    Hi,
    is it ADF bound? If so then you set the default value to the list binding in the PageDef file. The value of the component must be bound to a method expression, which is why you see an exception. However, I think we need more information
    Frank

  • How can I set the value to a session bean from backing bean

    Hi Experts,
    How can I set the value to a session bean from backing bean where I have created getter and setter
    methods for that variable.
    Basically I am using ADFUtils class where I am able to get the value from session bean
    using following expression
    String claimType =
    (String)ADFUtil.invokeEL("#{ClaimValueObj.getClaimType}");
    Thanks
    Gayaz

    Gayaz,
    Wrong Post !!
    Post in JDeveloper and ADF
    Thanks
    --Anil                                                                                                                                                                                                                               

  • How to set the value to non enabled UDF fields

    Dear All,
    I created a UDF at titile level of PO and that UDF item always disabled (i.e oItem.Enabled=false). Now how can set a value through coding.
    I wrote like this:
    oForm = SBO_Application.Forms.GetFormByTypeAndCount(-142, 1);
                                oItem = oForm.Items.Item("U_Poap");
                                if (oItem.Enabled == false) { oItem.Enabled = true; }
                                oEdit = ((SAPbouiCOM.EditText)(oItem.Specific));
                                oEdit.Value = "1";
                                oItem.Enabled = false; 
    But system throws an error at : oItem.Enabled=true statement.
    How to solve issue.
    Thanks in advance
    Suresh Yerra

    Hi,
    You can set the values using datasource object
    oDBs_Head = objForm.DataSources.DBDataSources.Item("@TableName")
    oDBs_Head.SetValue("U_FieldName", 0, "Value")
    regards:
    SANDY
    Sandeep Saini | Roorkee | India on Dec 26, 2008 11:01 AM

Maybe you are looking for

  • Problem in hiding MessageStyledTextBean -- request for a quick response

    Hi, I am trying to hide a field that is of type MessageStyledText in CO using setRendered. I have got the id through page (XML). But, the CO is not able to identify that Id which is being given. The page has only field with the same prompt and type,

  • Help Flash Builder 4.5 keeps crashing

    !SESSION 2011-07-20 09:47:36.152 ----------------------------------------------- eclipse.buildId=I20100608-0911 java.version=1.6.0_16 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line argument

  • Laser Jet 1415fnw

    I have had this printer for about six months.  It will not print a test page but will print a demo page. It will not print anything using the black cartridge.  I have replaced the cartridges and it still will not print.  I have uninstalled the softwa

  • Oracle 9i Lite MDK installation problem

    Hi, We are trying to install Oracle 9i Lite MDK in Windows 2000 machine. The machine had Oracle 8.1.7.0 client earlier and now it has been uninstalled. During Installation process, it gets hung. When we investigate the error logs, It says "java.lang.

  • Concept similar to ServletContext available for WD?

    Hi, in standard J2EE web applications there is the ServletContext (als known as the predefined JSP-variable application) which can hold application specific data that can be accessed by any user session as long as the web application is running. In J