Update the values in the table on select of a particular row

hi
I want to update the values in the table on selecting the particular row.
im able to select the particular row using Leadselect.
can any one help me in updating the values in the table?
regards
raji

hi,
values are coming from my database ( SQLServer.)
on click of the button i am able to display the values from the database.
My problem is on selection of any row , i should be able to edit/update the values in the table .
regards
raji

Similar Messages

  • Regd bulk update of values in the table..

    HI ,
    I have a search page.. Have used autocustomization to create it ..This page will be used to query data from a table and then we also need to update couple of results table fields and save them.
    THere is a results region . i have included the multiselect option of table which has got me a select column as the first column in the table. Also have included a tableaction and an upate button with that ..
    Next to the table actions , Update button , I need to have a field , where in i can enter value and it shud update the updatable fields of rows in the table as bulk .. with the same value in the field next to update..
    SOme what like batch update for the table with same values..
    Could you please tell me hw do we do this ?
    Regards,
    Preeti

    Hi,
    As the update button is clicked then :
    if(pageContext.getParameter("Update")!= null)
    // Grab the value of the field next to update button
    String value = pageContext.getParameter("<id of text input>");
    //then loop through the rows
    for ( int i=0;i<row.length;i++)
    // then set the value of Attribute which you want
    row.setAttribute("<Attribute name>",value);//if this Attribute is on a text input in table then automatically it will be reflected for all rows of the table. (Bulk Update)
    Thanks,
    Gaurav

  • Api to update the values in per_periods_of_placement table

    Hi,
    can anyone let me know whether any hrms api is available to update the values in the table PER_PERIODS_OF_PLACEMENT.
    I want to update the values under the column TERMINATION_REASON in per_periods_of_placement for few set of contingent workers(for those a wrong reason was entered need to replace with correct value now).
    Please revert asap.
    Thanks,
    Jithendra

    Here is my stand alone PL/SQL block :
    I am supplying the start_date fro mthe per_periods_of_ placement table itself...
    DECLARE
    CURSOR get_cwk_details IS
    SELECT person_id cwk_person_id,
    object_version_number ovn,
    date_start service_start_date
    FROM per_periods_of_placement pdp, hr_lookups l
    WHERE l.lookup_type(+) = 'HR_CWK_TERMINATION_REASONS'
    AND l.lookup_code(+) = pdp.termination_reason
    AND HR_GENERAL.DECODE_LOOKUP ('HR_CWK_TERMINATION_REASONS',
    PDP.TERMINATION_REASON) = 'Deceased' ;
    l_person_id NUMBER(20);
    l_ovn NUMBER(10);
    l_date_start DATE;
    BEGIN
    FOR get_cwk_details_rec in get_cwk_details
    LOOP
    l_person_id := 153564;--get_cwk_details_rec.cwk_person_id;
    l_ovn := get_cwk_details_rec.ovn;
    l_date_start := get_cwk_details_rec.service_start_date;
    dbms_output.put_line('l_person_id = ' || l_person_id);
    dbms_output.put_line('l_ovn = ' || l_ovn);
    dbms_output.put_line(' l_date_start = ' || l_date_start);
    apps. hr_periods_of_placement_api.update_pdp_details(
    P_VALIDATE => FALSE,
    P_EFFECTIVE_DATE => l_date_start,
    P_OBJECT_VERSION_NUMBER => l_ovn,
    P_PERSON_ID => l_person_id,
    P_DATE_START => l_date_start,
    P_TERMINATION_REASON => 'DW');
    COMMIT;
    END LOOP;
    END;

  • How to change the value of the Selection field in the ROOSFIELD table for o

    Hi there
    I have a standard data source 0CRM_SALES_ACT_1 for which one of the standard field has the status A(Hidden).
    In the field selection filed of the table ROOSFIELD and I want to change it to P(Visible)  for  one of the field in the Data source.
    How it can be done. Any suggestion will be greatly appreciated.
    kind regards
    Sarah

    Hi,
    Keerthi
    Good Question..Even am also new to this issue.
    But let me try to find the solution.
    Before lookinto this issue. i need clarification on this.
    1. You want to see the value in the text box as a color one or you want to change the disable from true to false?
    If that is the case, then following one is my suggestion.
    In proceesRequest method
    1. get the handle for the messageTextInput Bean and based on that set the disable property to false
    for example:
    OAMessageTextInputBean t1 = (OAMessageTextInputBean )webBean.findChildRecurrsive("ItemId");
    t1.setDiabled(false);
    In ProcessFormRequest method
    1. get the handle for the messageTextInput Bean and based on that set the style class or css property to "OraFieldText"
    for example:
    OAMessageTextInputBean t1 = (OAMessageTextInputBean )webBean.findChildRecurrsive("ItemId");
    t1.setCss(OraFieldText);
    (Or)
    If it will not work then directly set the cssClass Property to OraFieldText.
    I hope it will work....am not sure about this.
    Regards
    Santhosh kumar.k

  • Not Updating the Values in the JComboBox and JTable

    Hi Friends
    In my program i hava Two JComboBox and One JTable. I Update the ComboBox with different field on A Table. and then Display a list of record in the JTable.
    It is Displaying the Values in the Begining But when i try to Select the Next Item in the ComboBox it is not Updating the Records Eeither to JComboBox or JTable.
    MY CODE is this
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.DefaultComboBoxModel.*;
    import javax.swing.table.*;
    import java.sql.*;
    import java.util.*;
    public class SearchBook extends JDialog implements ActionListener
         private JComboBox comboCategory,comboAuthor;
         private JSplitPane splitpane;
         private JTable table;
         private JToolBar toolBar;
         private JButton btnclose, btncancel;
         private JPanel panel1,panel2,panel3,panel4;
         private JLabel lblCategory,lblAuthor;
         private Container c;
         //DefaultTableModel model;
         Statement st;
         ResultSet rs;
         Vector v = new Vector();
         public SearchBook (Connection con)
              // Property for JDialog
              setTitle("Search Books");
              setLocation(40,110);
              setModal(true);
              setSize(750,450);
              // Creating ToolBar Button
              btnclose = new JButton(new ImageIcon("Images/export.gif"));
              btnclose.addActionListener(this);
              // Creating Tool Bar
              toolBar = new JToolBar();
              toolBar.add(btnclose);
              try
                   st=con.createStatement();
                   rs =st.executeQuery("SELECT BCat from Books Group By Books.BCat");
                   while(rs.next())
                        v.add(rs.getString(1));
              catch(SQLException ex)
                   System.out.println("Error");
              panel1= new JPanel();
              panel1.setLayout(new GridBagLayout());
              GridBagConstraints c = new GridBagConstraints();
              c.fill = GridBagConstraints.HORIZONTAL;
              lblCategory = new JLabel("Category:");
              lblCategory.setHorizontalAlignment (JTextField.CENTER);
              c.gridx=2;
              c.gridy=2;
              panel1.add(lblCategory,c);
              comboCategory = new JComboBox(v);
              comboCategory.addActionListener(this);
              c.ipadx=20;
              c.gridx=3;
              c.gridwidth=1;
              c.gridy=2;
              panel1.add(comboCategory,c);
              lblAuthor = new JLabel("Author/Publisher:");
              c.gridwidth=2;
              c.gridx=1;
              c.gridy=4;
              panel1.add(lblAuthor,c);
              lblAuthor.setHorizontalAlignment (JTextField.LEFT);
              comboAuthor = new JComboBox();
              comboAuthor.addActionListener(this);
              c.insets= new Insets(20,0,0,0);
              c.ipadx=20;
              c.gridx=3;
              c.gridy=4;
              panel1.add(comboAuthor,c);
              comboAuthor.setBounds (125, 165, 175, 25);
              table = new JTable();
              JScrollPane scrollpane = new JScrollPane(table);
              //panel2 = new JPanel();
              //panel2.add(scrollpane);
              splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,panel1,scrollpane);
              splitpane.setDividerSize(15);
              splitpane.setDividerLocation(190);
              getContentPane().add(toolBar,BorderLayout.NORTH);
              getContentPane().add(splitpane);
         public void actionPerformed(ActionEvent ae)
              Object obj= ae.getSource();
              if(obj==comboCategory)
                   String selecteditem = (String)comboCategory.getSelectedItem();
                   displayAuthor(selecteditem);
                   System.out.println("Selected Item"+selecteditem);
              else if(obj==btnclose)
                   setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
              else if(obj==comboAuthor)
                   String selecteditem1 = (String)comboAuthor.getSelectedItem();
                   displayavailablity(selecteditem1);
                   //System.out.println("Selected Item"+selecteditem1);
                   System.out.println("Selected Author"+selecteditem1);
         private void displayAuthor(String selecteditem)
              try
              {     Vector data = new Vector();
                   rs= st.executeQuery("SELECT BAuthorandPublisher FROM Books where BCat='" + selecteditem + "' Group By Books.BAuthorandPublisher");
                   System.out.println("Executing");
                   while(rs.next())
                        data.add(rs.getString(1));
                   //((DefaultComboBoxModel)comboAuthor.getModel()).setVectorData(data);
                   comboAuthor.setModel(new DefaultComboBoxModel(data));
              catch(SQLException ex)
                   System.out.println("ERROR");
         private void displayavailablity(String selecteditem1)
                   try
                        Vector columnNames = new Vector();
                        Vector data1 = new Vector();
                        rs= st.executeQuery("SELECT * FROM Books where BAuthorandPublisher='" + selecteditem1 +"'");     
                        ResultSetMetaData md= rs.getMetaData();
                        int columns =md.getColumnCount();
                        String booktblheading[]={"Book ID","Book NAME","BOOK AUTHOR/PUBLISHER","REFRENCE","CATEGORY"};
                        for(int i=1; i<= booktblheading.length;i++)
                             columnNames.addElement(booktblheading[i-1]);
                        while(rs.next())
                             Vector row = new Vector(columns);
                             for(int i=1;i<=columns;i++)
                                  row.addElement(rs.getObject(i));
                             data1.addElement(row);
                             //System.out.println("data is:"+data);
                        ((DefaultTableModel)table.getModel()).setDataVector(data1,columnNames);
                        //DefaultTableModel model = new DefaultTableModel(data1,columnNames);
                        //table.setModel(model);
                        rs.close();
                        st.close();
                   catch(SQLException ex)
    }Please check my code and give me some Better Solution
    Thank you

    You already have a posting on this topic:
    http://forum.java.sun.com/thread.jspa?threadID=5143235

  • How to get the values of the value table ?

    Hello all,
    I want to get the values of the value table, given a domain name.
    Ex: To get the MATNR values of table MARA, giving the MATNR as input on the selection screen.
    Is it possible? Is there any FM?
    Thanks
    SR

    Hi
    forget my previous answer.
    Yuo can use a code like this:
    PARAMETERS: p_table TYPE  ddobjname,
                p_dom   LIKE  dfies-domname.
    DATA dfies_tab LIKE STANDARD TABLE OF dfies WITH HEADER LINE.
    DATA: ftab TYPE TABLE OF string.
    FIELD-SYMBOLS: <fs_table> TYPE table.
    CALL FUNCTION 'DDIF_FIELDINFO_GET'
      EXPORTING
        tabname        = p_table
      TABLES
        dfies_tab      = dfies_tab
      EXCEPTIONS
        not_found      = 1
        internal_error = 2
        OTHERS         = 3.
    CHECK sy-subrc <> 0.
    LOOP AT dfies_tab WHERE domname = p_dom.
      APPEND dfies_tab-fieldname  TO ftab.
    ENDLOOP.
    SELECT (ftab)
           FROM (p_table)
           INTO TABLE <fs_table>.
    In this case you have to create dynamically the table <fs_table> or you can also use a table string:
    DATA: T_DATA TYPE STANDARD TABLE OF STRING.
    SELECT (ftab)
           FROM (p_table)
           INTO TABLE T_DATA.
    Max

  • How to retrieve the values from a table if they differ in Unit of Measure

    How to retrieve the values from a table if they differ in Unit of Measure?

    If no data is read
    - Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
    If no quanity in result internal table
    - There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
    - - Remove the CORRESPONDING, so quantity will fill the first field adqntp1.  ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
    - - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
    * Fill the internal table
    SELECT msehi adqntp
      INTO TABLE internal table
      FROM lipso2
      WHERE vbeln = wrk_doc1
        AND msehi IN ('KL','K15','MT').
    * If required move the read quantity in the appropriate column.
    LOOP AT internal_table ASSIGNING <fs>.
      CASE <fs>-msehi.
        WHEN 'K15'.
          <fs>-adqnt2 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
        WHEN 'MT'.
          <fs>-adqnt3 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
      ENDCASE.
    ENDLOOP.
    - You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
    Regards,
    Raymond

  • How to display the values from the table in the screen

    Hi,
    I have created a screen where i will enter the values for the field treshold amount and desc and if i press update button  .it will update the new values by overriting the existing values .
    Now i have got requirement i need to create a button show which will display the existing value from the table. always there will be only one entry...in this table
    Please can one give me idea...to do this
    or sample code...thanks in advance
    regards
    paveeeeee

    Define a function code 'SHOW' for your button. In your PAI module, when you check for various sy-ucomms, check for 'SHOW' also.
    Your code will be like this:
    Case sy-ucomm.
      when 'SHOW'.
         perform show_details.
    endcase.
    In the perform, you can fetch the data from the table and put it in global variables. In the PBO, move the data from the global variables to the screen fields so that they get displayed on the screen.
    Hope this helps. Reward points for useful answers.
    Regards
    Nithya

  • How to set the value of the column as the value of other table coulmn.

    dear friends
    i have a table SO_D having coulm (so_no,item_cd,qty,rate,unit)
    and anather table so_tax(so_no,tax_code,tax_percent,tax_amt,item_cd,flag)
    now i have ALL VALUES in the first table i.e so_d
    but in table so_tax i have all values except item_cd.
    the values in the so_tax table comes from so_d by the formula ((qty*rate)*percent(which in so_tax table))/100) corresponding to each item_cd
    here so_no and item_cd are primary key in so_d and foreign key in the so_tax.
    and for each so_no the item_Cd is unique and my repeat for new so_no in the table so_d.
    now i have the problem that in the table so_tax the value in the coulmn item_cd is blank .
    but the tax amount is calculated for each item_cd .
    now i want to update the table with the item_Cd values ad they are in the so_d table according to the tax amount calculated by using above formula.
    please suggest the solution..
    any query please ask
    i can provide values for the each table..
    thanks in advance

    Data sample for the table so_d is
    SO_NO ITEM_CD QTY RATE UNIT
    AT0064 12000135 15 22163 NOS
    AT0064 12000136 15 20337.82 NOS
    AT0064 12000137 15 21902.27 NOS
    AT0064 12000138 15 20337.82 NOS
    AT0064 12000139 15 20337.82 NOS
    AT0149 CO000109 2 20755 NOS
    AT0149 CO000110 1 2502 NOS
    AT0149 CO000111 1 2502 NOS
    AT0149 CO000112 1 2502 NOS
    AT0149 CO000113 1 9328 NOS
    AT0149 CO000114 1 15476 NOS
    AT0149 CO000115 1 82150 NOS
    AT0149 CO000116 1 2915 NOS
    AT0149 CO000117 1 11766 NOS
    AT0149 CO000118 1 2968 NOS
    AT0149 CO000119 1 2968 NOS
    AT0149 CO000120 1 3286 NOS
    AT0149 CO000121 1 7950 NOS
    AT0149 CO000122 1 1908 NOS
    SAMPLE DATA FOR SO_TAX
    SO_NO TAX_CODE PERCENT AMT ITEM_cD FLAG
    AT0064 X02 4 13297 Y
    AT0064 X02 4 12203 Y
    AT0064 X02 4 13141 Y
    AT0064 X02 4 12203 Y
    AT0064 X02 4 12203 Y
    AT0149 V16 14.5 6018 Y
    AT0149 V16 14.5 363 Y
    AT0149 V16 14.5 363 Y
    AT0149 V16 14.5 363 Y
    AT0149 V16 14.5 1353 Y
    AT0149 V16 14.5 2244 Y
    AT0149 V16 14.5 11912 Y
    AT0149 V16 14.5 423 Y
    AT0149 V16 14.5 1706 Y
    AT0149 V16 14.5 430 Y
    AT0149 V16 14.5 430 Y
    AT0149 V16 14.5 476 Y
    AT0149 V16 14.5 1153 Y
    AT0149 V16 14.5 277 Y
    HERE ITE_CD IS BLANK

  • How to get all the values in the Select-option.

    Hi,
    I got the select-option field so_week, for eg. If I give 200923 to 200926 (year and week)  in the selection screen and then I need to pass this value (200923) to the FM 'ZWEEK_GET_FIRST_DAY' to get the first day of the week.
    My question is how can i get all the values from the select option, (i.e) i need to get 200923, 200924,200925, 200926.
    Regards,
    Anbu.

    Hello,
    I will prefer Max's solution. But just for the sake of this req.
    i need to get 200923, 200924,200925, 200926
    i am proposing my soln:
    DATA: V_WEEK TYPE RSCALWEEK.
    SELECT-OPTIONS: S_WEEK FOR V_WEEK NO-EXTENSION OBLIGATORY.
    AT SELECTION-SCREEN.
      DATA:
      V_COUNT TYPE I,
      V_ADD   TYPE I,
      RT_WEEK TYPE RANGE OF RSCALWEEK,
      RS_WEEK LIKE LINE OF RT_WEEK.
      V_COUNT = ( S_WEEK-HIGH - S_WEEK-LOW ) + 1.
      DO V_COUNT TIMES.
        RS_WEEK-SIGN = 'I'.
        RS_WEEK-OPTION = 'EQ'.
        RS_WEEK-LOW = S_WEEK-LOW + V_ADD.
        APPEND RS_WEEK TO RT_WEEK. "RT_WEEK--> Will contain the week values
        CLEAR RS_WEEK.
        V_ADD = V_ADD + 1.
      ENDDO.
    @Max: I was stupid enough not to think of your solution. Need to leave office
    Cheers,
    Suhas

  • Eliminate the values from internal table

    I have an internal table with fields..
    begin of it occurs 0,
    ebeln
    matkl
    werks
    end of it.
    its filled with values..
    ebeln |  matkl | werks |
    12111 |   A123 | LK
    12111 |   A123 | LK
    12111 |   A123 | LK
    12111 |   A123 | LK
    12111 |   A123 | LK
    12111 |   A123 | LN
    12121 |   A124 | LK
    12121 |   A124 | LK
    12121 |   A124 | LK
    12122 |   A125 | LK
    12122 |   A125 | LK
    12122 |   A125 | LK
    12123 |   A126 | LN
    12123 |   A126 | LN
    Now I want to eliminate the values from the internal table where all ebeln and werks are different..for example..all 12111's should be eliminated from the internal table as the it has different werks assighned to one of the ebeln's..and I need only ebeln's with 12121 and 12123.
    Any suggention would be helpful..
    Thanks,
    M/

    Hi,
    DATA : v_ebeln LIKE  table name-ebeln,
                v_werks LIKE table name--werks.
    SORT itab BY ebeln werks .
    LOOP AT ITAB.
      ON CHANGE OF  itab-ebeln.
          Move : itab-ebeln TO v_ebeln,
                    itab-werks TO v_werks.
       ENDON.  
       IF ITAB-ebeln  NE  v_ebeln OR
          ITAB-werks NE v_werks.
       DELETE ITAB WHERE ebeln EQ ITAB-ebeln .
        clear  : v_ebeln , v_werks.
    ENDIF.
    ENDLOOP.

  • Fetch the values from internal table inside an internal table (urgent!!)

    data : BEGIN OF PITB2_ZLINFO occurs 0,
             BEGDA LIKE SY-DATUM,
             ENDDA LIKE SY-DATUM,
             PABRJ(4) TYPE N,                       "Payroll Year
             PABRP(2) TYPE N,                       "Pay. Period
             ZL LIKE PC2BF OCCURS 0,
           END OF PITB2_ZLINFO.
    I have a internal table like this,
    How to Fetch the values from internal table inside an internal table.
    Kindly Help me on this..
    Regards,
    Ram.

    Hi,
    Try this....
    Loop at PITB2_ZLINF0.
    Loop at PITB2_ZLINF0-ZL.
    endloop.
    Endloop.
    Thanks...
    Preetham S

  • How to truncate the values from the table

    Hi All,
    I am working on an issue..where we are first deleting all the records from the table and then based on few conditions we are putting the records back in that table...when we tried to run this program along with few others those who are doing almost the same stuff we are having issues...we tried to schedule few jobs related to these programs only...but after a ceratin amount of time couple of jobs got canceled...I was talking to my basis guy and he said the problem is ratehr then truncating the records from the table we are deleting the records and it's taking lots and lots of space to execute...so we need to truncate the records from the table insted of deleting it...we are using the following the statement right now:
        DELETE FROM ZTUS_PG.
        COMMIT WORK.
    So can you please tell me how can we truncate the values from this table instead of just deleting them and what would be effect of this.
    Thanks,
    Rajeev Gupta

    I don't think basis is saying you should delete all the records from the table. They are saying remove the table and it's contents (a much faster thing to do). I'm not sure this the right thing to do, but you can have a look at:
    http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.sample.doc/doc/admin_scripts/s-truncate-db2.htm
    Something like:
    EXEC SQL.
      TRUNCATE TABLE ZTUS_PG REUSE STORAGE
    ENDEXEC.
    COMMIT WORK.                      "Empty table is committed here
    Rob
    Edited by: Rob Burbank on Dec 1, 2008 4:06 PM

  • When i am retreiving the values from the access table i am getting null val

    hi all,
    I comeacross the following problem,I connected my applet to the Access database with jdbc:odbc driver.
    I am trying to retreive the values from the table.I am getting the result correctly when the same code with using applet it was giving the correct result.
    when I am using an applet program it was giving the null value istead of the actual records.
    can anybody tell me the reason why
    thanks in advance
    and also how to connect the databse in the webserver when i installed my applet in the client side
    please give me some suggestions to do that
    thankyou
    lakshman

    Hi Krishna,
    Can you please copy the code generated by ODI for creating your C$ table ?
    i mean :- create table C$_0Entity ( from the operator log
    Regards,
    Rathish A M

  • How to pick the value of the line item in table control

    My screen.
    I have designed table control by referring internal table without using wizard.
    I have placed button inside of that table control.
    my requirement is by clicking the button it ll show the value of the line inside of the table control.
    I have used "get cursor...".
    But the problem is "it ll show only the cursor value of the front screen, if suppose i scroll the value of table control at the time also, it ll show the cursor value of the screen, it ll not show the exact value of the cursor inside of the table control.

    Wrong Forum Anand......!

Maybe you are looking for