How to handle newly generated rows values?

Hi all,
          My requirement is to generate rows after output is generated.I am able to generate the rows .But my problem is user can generate multiple empty rows.Suppose he generated 2 empty rows .After generating those 2 empty rows.In the first newly generated row he  will select one value help.My problem is that data_change event is trigerring when that f4 help is populated.After that I select the value from f4 help and goes to the second newly generated row and again does the same thing.Now my requirement is for these 2 lands,I want to pick up all the available tests from the database table for these 2 lands and display in the grid.There may be multiple tests available for each land in the database table.
I am getting wrong values in the data_changed method.Can I use handle_data_changed_finished event for this.I am not able to catch the absolute values using data_change event.
Can any one help in this regard?
Thanks,
Balaji

Hi Gaurav,
Thanks for the replay , here for table switcher how can we differienciate between the message text and lov ,to capture lov values i have searched alot, here is my code.
In process from request.
OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(oawebbean);
     OATableBean tb = (OATableBean)oawebbean.findIndexedChildRecursive("EamRetMaterialToInvDetail");
     OASwitcherBean SwitcherRN=(OASwitcherBean)oawebbean.findChildRecursive("EamMaterial");
     if(SwitcherRN!=null)
// id EamAddNewMaterial
if (pageContext.getParameter("EamAddNewMaterial")!=null)
if(pageContext.isLovEvent())
if("lovValidate".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)) || "lovUpdate".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM))||"lovPrepare".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
String lovInputSourceId = (String)pageContext.getLovInputSourceId();
if("EamMaterialName".equals(lovInputSourceId))
/*String workorderID = null;
String lovInput = (String) lovBean.getValue(pageContext);
OAMessageLovInputBean lovBean=(OAMessageLovInputBean)oawebbean.findChildRecursive("EamMaterialName"); */
// pageContext.writeDiagnostics(this,"After : "+pageContext.getParameter("EamAddNewMaterial"),4);
pageContext.writeDiagnostics(this, "Vamsi: LOV caught", 4);
Can you please sugget me

Similar Messages

  • How to handle dynamically created row values when get upadted "please help"

    Hi,
    In my application I have requirement to display the data for specific date when user clicks on viewData. (it shows the entries for that specific days . There may be number of entries). For showing this I have created Value Object and I am setting all the entries for particular selection date to value object and (simply one day entry indicates one instance of my VO if there are 10 entries then I am creating 10 instances of VO and passing this to the actionfor)
    On my JSP page I am displaying that data by using <logic:iterate>
    <logic:iterate id=�myid� name =�nameofform� property =�Listproperty�>
    <tr>
    <td><input type=�text� property=�abc� value=<bean:write name=�myid� property=�propertyinVO�></td>
    // and same for other other values as well
    �.
    </logic:itearte>
    Now I have requirement that if user edit these entries and click on SAVEDATA the updated values should go to the DB.
    As I don�t have property mapped separately I am not able to take updated values of those as they are getting dynamically generated
    Is there is any way by which I can get these updated values.
    I am in badly need of that . Urgent help will highly appreciated.
    Thanks
    Sheena

    Hi, first off, no need to determine what has been checked or not. If the checkbox is checked, on the post, the value will be submitted as part of the request. If the checkbox is not checked, it will not be submitted (it's value will be null). Depending on what you need, I have approached this a number of different ways. One way is to name all checkboxes the same name. If you need to distinguish between two rows in the form, then in the value field for the checkbox, use some type of distinguishing factor, for example,
    <input type=checkbox name=chkName value="1:abc">
    <input type=checkbox name=chkName value="1:def">
    Now, you only have to make one call on the Servlet/JSP receiving the form post, request.getParameterValues("chkName") which will return an array of the non-null Strings that were checked.

  • How to find newly updated rows in a table

    Hi..
    How to know newly updated rows in a table.
    Thanks in advance
    pal

    Or other good thing would be to add LAST_UPDATED column to your table, that can reflect the time the row gets updated.
    G

  • Editable alv using OO ALV(newly edited row values are not updating )

    Hi friends,
    i am facing a problem. i am displaying an output alv  using OO ALV.
    i am creating a new row and validating the newly created row values and changing if it is not according to the criteria. but the newly edited values are not capturing in method
    pr_data_changed->mt_inserted_rows as it contains values only entries entered for the first time .
    i am not getting the newly edited values in it.
    please do the needful.
    Thanks and Regards,
    srinivas

    Hi!
    to rectify the problem in the Code.....
    You can Go through this program....for changed values....
    https://wiki.sdn.sap.com/wiki/x/AwBIBQ
    Regards.

  • How to handle the dynamic rows in pdf table

    Dear All,
    earlier i posted one thread reagarding getting pdf table data
    [facing problem while getting interactive form table data;
    this is working fine, i sued bind_table in wddoinit, but here i am fixing the rows count and bind_table.
    for example i have initially taken row count as 3 then i want to increase the rows in pdf table.
    i know we can use the formcalc to increase the rows by taking a button in pdf layout.
    this also working, but the data is not picking for newly added rows, i hope the problem is because the table node in the context is not binded for this new rows.
    even i tried using with webdynpro native button controlls still not working.
    any one help me what exactly this bind_table is doing and how to handle this code in form calc.
    since my table is pdf table.
    Thanks,
    Mahesh.Gattu

    Hi Thomas,
    Thanks for your confirmation,
    i have checked the paramets of submit button we have only wdevent parameters they are
    CL_WD_CUSTOM_EVENT
              PARAMETERS - Hashed table having 2 columns
              ID     ->IF_TDS (Interactive Form element Name)
             CONTEXT_ELEMENT     ->->
    these are same in case of submit button1 and submit button 2.
              NAME - Name of the Button Event i.e ON_SUBMIT (  this is also same in both the buttons).
    so i think it is not possible to work with multiple buttons by assinging to multiple tables on form.
    The other option is to place the buttons outside of the forum in the surrounding WDA area.
    This way you have no problem handling the events.
    in wddoinit if i use bind_table with 5 rows form table is populating with 5 rows, but when i take a button
    out side the form and use bind_table by incremeting the rows the pdf table rows are not adding, if i enter
    some thing on pdf table then click on add row button then the table rows are getting add. if i don't do any
    action on pdf table and click on add row button pdf is not getting update.
    is there any issue.. if i don't keep cursor on table and type some thing.. the add button is not updating
    the rows.
    if i take a  button on wd view i.e outside the form and use bind table i shall add the rows.. but in case of remove rows how to do.
    in case of normal table we can use Remove_Element( ) but how can i know the selected row from the pdf table, please help me in this concern also.
    Regards,
    Mahesh.Gattu
    Edited by: Maheshkumar gattu on Jan 7, 2009 3:57 PM
    Edited by: Maheshkumar gattu on Jan 7, 2009 4:03 PM
    Edited by: Maheshkumar gattu on Jan 7, 2009 5:21 PM

  • How to handle the current row with radio button selection???

    Hi Everyone,
    I have one ADF page with one table and one "Find" button.
    I have created one new attribute with VARCHAR2(1) in the VO and dragged that attribute as first column in the table. And changed that first column to Radio Button to select only one row at a time.
    Upon clicking on the "Find" button i need to get the values of current selected row.
    How can i get the values of selected row?
    What code should i write to get the values of selected row in Method Binding of "Find" button?
    Any suggestions will be really useful.
    Thanks.

    Hello Kumar,
    I have some comments on your case.
    >
    I have created one new attribute with VARCHAR2(1) in the VO
    >
    1- You should create this attribute in the Entity object and then add it to the view object.
    2- Do you need that only one radio button is set at a time for all rows ? If yes then you need to handle the case when the user set more than one row and clear the value of the attribute for all other rows.
    >
    How can i get all the values of current row in backing bean method(method binding of Find method)?
    can u plz provide me the code for that?
    >
    If you mean by the current row is that the row with its value of the selected attribute is set (the radio button is set for that row), then you can write a method in the viewObjectImpl class and expose it to client interface and call it from your bean.
    here is an example based in Department table in HR schema.
    //This method is written in DepartmentsViewImpl   
    public Row getSelectedRadioRow(){
                //create a second row set to not impact the row set used in ADF
                RowSet duplicateRowSet = this.createRowSet("duplicateRowSet");
                //get the current row of the table to set it back after re-executing the VO
                DepartmentsViewRowImpl currentRow = (DepartmentsViewRowImpl)this.getCurrentRow();
                Row[] filteredRows = duplicateRowSet.getFilteredRows("IsSelected", "1");
                DepartmentsViewRowImpl row=null;
                if(filteredRows.length>0){
                    row = (DepartmentsViewRowImpl)filteredRows[0];
                    System.out.println("Department Name " + row.getDepartmentName());              
                this.setCurrentRow(currentRow);
                duplicateRowSet.closeRowSet();
                return row;           
            }

  • How to Handle the chaned rows and new added rows into ALV in OPPS alv .

    Hi All,
    I have developed a [program in which i am able to append a row or change and existing row.
    when i press save button and handle the user command in PAI of Screen, in the internal table of ALV some records are missing which are inserted in the last.
    Could You please guide me how can i handle the change rows and appended rows
    Regards,
    Deepak

    Hi ,
    as avinash said , u need to use check_changed_data Method in order to get all records ,
    code will be like this
    PAI
    user-command.
    case sy-ucomm.
    when 'ENTER'.
    call method G_grid->check_changed_data.
    call method g_grid->refresh_table_display.
    when 'SAVE'.
    call method G_grid->check_changed_data.
    call method g_grid->refresh_table_display.

  • How to handle different currency PO value summation in start rountine of Up

    We've got two ODSs, ODS1 for PO records and ODS2 for contract records. We feed data from ODS1 to ODS2. Multiple PO records in ODS1 could contain one same contract number which is the key in ODS2. In the update rule we select Overwrite as update mode for a key figure PO order value and our purpose is to sum all the values of this key figure up for the same contract number which is the key in ODS2 and place total summation value into the corresonding contract number record in ODS2.  In the start rountine of the update rule from ODS1 to ODS2, we've already generated the code to realize the above and the result is correct!  But you know the summation result is only correct for one unique doc currency, we are worried if both currencies of USD and CAD exist for the multiple PO records with the same contract number, then the summation would not be right.  Anyway in the code to handle this different currency thing?
    Thanks

    hi Ajay,
    The link you provided only says the following:
    "Creating a Routine for Currency Translation:
    If you want to translate currencies in the update even though the currency translation is not available for one of the above reasons, you can create a routine. Choose Routine, set the Unit Calculation in the Routine and choose  Create Routine. In the routine editor you get the additional return parameter UNIT, the value of which is used to determine the target currency.".
    I follow the above SAP help, but can't get an additional return parameter UNIT, also it doesn't tell the details on how to do the convertion.
    Thanks anyway!

  • How to handle default checkbox(row selector)??

    Hi,
    I have a form where in there is a default checkbox and i have created a button named CANCELLED to cancel the particular row,when ever the end user wants to cancel a particular row he checks the checkbox so that in the back end we have taken a column cancel_flag where this column should be updated to 'Y' for the checked row by end user.
    How can we handle this scenerio for the above context??Please any help will be greatly appreciated.
    TIA,
    By,
    Kranthi.

    Kranthi,
    I assume your check box has static list of values like
    STATIC2:Cancelled;YThen write a after submit conditional pl/sql page-process which executes only when we press 'Cancelled' button.
    In the page process, write code similar to
    IF INSTR (:p1_checkbox, 'Y') != 0 --check box selected then
    THEN
    --update table
    UPDATE tbl_name
    SET cancel_flag='Y'
    WHERE pk_id=:p1_pk_id;
    END IF;where pk_id is primary key for your table. p1_pk_id is page item for primary key and p1_checkbox cancelled check box.
    Hope it helps
    Cheers,
    Hari

  • JDBC - how to handle insert that returns value (bind?)

    Hi,
    I'm trying to do an insert into a table in an Oracle database with an auto-incrementing primary key (using a trigger and sequence) and I need to retrieve the value after the insert. From SQL*Plus, I'd enter:
    var id number;
    INSERT INTO mytable (name) VALUES ('foo') RETURNING id into :id;
    whereupon if I do "print id", I get the value of the id field from the newly-inserted record.
    The big question is how to achieve the same thing using JDBC. I've been flailing around all morning trying to figure it out and suspect it has something to do with using a CallableStatement instead of a PreparedStatement, but all of the examples I've seen so far only deal with calling stored procedures instead of raw SQL, and they all omit the part where some variable is bound to the resultset.
    Assuming I want to have the Java variable (int? Integer()?) "newId" set to the value being returned by the SQL statement as "id" (or ":id"?), what do I need to do between getting the connection and looking at "newId" to see what the value returned by the statement is?
    ie,
    Connection conn = db.connect();
    int newId;
    // show me what I need to do here
    System.out.println("The id of the newly-inserted record is:");
    System.out.println(newId);Thanks!

    This is untested:
    use the executeUpdate() method from the Statement. The return value will be your result from the RETURNING id portion of your SQL statement, if not then you'll probably have to do a seperate select or/and explicit return to get the value back from SQL.

  • How to read the selected row value of a table node

    hi
    i have a node of table type, displaying few records & with each record a  NEXT button is there.
    now i want to read the values of the selected row of the table & want to process next with NEXT button.
    pls tell me how to read the values of the selected row only.
    reds.

    data : lo_nd type ref to if_wd_context_node,
      lo_nd1 type ref to if_wd_context_node,
      lt_temp type wdr_context_element_set,
      wa_temp type ref to if_wd_context_element,
      ls_node1 type sflight,
      lt_node1 type STANDARD TABLE OF sflight.
    lo_nd = wd_context->get_child_node('CN_MAIN').
      CALL METHOD lo_nd->get_selected_elements
       RECEIVING
           set = lt_temp.
      loop at lt_temp INTO wa_temp.
          CALL METHOD wa_temp->get_static_attributes
          IMPORTING
            static_attributes = ls_node1.
        APPEND ls_node1 TO lt_node1.
        CLEAR ls_node1.
      ENDLOOP.
    'CN_MAIN' is the node whose selected values are to be picked and stored in internal table lt_node1.
    Other option by Thomas :
    DATA lo_nd_cn_main TYPE REF TO if_wd_context_node.
      DATA lt_temp TYPE wdr_context_element_set.
      FIELD-SYMBOLS <wa_temp> LIKE LINE OF lt_temp.
      DATA lt_node1 TYPE wd_this->elements_cn_main.
      FIELD-SYMBOLS <ls_node1> LIKE LINE OF lt_node1.
      lo_nd_cn_main = wd_context->get_child_node( name = wd_this->wdctx_cn_main ).
      lt_temp = lo_nd_cn_main->get_selected_elements( ).
      LOOP AT lt_temp ASSIGNING <wa_temp>.
        APPEND INITIAL LINE TO lt_node1 ASSIGNING <ls_node1>.
        <wa_temp>->get_static_attributes( IMPORTING STATIC_ATTRIBUTES = <ls_node1> ).
      ENDLOOP.

  • How to pass dynamically generated string value as array name in TestStand?

    Hi All,
              I have a string variable which holds an array name as its value. The string value is a dynamically generated one. Now my problem is how to retrieve the values within the array where as the array name is stored in a string variable.
    for eg:
    fileglobals.InfoName = "Array_Name" --> fileglobals.InfoName is a string variable, Array_Name is the array name generated dynamically and it is known only at run-time.
    Array_Name[0] = "a";
    Array_Name[1] = "b";
    Array_Name[2] = "c";
    In the above case, I have to retrieve the values of a, b and c
    Any help is greatly appreciated
    Thanks
    Arun Prasath E G

    Hi,
    Looking at your sequencefile.
    You seem to be trying to save into FlieGlobals.InfoName a string with the values of "FileGlobals.Info_0".."FileGlobals.Info_n" where n is the value of Parameter.TestSocket.Index.
    Then you are setting the value into FileGlobals.TempName from "StationGlobals.FileGlobals.Info_0" assuming Parameter.TestSocket.Index is 0.
    Is this correct?
    I realise this is a cutdown sequence file but you must make sure These variable actually exist in either FileGlobals or StationGlobals. Also with FileGlobals each SequenceFile has its own FileGlobals unless you have set the properties of the SequencFile to use a common FileGlobals.
    What was the precise error you was seeing as it will properly telling you what variable of property it can't find.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How to Finding the Last Row Value in Datagrid?

    Hi Everyone,
    Thanks in Advance.
    I need your help, to find the last row data in Datagrid.
    Actually i am using Datagrid to display my Data in flex. In my data i stored the gender value of employees. So if the last row in my datagrid is "female" i need to be highlight that particular row. So please help me to solve this issue.
    Thanks,
    Charles. J

    datagrid.selectedIndex = datagrid.dataprovider.length;
    ^ something like this will select the last row in the datagrid.
    if you need to check it's value, you might need to cast an object here, based on the index value, and check it's gender value.
    datagrid.selectedIndex = datagrid.dataprovider.length;
    if (datagrid.selectedItem["gender"] == "female") {
    //handle here

  • How to handle the Rowalreadydeleted,Row inconsistent exception in adf

    Hi all,
    In my application user can update,delete the database table.
    If one user deletes the row and other user tries to update the same row then i am getting the error and the user how got this error was not able to perform any operation on other rows.
    how can i overcome this scenario.
    Thanks in advance

    may be this will help you
    http://jobinesh.blogspot.com/2010/03/what-you-may-need-to-know-about-nested.html
    and from jobinesh comment's
    If you need locking and want to find the root cause for the RowInconsistentException, then probably the following points may help you
    1.Please check whether your EO has a attributes populated by DB trigger(update/insert).If yes, set the right 'Refresh After' property for this attribute.
    2. Please see this post http://www.avromroyfaderman.com/2008/05/bring-back-the-hobgoblin-dealing-with-rowinconsistentexception/, thttp://www.avromroyfaderman.com/2008/05/bring-back-the-hobgoblin-dealing-with-rowinconsistentexception/
    This link contains some code snippet which can be used to identify the attribute which cause the RowInconsistentException

  • How to handle dynamically generated schemas

    Hello! Experts
    In my last query (subject-- JABX implementation Query)which posted in this forum i asked whether JAXB can be used in situation where schema of the xml files are generate dynamically.I came to know through the reply that JAXB can be used only for static generated schemas.Many Thanks for the reply.
    Can any one suggests how to deal with situations where schemas are generated dynamically?
    Many Regards
    Ved

    This question doesn't make sense. If your code doesn't know anything statically about the schema for an input xml document, the only thing you can do is treat it like a generic xml document using something like DOM, and explore it simply as a tree full of nodes.

Maybe you are looking for