Creating a New Row Using an ADF Iterator Binding without primary key value

I dropped a Create action onto a DataAction which forwards to a UIX entry page which contains an enabled Commit button. Part of the primary key value is held in a session bean and it is also current in another view on the model side, but I am unable to access this value to set the EntityImpl primary key attribute.
Upon submission the following error message is returned from the model:
ORA-01400: cannot insert NULL into ("GTR"."EMPLOYMENT"."ACCOUNT")
I would like to accomplish this with databinding and not create a custom create method on the application model. Is there a way to update the binding value for the new row in cache before the submission? Any advice would be welcome.

I should add that I want the user to enter every attribute value, except for the account number. It must be possible to create a new row and have the account number supplied to the bindings another way.

Similar Messages

  • Need to create a new row in table with same data as Primary key, but new PK

    Hello Gurus ,
    I have a table with one column as primary key, I need to create a new row in the table, but with same data as in one of the rows, but with different primary key, in short a duplicate row with diferent primary key ..
    Any ideas of how it can be done without much complication?
    Thanks in advance for your reply.
    Reards,
    Swapneel Kale

    user9970447 wrote:
    Hello Gurus ,
    I have a table with one column as primary key, I need to create a new row in the table, but with same data as in one of the rows, but with different primary key, in short a duplicate row with diferent primary key ..
    Any ideas of how it can be done without much complication?
    Thanks in advance for your reply.
    Reards,
    Swapneel Kalesomething like
    insert into mytable values ('literal for new pk',
                                           select non-pk-1,
                                                    non-pk-2,
                                                    non-pk-n
                                           from mytable
                                           where pk-col = 'literal for existing pk')

  • How to use Oracle DB Sequence to Generate Primary Key Values?

    Dear Members,
    I am using Oracle JDev V 11.1.2.1.0 and Oracle 11g XE Database.
    I have followed the below steps:-
    1/ Created an EmployeesEO
    2/ Created an EmployeesVO
    3/ Created a JSPX Page
    4/ On the JSPX Page I have dragged the EmployeesVO and created it in ADF Table Format.
    On this page when I create a new record, I want to generate employee id automatically based on a sequence which is created in the database of the HR Schema.
    Please let me know how to achieve the above requirement.
    Many thanks in advance.
    Regards.

    check [url http://mjabr.wordpress.com/2011/03/11/make-sequence-number-as-default-value/]Set an attribute’s default value with a sequence number

  • Can we create a new row in a table using a down arrow

    Hi,
    I am using jdeveloper 11.1.1.6.
    For one of my project, I have a requirement where i need to create a new row in table using a down arrow. My client does not want to use mouse clicks. They want to use keyboard as much as possible.(Fast data entry).
    Is it possible to create a new row using down arrow. Any pointers will be helpful!
    Thanks,
    Umesh

    you can try this thing
    steps
    - capture downkey event - may b this help http://www.qualitycodes.com/tip/1/capturing-keys-with-javascript.html
    if not google more
    -then call from javascript call java method - https://blogs.oracle.com/jdevotnharvest/entry/how-to_call_server_side_java_from_javascript
    -then create new row of table VO .....

  • How to Create process of Type : Get Next or Previous Primary Key Value

    Hi,
    Can anybody give the steps how to create the page process for type Get Next or Previous Primary Key Value in oracle Express database
    Ramesh j c.

    Hi Justin,
    In oracle 10g XE , we have sample application v2.0
    1. Do you have any Document to create step by step the sample application v2.0 and Is it possible to create all the pages of this sample application v2.0 b by wizard. To recreate or create the demo app, start from the home area,
    next go to application builder,
    then click the create button,
    next choose "demonstration application"
    and then you can choose "Run | Edit | Re-install" the "Sample Application" along with a few other apps.
    2. When we install this sample application v2.0 , which is the sql script is executed or how it is installed. If you want the sample application you can export it after you create it if you want the SQL associated with it.
    3. Whenever the sample application v2.0 is installed, how the encrypted pass word is created for the user demo and admin. This is setup with the application install. I don't believe it is encrypted either. If your wanting SSL there are some threads on here that talk about encrypting content.
    Justin thanks for to create process Get Next or Previous Primary Key Value

  • How to create multiple new rows in ADF Table?

    Hello,
    being new to ADF Faces/BC I managed to display data in an ADF Table and create new entries using the "CreateInsert" operation (one at a time).
    Now, the next task is to create multiple new rows at the same time, set some default values and display the new rows in the ADF table. Then the user will enter additional data and commit the new rows.
    Where do I step in? In the EntitiyImpl? Can this be handled declaratively or do I have to implement custom method(s) in the AM?
    Thanks
    Gerald

    Hi John,
    I'm still getting the following error
    Error(94,144): method getValue() not found in class javax.faces.el.ValueBinding
    What should it be casted to?
    The code in backing bean is like this..
    package view.backing;
    //import com.test.model.TestAppModuleImpl;
    import javax.faces.component.html.HtmlForm;
    import javax.faces.component.html.HtmlPanelGroup;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ActionEvent;
    //import javax.faces.event.FacesListener;
    //import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.faces.component.core.data.CoreColumn;
    import oracle.adf.view.faces.component.core.data.CoreTable;
    import oracle.adf.view.faces.component.core.input.CoreInputText;
    import oracle.adf.view.faces.component.core.nav.CoreCommandButton;
    import oracle.adf.view.faces.component.core.output.CoreMessages;
    import oracle.adf.view.faces.component.html.HtmlBody;
    import oracle.adf.view.faces.component.html.HtmlHead;
    import oracle.adf.view.faces.component.html.HtmlHtml;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    //import oracle.jbo.server.ViewObjectImpl;
    //import view.utils.EL;
    public class MultipleInsert1 {
    private HtmlHtml html1;
    private HtmlHead head1;
    private HtmlBody body1;
    private CoreMessages messages1;
    private HtmlForm form1;
    private CoreTable table1;
    private CoreColumn column1;
    private CoreInputText inputText1;
    private CoreColumn column2;
    private CoreInputText inputText2;
    private CoreCommandButton commandButton1;
    private HtmlPanelGroup panelGroup1;
    private CoreCommandButton commandButton2;
    public void setHtml1(HtmlHtml html1) {
    this.html1 = html1;
    public void createMultiRows(ActionEvent actionEvent) {
    DCBindingContainer dc = (DCBindingContainer) FacesContext.getCurrentInstance().getApplication().createValueBinding("#{bindings}").getValue();
    DCIteratorBinding iter = dc.findIteratorBinding("TestView1Iterator");
    ViewObject vo = iter.getViewObject();
    for (int i=1; i<=5; i++) {
    Row newRow = vo.createRow();
    newRow.setAttribute("Id", i);
    ApplicationModule am = vo.getApplicationModule();
    am.getTransaction().commit();
    vo.executeQuery();
    Do I need to import something else?
    Thanks,
    Shri.

  • Problem creating a new row when using tabbed regions

    I am new to JHeadstart and ADF and have been using the evaluation version of JHeadstart (in JDev 11.1.1.3) to judge its efficacy for a new significantly-sized application. As part of that evaluation I have created a small application (you can do this with HR schema using say the Departments table) with a single entity and VO. On JHeadstart I have then placed some of the fields into multiple Item regions within a Tabbed region on the same page and below the Group (layout style Table, Table Overflow Style below With Splitter). Existing rows display fine and I can view the data on the separate tabs.
    However, if I try to create a row, I can fill in the data on the main region, but if I fill in data on the first tabbed region I cannot switch to the next tab without an error being generated.
    e.g. using Departments - fill in DepartmentId and DepartmentName on main region, fill in ManagerId on first tabbed region and try to switch to second tabbed region to fill in LocationId:
    Missing mandatory attributes for a row with key null of type HRModule.DepartmentsView1
    Attribute DepartmentId in HRModule.DepartmentsView1 is required.
    Attribute DepartmentName in HRModule.DepartmentsView1 is required.
    If you save, then you can navigate.
    You can also demonstrate something similar (different error message but probably the same root cause) on the myJHSTutorial demo. If you navigate to an employee off the regions page and try and create a new employee (using the '+' button below the 'Employees' label), then the tabs are not refreshed and any attempt to change the tabs results in an error
    Failed to validate a row with key oracle.jbo.Key[999 ] in HRModule.EmployeesView3
    Attribute Salary in HRModule.EmployeesView3 is required.
    Salary must be between 6000 and 12000 for this job.
    The JHS devguide does not help. Any thoughts? I can send the HR sample if you wish.

    OK, I was able to reproduce this. The problem is that when you switch tabs, a partial page request is send to the server which does not include the items filled in the table row itself, hence these items are not updated in the underlying view object row.
    Solution is to have a partial trigger at the table or group level listening to tab events. We will add that to the next release, but you can also apply the fix yourself by adding the following lines to the stackedRegionContainer.vm template:
    #if (${JHS.current.pageComponent.tableLayout} && !(${JHS.current.pageComponent.hasOverflowInline}))
    ## when creating a new row in a table, and using overflow right/below, when switching overflow tabs
    ## the items filled in the table itself must also be processed as part of JSF model update phase, to
    ## prevent required item error when clicking another tab in overflow area
    ## we can enforce this by making the whole group listen to tab events
    #ADD_CUR_GROUP_PARTIAL_TRIGGER("#REGION_ID()Tabs")
    #end
    Add these lines just before the line starting with
    <af:${elemName}
    Steven Davelaar,
    JHeadstart team.

  • Using the Form javascript.addrow() to pass values while creating a new row?

    Version: 4.1.0
    DB: 11g
    Theme- scarlet 21
    Hi,
    I have a standard tabular form with the add, delete, submit buttons. Now when we hit the Add button, it creates a new row in the form. I had a requirement such that the user selects a row using the standard checkbox and then when he hits add, it should create a new row, and also, copy the contents of the selected row to the new row.
    Is this possible? Any suggestions please? I am thinking that I need to create a pl/sql process under Add button to check if the checkbox is selected, and if yes, then maybe run the javascript addrow(not sure if it can be done) and then try to populate the values.
    Thanks!
    Sun
    Edited by: ryansun on Oct 4, 2012 12:34 AM
    Edited by: ryansun on Oct 4, 2012 12:46 AM
    Edited by: ryansun on Oct 4, 2012 12:46 AM

    Hi Joni,
    Thanks. I am not familiar with JQuery, is there some link where such a logic is implemented? Atleast a basic one of adding a new row, and traversing and capturing the values? In forms we could do it using cursor but not sure how to do it in Apex.
    In my case the requirement is straightforward. If there is a table with three rows and have a standard form in APEX with the add, delete and submit buttons along with the radio checkbox in a tabular form,
    If I select a row and then hit the add button, a new row should be added and the values of the previous row should be passed.
    Would you be having a link to any such demo or documentation on how this is done, would be very helpful.
    Thanks!
    Sun

  • How to create a new row for a VO based on values from another VO?

    Hi, experts.
    in jdev 11.1.2.3,
    How to create a new row for VO1 based on values from another VO2 in the same page?
    and in my use case it's preferable to do this from the UI rather than from business logic layer(EO).
    Also I have read Frank Nimphius' following blog,but in his example the source VO and the destination VO are the same.
    How-to declaratively create new table rows based on existing row content (20-NOV-2008)
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf
    I have tried:
    1.VO1(id,amount,remark1) and VO2(id,amount,remark2) are based on different EO,but render in same page,
    2.Drag and drop a Createwithparams button for VO1(id,amount,remark),
    3.add: Create insertinside Createwithparams->Nameddata(amount),
    4.set NDName:amount, NDValue:#{bindings.VO2.children.Amount}, NDtype:oracle.jbo.domain.Number.
    On running,when press button Createwithparams, cannot create a new row for VO1, and get error msg:
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: For input string: "Amount"
    java.lang.NumberFormatException: For input string: "Amount"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    Can anyone give some suggestions?
    Thanks in advance.
    bao
    Edited by: user6715237 on 2013-4-19 下午9:29

    Hi,CM,
    I'm really very appreciated for your quick reply! You know, today is Saturday, it's not a day for everyone at work.
    My principal requirement is as follows:
    1.select/check some rows from VO2, and for each selection create a new row with some attributes from VO2 as default values for VO1's corresponding attributes, and during this process the user may be cancel/uncheck or redo some of the selections.
    --so it's better to implement it in UI rather than in EO.
    2.it's better to implement this function with declarative way as in Frank Nimphius' blog.
    --little Jave/JS coding, the better. I only have experience in ORACLE FORMS, little experience in JAVA/JS.
    In order to get full information for the requirements of my use case, can take a check at:
    How to set default value for a VO query bind variable in a jspx page?
    (the end half of the thread: I have a more realworld requirement similar to the above requirement is:
    Manage bank transactions for clients. and give invoices to clients according to their transaction records. One invoice can contain one or many transactions records. and one transaction records can be split into many invoices.
    Regards
    bao
    Edited by: user6715237 on 2013-4-19 下午11:18
    JAVE->JAVA

  • How do you Copy a row to create a new row in the same table?

    Hi,
    We have a PurchaseOrderHeaderView object and on click of Copy Purchase Order we want to copy a row in PURCHASE_ORDER_HEADER table to create a new row. We don't want to copy the primary key only the remaining fields.
    Regards
    Madhuri

    If you use ADF BC, you can create a new row programatically via createRow and use a sequence to create the Id and use the "original" row (probably the current row in the view object) to copy the values from to newly created row. Then use insertRow and commit to create the copied row.
    Ronald

  • While creating a new row in table,the total data present in table is coming

    Hi,
    From search page,i click add button,it goes to next transaction page.In transaction page i drag and drop one VO in table and in form also.But in that transaction page,The table is coming with data and a new row is also able to insert.But i don't want the previous data whatever present in table in create a new row time.Please give me the solution.
    Thanks in advance
    Sravanthi

    Not sure I understand what you are trying to do.
    If you have a table and a form based on the same data on one page you see the already existing data in the table. If you don't want to see the existing data in the table while entering a new row, the simplest solution would be to
    a) hide the table after the use hits create new row or
    b) navigate to an other page which only shows the form
    Timo

  • Create a new Row in an advanced table in an advanced table

    Hi,
    I am handling the master detail relationship. For this i have used advanced table in an advanced table. I am facing a problem while creating a new row in the inner advanced table.
    I have a Display Sequence column in the inner advanced table. I want to handle the logic for displaying the value of this attribute. As per dev guide i have attached the view link and for handling the Add New row event i am using the below code
    OAAdvancedTableBean sublineDetailsTableBean = (OAAdvancedTableBean) webBean.findChildRecursive("SublineAdvTableRN");
    OATableFooterBean sublineTableFooterBean = (OATableFooterBean) sublineDetailsTableBean.getFooter();
    if (sublineDetailsTableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    This is working fine. The challenge i am facing is for creating a new row. Below is the code given in dev guide
    // get a handle to inner tableOATableBean innerTable =
    (OATableBean)webBean.findChildRecursive("InnerTableBean");
    // create an enumeratorOAInnerDataObjectEnumerator enum =
    new OAInnerDataObjectEnumerator(pageContext, innerTable);
    while (enum.hasMoreElements())
    RowSet innerRowSet = (RowSet) enum.nextElement();
    // get all rows
    Row []rowsInRange = innerRowSet.getAllRowsInRange();
    for (int i = 0; i < rowsInRange.length; i++)
    Row nextRow = (Row) rowsInRange;
    // In case you want to add new rows in this RowSet, you can do the same
    OARow newRow = (OARow) innerRowSet.createRow();
    // initialize value for some attribute and insert the row
    newRow.setAttribute("SomeAttr", "SomeValue");
    innerRowSet.insertRow(newRow);
    The Above code creates a new Row in all the master records.
    How do i identify that the add new Row event has been triggered for which master record?
    Can any body please help me on this. I am stuck from a long time and am unable to find the appropriate solution.
    Thanks in advance
    Raj Papdeja

    Hi,
    Following is the code written in PFR,
    OAAdvancedTableBean sublineDetailsTableBean = (OAAdvancedTableBean) webBean.findChildRecursive("SublineAdvTableRN");
    System.out.println("sublineDetailsTableBean::"+sublineDetailsTableBean);
    OATableFooterBean sublineTableFooterBean = (OATableFooterBean) sublineDetailsTableBean.getFooter();
    System.out.println("lineTableFooterBean::"+sublineTableFooterBean);
    if (sublineDetailsTableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    System.out.println("Inside Add New Row Button Event for the Sub Lines");
    strValueParam = (String) pageContext.getParameter(VALUE_PARAM);
    System.out.println("strValueParam=>"+strValueParam);
    ViewLink vl = am.findViewLink("GEPSCSTaskLineToSublineVL1");
    System.out.println("View Link=>"+vl);
    if(vl != null)
    OAViewObject vo = (OAViewObject) vl.getSource();
    if(null != vo)
    GEPSCSTaskLineItemsVORowImpl voRow =
    (GEPSCSTaskLineItemsVORowImpl) vo.getCurrentRow();
    Number LineNo = voRow.getLineNo();
    System.out.println("Source Row Line No::"+LineNo);
    /*OAViewObject vo = (OAViewObject) am.findViewObject("GEPSCSTaskLineItemsVO1");
    GEPSCSTaskLineItemsVORowImpl voRow = (GEPSCSTaskLineItemsVORowImpl) vo.getCurrentRow();
    Number LineNo = voRow.getLineNo();
    System.out.println("Line No::"+LineNo);*/
    // Getting the LineNo as null
    /*int intRowCount = vo.getRowCount();
    if(intRowCount > 0)
    System.out.println("Sublines are already present");
    GEPSCSTaskLineItemsVORowImpl tasklineVORow =
    (GEPSCSTaskLineItemsVORowImpl)vo.getCurrentRow();
    Number lineNo = (Number) tasklineVORow.getLineNo();
    System.out.println("LineNo=>"+lineNo);
    Number lastLineDispSequence = null;
    // Method to set the display sequence
    //am.invokeMethod("createNewSublineRow");
    // create an enumerator*/
    OAInnerDataObjectEnumerator enum =
    new OAInnerDataObjectEnumerator(pageContext, sublineDetailsTableBean);
    while (enum.hasMoreElements())
    RowSet innerRowSet = (RowSet) enum.nextElement();
    // get all rows
    Row []rowsInRange = innerRowSet.getAllRowsInRange();
    intRowCount = rowsInRange.length;
    System.out.println("intRowCount=>"+intRowCount);
    if(intRowCount == 0)
    System.out.println("No Rows present");
    OARow newRow = (OARow) innerRowSet.createRow();
    // initialize value for some attribute and insert the row
    newRow.setAttribute("DisplaySequence", new Number(1));
    innerRowSet.insertRow(newRow);
    else if(intRowCount > 0)
    System.out.println("Rows are already present");
    Row nextRow = (Row) rowsInRange[intRowCount-1];
    lastLineDispSequence = (Number) nextRow.getAttribute("DisplaySequence");
    OARow newRow = (OARow) innerRowSet.createRow();
    // initialize value for some attribute and insert the row
    newRow.setAttribute("DisplaySequence", new Number(lastLineDispSequence.intValue()+1));
    innerRowSet.insertRow(newRow);
    break;
    When i try to fetch the Line No which is the primary ID of the Parent VO, it always returns me the LineNO of the first Row and not of the parent row for which i have clicked the Add new Subline button of the Child record
    Number LineNo = voRow.getLineNo();
    System.out.println("Source Row Line No::"+LineNo);
    Is there any way to fetch the primary ID of the row for which i have selected the Add new Subline button
    Thanks
    Raj Papdeja

  • Create a new Row in VO

    Hi All
    How to create a new row in VO programatically
    I'm using jd 11.1.1.4
    I'm executing a VO and get a row, so I want to assign that row as a new row in the VO and store it in the data base table
    pls tell me how to do this.
    Thanx

    Hi,
    In your backing bean
    public void createRowMethod(){
    DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterBind= (DCIteratorBinding)dcBindings.get("voIterator");
    ViewObject vo = iterBind.getViewObject();
    Row rw = vo.createRow();
    //set the default attributes
    rw.setAttribute("attribute",value);
    vo.insertRow(rw);
    }

  • Crystal Reports XI - How  to create a new field using a formula field

    I'm quite new to CR, but have been learning quickly!
    I would like to know how to automatically create a new record/field based on another field in that row...
    I have a report showing the following data:
    Run Code     Start KM    Stop KM    Status 
    H2                 100            150           Partial
    H2                 150             155          Partial
    H2                 155             160          Partial
    S3                 120             150       Completed
    The status is generated by comparing the 'Start KM' and 'Stop KM' against fields in another table called 'Start Odo' and 'Stop Odo'
    In this example...
    H2 has 'Start Odo' and 'Stop Odo' values of 90 to 160, therefore there is still 90-100 to check.  The 'Start KM' and 'Stop KM'  is equal to the 'start Odo' and 'stop Odo' for S3, therefore it shows completed.
    My question is how do you create a formula field, which will add an entire row...displaying the values 90-100.
    I've been trying to use a conditional check in the 'Start KM' column, that sees if status is equal to partial than if start km is greater than start odo (Which is the reference km) then display the value of start odo in the new row. I'm stuck at how to create a new row.
    I want the final result to look like this...
    Run Code     Start KM    Stop KM    Status 
    H2                  90              100         Partial
    H2                 100             150          Partial
    H2                 150             155          Partial
    H2                 155             160          Partial
    S3                 120             150       Completed
    Any suggestions would be more than appreciated

    Hi Adi
    Looking at your examples it seems that you want to add a row to the existing recordset (rows fetched from the database).
    If it is the case (even if based on a formula) then you can not do it within crystal. Crystal is designed to display data and ideally it should not generate the new data.
    However, as per your requirement you can try to add this logic at database end. May be a command object within Crystal Reports can help you.
    Let me know if you do not understand anything.
    Regards
    Nikhil

  • Problem while creating a new row

    I am trying to create a new row in FulfillmentLineEntryResultVORowImpl which will be within the CheckAvailabilityOutputVORowImpl.
    For that I am trying to do the following coding and I am getting the "NullPointerException" while creating the "flrow".
    Please look in the code and suggest me the correct way.
    CheckAvailabilityOutputVOImpl outputVO = getCheckAvailabilityOutput1();
    CheckAvailabilityOutputVORowImpl outputRow = null;
    outputRow = (CheckAvailabilityOutputVORowImpl)outputVO.createRow();
    FulfillmentLineEntryResultVOImpl fle = getFulfillmentLineEntryResult1();
    FulfillmentLineEntryResultVORowImpl flrow = (FulfillmentLineEntryResultVORowImpl)fle.createRow();
    flrow.setErrorCode("26");
    fle.insertRowAtRangeIndex(0, flrow);
    and
    public CheckAvailabilityOutputVOImpl getCheckAvailabilityOutput1() {
    return (CheckAvailabilityOutputVOImpl)findViewObject("CheckAvailabilityOutput1");
    public FulfillmentLineEntryResultVOImpl getFulfillmentLineEntryResult1() {
    return (FulfillmentLineEntryResultVOImpl)findViewObject("FulfillmentLineEntryResult1");
    }

    Hi,
    I am using transient VO.
    The code that i mentioned earlier is to create the dummy response for the web service in error condition.
    For normal condition we are getting data from XML and by using readXML I am generating row nicely.
    The piece of code for normal scenario where it is working nicely is...
    Document doc = sendMessage("CheckAvailabilityInput", headerNode);
    CheckAvailabilityOutputVOImpl outputVO = getCheckAvailabilityOutput1();
    outputVO.readXML(doc.getDocumentElement(), -1, getXslForReadXML());
    if (AppsLogger.isEnabled(AppsLogger.FINE)) {
    Node headerNode1 = (XMLNode)outputVO.writeXML(-1, XMLInterface.XML_OPT_ALL_ROWS | XMLInterface.XML_OPT_ASSOC_CONSISTENT);
    try {
    Writer sw = new StringWriter();
    ((XMLNode)headerNode1).print(sw);
    } catch (IOException e) {
    AppsLogger.write(this.getClass(),
    "Couldn't convert the VO to xml",
    AppsLogger.FINE);
    outputRow = (CheckAvailabilityOutputVORowImpl)outputVO.getRowAtRangeIndex(0);
    And The xml that I am using is like below....
    <?xml version="1.0" encoding="utf-8"?>
    <checkAvailabilityOutput xmlns:op="http://xmlns.oracle.com/apps/scm/orderPromising/orderPromising/promisingServices/types/">
    <PromisingSystem>DOO-OP</PromisingSystem>
    <PromisingInstance>Instance</PromisingInstance>
    <PromiseDate>2012-08-22</PromiseDate>
    <FulfillmentLineEntryResult>
    <FulfillmentLineReply>
    <FulfillmentLineIdentifier>FID-003</FulfillmentLineIdentifier>
    <NumberOfAltOptions>0</NumberOfAltOptions>
    <DefaultAvailabilityOption>
    <OptionRank>0</OptionRank>
    <OptionSummary>0</OptionSummary>
    <FulfillmentLineResult>
    <FulfillmentLineIdentifier>FID-003</FulfillmentLineIdentifier>
    <TotalPrice>8000</TotalPrice>
    <TotalProfit>-392000</TotalProfit>
    <TotalMargin>-98</TotalMargin>
    <TotalValue>-392000</TotalValue>
    <NumberOfSplits>0</NumberOfSplits>
    <NumberOfSubstitutions>0</NumberOfSubstitutions>
    <FillRate>100</FillRate>
    <NumberOfAtpItems>1</NumberOfAtpItems>
    <NumberOfCtpItems>0</NumberOfCtpItems>
    <SourcingRule></SourcingRule>
    <ResultDetail>
    <SplitLineIdentifier></SplitLineIdentifier>
    <Customer>CUST_ID_001</Customer>
    <CustomerSite>CUST_SITE_001</CustomerSite>
    <InternalSalesOrderDestOrg>
    <OrgId></OrgId>
    </InternalSalesOrderDestOrg>
    <PromisingStatus></PromisingStatus>
    <RequestedDate>2012-06-02</RequestedDate>
    <PromisingType>Ship</PromisingType>
    <ExpectedArrivalDate>2012-06-01</ExpectedArrivalDate>
    <ExpectedShipDate>2012-06-01</ExpectedShipDate>
    <ExpectedPickDate>2012-06-01</ExpectedPickDate>
    <RequestedItem>ITEM_CODE_001</RequestedItem>
    <ExpectedAvailableItem>ITEM_CODE_001</ExpectedAvailableItem>
    <ExpectedAvailabilityOnRequestedDate>0</ExpectedAvailabilityOnRequestedDate>
    <ExpectedAvailableQuantity>200</ExpectedAvailableQuantity>
    <ExpectedAvailableQuantityUOM>EA</ExpectedAvailableQuantityUOM>
    <ExpectedShipFromOrg>
    <InstanceId></InstanceId>
    <OrgId>HYDERABAD</OrgId>
    </ExpectedShipFromOrg>
    <ExpectedDropShipSupplier></ExpectedDropShipSupplier>
    <ExpectedDropShipSupplierSite></ExpectedDropShipSupplierSite>
    <ExpectedMode></ExpectedMode>
    <ExpectedService></ExpectedService>
    <ExpectedCarrier></ExpectedCarrier>
    <CarrierCalendar></CarrierCalendar>
    <ExpectedDemandClass></ExpectedDemandClass>
    <ExpectedTotalFulfilmentCost>400000</ExpectedTotalFulfilmentCost>
    <ExpectedShippingCost>0</ExpectedShippingCost>
    <ExpectedMargin>-98</ExpectedMargin>
    <Price>8000</Price>
    <Profit>-392000</Profit>
    <Value>-392000</Value>
    <LineFillRate>100</LineFillRate>
    <ErrorCode></ErrorCode>
    <ErrorMessage></ErrorMessage>
    <PeggingDetail>
    <ItemId>ITEM_CODE_001</ItemId>
    <OrgInfo>
    <InstanceId></InstanceId>
    <OrgId>HYDERABAD</OrgId>
    </OrgInfo>
    <ShippingCalendar>Calendar1</ShippingCalendar>
    <ReceivingCalendar>Calendar2</ReceivingCalendar>
    <ManufacturingCalendar>Calendar3</ManufacturingCalendar>
    <ATPDetail>
    <Quantity>200</Quantity>
    <QuantityUom>EA</QuantityUom>
    <ATPCost>400000</ATPCost>
    <ATPMode>3</ATPMode>
    <LeadTime>0</LeadTime>
    <RequiredQuantity>200</RequiredQuantity>
    <RequiredDate>2012-06-01</RequiredDate>
    <AllocationRule></AllocationRule>
    <DemandClass></DemandClass>
    </ATPDetail>
    </PeggingDetail>
    </ResultDetail>
    </FulfillmentLineResult>
    </DefaultAvailabilityOption>
    </FulfillmentLineReply>
    </FulfillmentLineEntryResult>
    </checkAvailabilityOutput>

Maybe you are looking for