Blank row in table UI Element

Hi All,
I am having a UI table element in my screen. Below that i ve some input fields. When i lead select a row in table, the input field data changes accordingly.
When i do not have a row in the table, am getting an error message saying no value for the input field.
So when there is no row in table, if i append a blank row. It is working fine. Can anyone give someother solution for this issue.??
Because in this solution we have a blank row in table when the table is empty. We do not want this blank row
Am binding the table and the input fields below to the same node. (So that the table row data automatically reflects in the input fields below).

hii ,
u shud try using this :
1 create a context attribute , say attr1 ,of type string under a separate node of cardinality 1..1 or 1..n ,say context node is cn_all.
2 bind this attribute  attr1 with the value property of the ur UI element INput Field's .
3 set the value of ur attribute of attr1 in ONLEAD SELECT of the  TABLE .
  DATA lo_nd_cn_all TYPE REF TO if_wd_context_node.
    DATA lo_el_cn_all TYPE REF TO if_wd_context_element.
    DATA ls_cn_all TYPE wd_this->element_cn_all.
    DATA lv_attr1 LIKE ls_cn_all-attr1.
*   navigate from <CONTEXT> to <CN_ALL> via lead selection
    lo_nd_cn_all = wd_context->get_child_node( name = wd_this->wdctx_cn_all ).
*   get element via lead selection
    lo_el_cn_all = lo_nd_cn_all->get_element(  ).
*   set single attribute
    lo_el_cn_all->set_attribute(
      EXPORTING
        name =  `ATTR1`
      IMPORTING
        value = lv_attr1).
in this way , u wud not be creating the empty rows , also wud not get runtime error for ur Input field
regards,
amit

Similar Messages

  • Blank Row in table control

    Hi,
      Could anybody tell me how to add a n  number of blank lines to the table control UI element on some event. I have tried with the method CREATE_ELEMENT but its clearing the table control.
    I have two nodes called   "lines" and "table".  "Lines" node contains attribute "Count". and this attribute is binded to inputfiled "INP".
    When i click on button , based on inputfield value (INP)  that many blank rows should get appended to the table control.
    Can anybody advice me how can i get this ?
    Can anybody send me the sample code of CREATE_METHOD if its correct approach.
    Thanks and Regards
    Sireesha.

    Hi Saurav,
       Thanks a lot for your reply.  I am very Sorry to miss one point in my first thread. With the CREATE_ELEMENT its adding the blank rows to the table control but its adding in the second page. I thought its clearing the table control entries but in fact the blank rows are getting added in the second page.
    My doubt is how to add blank rows only in the first page.  I have unchecked the "footerVisible" property for the table control. so when i add rows to the table i cannt see the new rows.
    How to add blank rows only in the first page...?
    Thanks for your help.
    Regards
    Sireesha.

  • Blank row in table....

    Hi all,
           I have a serious problem with the table UI.
    In screen 1 ,I have  a table where I multiselect the table rows and press "next Button" this action leads to the Screen 2, where a summary of the previously selected rows is displayed..
    Here I get a blank row as my first row along with the selected rows.
    This is some wht URGENT...
    Thanks in advance

    hi gopi
    when you get element from the table the indexing is from 1,2,3etc. and not from 0,1,2.so the line get element at index=1 retrieves the first element ,get element at index=2 retrieves the second element and so on.
    use one more variable say int k=1  to retrieve elements and use i for count.
    instead of this line
    element.setDelivery(wdContext.nodeHeader_Data().getHeader_DataElementAt(i).getDeliv_Numb());
    use k to get element say as follows
    element.setDelivery(wdContext.nodeHeader_Data().getHeader_DataElementAt(k).getDeliv_Numb());
    the modified code may be
    for (int i = 0,int k=1; i < size; i+,k+) {
    if (wdContext.nodeHeader_Data().isMultiSelected(i) || i == leadSelection) {
    element = wdContext.nodeItemdata().createItemdataElement(new Bapishipmentitem());
    element.setDelivery(wdContext.nodeHeader_Data().getHeader_DataElementAt(k).getDeliv_Numb());
    wdContext.nodeItemdata().addElement(element);
    regards
    saravana.

  • Add blank Row in table.

    Hi,
    I want to Add Blank row in my table so i can add corresponding data into them and on click of commit button it should get updated in database.
    In table I have primary key as a sequences generated for that i already added expression in my Attribute of EO.
    Please suggest me some code so i can achieve this.
    Jdev :- 11.0.0.3
    Thanks
    Ramit Mathur

    Since there is a sequence try this url, this will do the job:
    see section "4.12.5 Assigning the Primary Key Value Using an Oracle Sequence"
    http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcentities.htm#insertedID12

  • Blank Row in table during Master Data Load

    I am having some success with my master data loads, but when I maintain the master data I have noticed that every table has had a blank row inserted.
    Does anybody know why and what I should do with the row (i.e. delete it)?

    This blank row is by default created and you can no way delete it.  Though you delete it, a new row with blank values will be appended.  This is required for some technical reason while reading the table within ABAP programs. 
    This is applicable only for SAP tables and may not be required for custom developed ones unless you want to use this in screen programs.
    Regards,
    Raj

  • How to insert one blank row in table using ODataModel?

    Hi,
    I have a table in which the data is being shown using ODataModel. Now I want to add a new row dynamically when user clicks on 'New' button. For this I know using JsonModel it would be something like below where every field in the table is almost  blank as I want users to enter the data in it and later I want to save the data in the model at server:
    var tableModel = table.getModel();
      var tableData = timeSheetTable.getModel().getData();
      tableData.modelData.push({"workItem":"item5","day1":"","day2":"","day3":"","day4":"","day5":"","day6":"","day7":""});
       tableModel.setData(tableData);
      timeSheetTable.setModel(tableModel);
    How this thing can be achieved using ODataModel? I can't push data like what is shown above.
    I tried searching examples for this but no luck. Any help would appreciated.
    Thanks,
    Supriya Kale

    Hi,
    I have a table in which the data is being shown using ODataModel. Now I want to add a new row dynamically when user clicks on 'New' button. For this I know using JsonModel it would be something like below where every field in the table is almost  blank as I want users to enter the data in it and later I want to save the data in the model at server:
    var tableModel = table.getModel();
      var tableData = timeSheetTable.getModel().getData();
      tableData.modelData.push({"workItem":"item5","day1":"","day2":"","day3":"","day4":"","day5":"","day6":"","day7":""});
       tableModel.setData(tableData);
      timeSheetTable.setModel(tableModel);
    How this thing can be achieved using ODataModel? I can't push data like what is shown above.
    I tried searching examples for this but no luck. Any help would appreciated.
    Thanks,
    Supriya Kale

  • Blank Rows in Table on Range Change After Add

    I have a table and to add rows to it, you click on an add button, enter the information and then click save. After clicking save you return to the first page of the table. If you click on the Next option and change the table range, the table only shows the first record (in that new range) but the rest of the lines are all blank with no data. So for example, if my range is 5 and I have 8 records, after hitting the next button I see the 6th record and then 2 more rows but they are blank. How do I refresh the data after the range change to show the rest of the records properly? (Note, this appears to only happen after adding new records).

    Since there is a sequence try this url, this will do the job:
    see section "4.12.5 Assigning the Primary Key Value Using an Oracle Sequence"
    http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcentities.htm#insertedID12

  • How to set total number of rows of table control

    Hi All,
    I want to set the total number of rows of table control. I don't want to display the blank rows in table.
    Regards,
    Shrinivas

    Need some fine tuning regarding the scrollbar height but it's a start
    Unless this isn't what you asked for
    Small number of rows
    Large number of rows
    Attachments:
    PlayingWithTable.vi ‏17 KB

  • Need to add a blank row to a table when checkbox selected

    Hi ALL,
    I have a custom page having 2 check boxes and few fields , i am doing search operation by entering one checkbox checked and few other fields and data displaying in table region.
    my requirement is when i select second check box and click one button as add new row it should create a blank row in the table, means table should  availabe with a blank row so that user can insert data,
    please help me on thsi
    Thnaks

                 Hi there ,
                 If you 're working with advance table then you have an default option to create a blank row , please through topic 'add another row '
                 in jdev guide .
                 If you are working the regular table region then you might follow the below code suggested .
                 Create a new item of the type button ( not submit button ) and handle the event in PFR of your controller class
                String addRow=pageContext.getParameter(EVENT_PARAM);   //  "addRow " is an event attached to table
                if("addAnotherRow".equals(addRow))  
                      am.invokeMethod("AddRow");
              In AMimplementation class :
       public void AddRow()
        OAViewObject headerVO = (OAViewObject)getsdaPacelineWorkupHeaderUpdateVO1();
        sdaPacelineWorkupHeaderUpdateVORowImpl rowh = (sdaPacelineWorkupHeaderUpdateVORowImpl)headerVO.getCurrentRow();
        rowh.getPacelineHeaderId();
        OAViewObject lineVO = (OAViewObject)getsdaPacelineWorkupLineUpdateVO1();
        Row lineRow = lineVO.createRow();
        Row lineRo = lineVO.last();
        lineRow.setAttribute("PacelineHeaderId",rowh.getPacelineHeaderId());   
        lineRow.setNewRowState(Row.STATUS_INITIALIZED);
        lineVO.last();
        lineVO.next();
        lineVO.insertRow(lineRow);
        lineVO.setCurrentRow(lineRow);
        lineVO.setCurrentRow(lineVO.last());
      Note : Replace your vo name in place of sdaPacelineWorkupHeaderUpdateVO1()
       Please let me know if you have any questions .
      Regards ,
    Keerthi

  • Getting Blank Rows and Good Rows in the same bound table

    Hi, a little brief here I am a developer at Oracle and am trying to use ADF and Oracle BC's on my webpages.
    I am using Oracle TopLink and ADF to display the contents of several tables. The issue I encounter is that TopLink for some reason (I hypothesize memory constraints) does not return the actual contents of the rows but instead nulls to the front end for my ADF Read-Only Table on the page. The number of rows is correct but only the first 11 rows are displayed and after that the rows are completely blank, I cannot navigate to the third set of rows (the second set of rows I can navigate to because there is one good row there) and when I select one of the blank rows and try to perform an action it gives null for the contents of the actual row and throws an exception. How can I resolve this issue?
    I have tested that I can see the full contents of the table correctly on another page with less content, but when I put the table on the page that has multiple iterators and also BC's on it only the first 11 rows are visible. Is there an easy solution to this issue, why does it occur, and why is there no error thrown when the null rows are given to the page? Does anyone know of a solution to this issue?

    Resolved the issue, the problem was that I had a refresh that was on ALWAYS on the component, I change the refresh to a RENDER MODEL refresh and now can see the whole table.

  • Sap.m.Table generating first two blank rows after adding more rows.

    Hi everyone,
                          I am stucked in a very bad condition the problem is with the table rows and columns. I am generating dynamic table columns and rows based on searched unit so whenever i am searching i created a function for initializing the table rows and columns i am looping the array for whatever the size of rows and columns it will display up to 5. My issue is with the request going is adding more times then the required one. So if anyone can check for the solution. Only problem is my data is generated correct but next time i call this method again it is hiding the first 2 rows.
    function initializeGrid() {
        if (SHOPFLOOR_DCS_UNIT_KEY != null) {
            var dcsComboBox = sap.ui.getCore().byId("selectDCSName");
            var dcsName = dcsComboBox.getValue();
            var viewData = {};
            viewData.EntityName = "DataCollectionSetAttribute";
            viewData.Condition = [{ColumnName : "DcsName",Value :dcsName}];
            viewData.Projection = {AttributeName:true,AttributeType:true,Length:true,Precision:true,LowerLimit:true,
                    UpperLimit:true,DefaultValue:true };
            $
            .ajax({
                type : "POST",
                url : "/demo/xsds/designer/SelectByQueryService.xsjs",
                contentType : "application/json",
                data : JSON.stringify(viewData),
                dataType : "json",
                success : function(data) {
                    /*dcDataTable.unbindItems();
                    dcDataTable.removeAllItems();
                    dcDataTable.removeAllColumns();*/
                    var dcsCols = data;
                    if (data != null
                            && data.length > 0) {
                        var firstColumn = [{
                            "AttributeName": "SerialNumber",
                            "ModifiedAttributeName": "SerialNumber"
                        for (var index = 0; dcsCols.length > index; index++) {
                            var currentRow = dcsCols[index];
                            if (currentRow.AttributeName != null
                                    && currentRow.LowerLimit != null
                                    && currentRow.UpperLimit != null) {
                                dcsCols[index].ModifiedAttributeName = currentRow.AttributeName
                                + "["
                                    + currentRow.LowerLimit
                                    + " - "
                                    + currentRow.UpperLimit
                                    + ","
                                    + "Def:"
                                    + currentRow.DefaultValue
                                    + "]";
                                firstColumn
                                .push(dcsCols[index]);
                            } else if (currentRow.AttributeName != null) {
                                dcsCols[index].ModifiedAttributeName = currentRow.AttributeName
                                + "["
                                    + "Def:"
                                    + currentRow.DefaultValue
                                    + "]";
                                firstColumn
                                .push(dcsCols[index]);
                            if (currentRow.AttributeType != null
                                    && currentRow.AttributeType == "LocalDate")
                                dateAttributes[dateAttributes.length] = currentRow.AttributeName;
                        dcsCols = firstColumn;
                        runtimeDCS = dcsCols;
                        console.log("dcsCols", dcsCols);
                        var viewData = {};
                        viewData.EntityName = dcsName;
                        viewData.Cmd="GET";
                        viewData.UnitKey=SHOPFLOOR_DCS_UNIT_KEY;
                        $.ajax({
                            type : "POST",
                            url : "/demo/xsds/designer/AddOrRemoveDCSDataService.xsjs",
                            contentType : "application/json",
                            data : JSON.stringify(viewData),
                            dataType : "json",
                            success : function(data) {
                                console.log("dcsVals"+
                                        JSON.stringify(data)+data.length);
                                dcDataTable.removeAllColumns();
                                for (var i = 0; i < data.length; i++) {
                                    for (key in data[i]) {
                                        var textValue = data[i][key];
                                        if (typeof textValue !== "object"
                                                && typeof textValue === "string"
                                                && textValue
                                                .indexOf("/Date(") > -1) {
                                            var startIndex = textValue
                                            .indexOf("(");
                                            var endIndex = textValue.indexOf(")");
                                            var tempValue = textValue.substring(startIndex + 1,endIndex);
                                            var tempDate = new Date(parseInt(tempValue));
                                            data[i][key] = tempDate.toDateString();
                                dcsModel.setData({dcsRows : data});
                                sap.ui.getCore().setModel(dcsModel);
                                var columnList = new sap.m.ColumnListItem();
                                dcDataTable.bindItems({
                                    path: "/dcsRows/",
                                    template: columnList,
                                for (var i = 0; i < dcsCols.length && i<5; i++) {
                                    dcDataTable.addColumn(new sap.m.Column({
                                        header : new sap.m.Label({
                                            text : dcsCols[i].ModifiedAttributeName
                                    columnList.addCell(new sap.m.Text({
                                        text : {
                                            path : dcsCols[i].AttributeName
                                clearItems();
                            },error : function(response) {
                                console.log("Request Failed==>",response);
                                if (response.responseText.indexOf('<html>') == -1)
                                    console.log(JSON.stringify(response.responseText));
                                else
                                    console.log("Invalid Service Name");
                },error : function(response) {
                    console.log("Request Failed==>",response);
                    if (response.responseText.indexOf('<html>') == -1)
                        console.log(JSON.stringify(response.responseText));
                    else
                        console.log("Invalid Service Name");
        else {
            console.log("Data not found!!!");

    No, even with the select box gone the table still doesn't show the last two rows, so this seems indeed be irrelevant to the question.
    Best Regards,
    S.
    ***update***
    I tried to create a simple case in which the same strange behavior occurs but I can't seem to reproduce it. The table that produces the two blank rows is part of a complex application and I tried to extract enough of it for a simple test case that behaves the same way but I can't manage to do that. I guess that once I have the behavior I will also know what causes it.
    It seems that the iterator is set to rangesize 10 but the table rests on rangesize 12, when I looked at other tables in the application it seems that if I want to set the rangesize from 57 to 50, it remains on 57.
    Can anyone help me with either this limited info or otherwise instruct me to get more info ?
    Best Regards,
    S.
    Edited by: matdoya on Dec 1, 2008 5:51 AM

  • What happen if I delete the Blank row in Master Data Table

    This is what happened:
    I have an InfoObject Item has only the key and description. I wrote a program to delete all Master Data in Item.
    DELETE FROM /bic/TItem.
    DELETE FROM /bic/SItem.
    COMMIT WORK.
    I still able to load Master Data to Item succussfully without a blank row. But I remember 1 blank row always gets inserted to the table, right? In my case, it's not ture. I would like to know why and what's going to affect if there is no blank row in the table?
    Thanks.

    Hi,
    I guess there should be no impact but why do you want to delete the row. I guess at some point the system would still insert a blank record.
    Bye
    Dinesh

  • How to populate rows from another table in new blank rows of other table

    I have to convert an oracle form 6i to Jdeveloper application. In forms 6i we use create a cursor for other table and then populate the current table data block row using create record and assigning its values from cursor and then issuing next record until all cursor records are written in data block. After some manual editing we save the whole form and then all block records are saved as new rows in table.
    Now how to create this functionality in jdeveloper application.
    Kindly help.

    two steps-
    1. get row from first VO.iterate them - like below -
    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
                                    DCIteratorBinding dcIteratorBindings = bindings.findIteratorBinding("ViewObj1Iterator");
                                    HSSFRow  excelrow = null;
                                            // Get all the rows of a iterator
                                            oracle.jbo.Row[] rows = dcIteratorBindings.getAllRowsInRange();
                                        int i = 0;
                                                for (oracle.jbo.Row row : rows) {
                                                                                                                    row.getAttribute(colName).toString());  // by this you can get row attribute value..
    2. inside iteration create row for VO 2 for example-
    ViewObject employee= findViewObject("EmployeeVO");
    // Create a row and fill in the columns.
    Row row = employee.createRow();
    row.setAttribute("Name", "Vinay");
    row.setAttribute("EmpId", 1);
    //Insert row in to the default row set
    employee.insertRow(row);
    Read more: http://www.techartifact.com/blogs/2012/12/creating-new-row-of-view-object-in-adf-techartifact.html#ixzz2iL978UOD
    http://www.techartifact.com/blogs/2012/12/creating-new-row-of-view-object-in-adf-techartifact.html

  • Merge two rows & show in a single row in table results

    Hi, I need to merge 2 rows having 3 columns in a single row in table view
    The cols are currently shown as :
    Project NO-------(Current_Month) Revenue----------(Prior_Month) Revenue
    123123 10000
    20000
    Revenue is a single column with revenue for diffreent Period.
    10000 is for May
    20000 is for April
    Project NO for both are same, just the periods are different. if I am not displaying Period i need to merge the 2 rows & show as
    Project NO-------(Current_Month) Revenue----------(Prior_Month) Revenue
    123123 10000 20000
    Please let me know how we can acheive this??
    thanx
    Pankaj

    123123 is the project number..
    the above is not getting displayed properly....as the blank spaces are removed...
    Please consider this

  • Intermittent Blank Rows coming in BI Publisher Report output

    Hi,
    We are working on a BI Publisher report output.
    Issue
    The report sometimes creates a blank row along with the headings of the report columns. Table has multiple records and between 2 records we have a data being displayed which is optional. When this record is null, it is creating an extra space and hence creating a new page with the headers and a blank row.
    Reducing the space is one issue we have thought of. Are there any other pointers to this.
    Thanks
    Ishani

    Hi,
    I did not got the complete thing but as you told you need to remove the blank space in the report and at the same you told when a column returns null the row get displayed as blank row.
    Then can you try using the Conditional region so that when ever you find the column value as null so you can hide that row.
    Just try it i donot no if your requirement is exactly like this or what.
    Thanks.

Maybe you are looking for

  • Can i reference an environmant variable from a package?

    Hi, My problem is this, I am using a file from a package to dump some of my data. The path or the file name need not be fixed. I would like to pick it up from the environment. Is this possible ? In short is there a function in Oracle similar to geten

  • ITunes organized my library under one artiest.  My library on my PC is correctly listed.  How do I undo this action?

    iTunes organized my library under one artiest.  Now all my music is gone (actually not listed as seperate albums and artiests).  My library on my PC is correctly listed.  How do I undo this action?

  • Local Currency changeover steps

    Hi, We have one requirement from customer that they want to reimplement/migrate <b>to new company code from existing company code with new local currency</b>. Does anybody have any documentation as to what are the high level steps involved in doing s

  • Help! when i insert flash disk...

    when i insert a usb flash disk in my macbook and i delete some files from it the memory of the flash disk doesn't decrease. i try to eject it and plug it again but when i get it's info it still doesn't change. any help would be grateful and appreciat

  • How to get result as below

    Hello all, I have situation like below OrgID Merge_OrgId 1 2 2 3 3 4 5 6 6 7 8 9 expected result is OrgID Merge_OrgId 1 4 5 7 8 9 example 1->2->3->4 means 1 -> 4 please tell me how to write sql query of such