How to data from selected row of a TABLE

Hi ,
I have a table displaying some PO order details. In the last column , I have a field with element Link to Action . My requirement is , that when I click on the link to action column of specific row , I want to get the data present( specifically the the data present on the first column which is PO number) i that specific row.
How can i get this data?
Regards
PG

Hi PG,
If you want to get Selected row data,  you can use get_selected_elements
Try this example code.. this gives you selected records into one table..
  DATA lo_nd_et_postab_1 TYPE REF TO if_wd_context_node.
  DATA lo_el_et_postab_1 TYPE REF TO if_wd_context_element.
  DATA ls_et_postab_1 TYPE wd_this->Element_et_postab_1.
  DATA lt_et_postab_1 TYPE wd_this->Elements_et_postab_1.
DATA: wa_temp TYPE REF TO if_wd_context_element,
        lt_temp TYPE wdr_context_element_set.
navigate from <CONTEXT> to <ET_POSTAB_1> via lead selection
  lo_nd_et_postab_1 = wd_context->path_get_node( path = `ZSHP_EXTENDED_DUE_LI.CHANGING_3.ET_POSTAB_1` ).
  CALL METHOD lo_nd_et_postab_1->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_et_postab_1.
    append ls_et_postab_1 to lt_et_postab_1.
    CLEAR ls_et_postab_1.
  ENDLOOP.
lo_nd_et_postab_1->bind_table( new_items = lt_et_postab_1 ).
NOW LT_ET_POSTAB_1 Contains selected records in table.
Hope it helps...
Cheers,
Kris.

Similar Messages

  • How to pass a selected row in a table to an popup iview?

    Hi,
    I want to select a row in an output table and the data from this row should be noticed in an popup iview. How can I handle This?
    Thanks for answers!

    You can do it via regular pop-up (01)or by using Nested iView as pop (02).
    01.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/69/ffdb4269b2f340e10000000a1550b0/content.htm
    02. POP up  event
    Regards,
    Gilson

  • Get values from selected row in a Table?

    Hello.
    I'm on VC 7.1 (the trial version downloaded from SDN).
    I'm trying to figure out a way to retrieve some values from the currently selected row in a Table element through the output connector.
    I have a web-service which returns results to the Table, and I want the user to be able to select one of the rows and then trigger another web-service call with some of the values from that row -- is this possible?
    Also, I can't find any documentation that lists what can and can't be done with each UI element, is there something like this some where? (the Modeler's guide doesn't help, and the Reference guide seems to focus on menu items and what the VC screen looks like)
    Thanks,
    Alon

    Hi Alon
    This is a very simple task.
    You just need drag the service which you want to execute, after select row, in model.
    Drag output connector from table to input connector of service. Then map the parameter.
    Regards
    Marcos

  • How to capture a selected row in a table control in screen

    Hello,
        I have a table in a screen and hv data in it also from a table.Now i want if a user selects a row n clicks a display button , i should display the same fields in empty text fields created outside the table on the same screen.
    Rite now i m lookin for single selection but any help on multiple selection is also welcomed.
    I have given a line-selection element name as 'LSELECT1'  to the table in screen painter n have declared a variable also with the same name of type C(1) in my abap prog.But dont know wat to write in PAI now to caputure the selected row.
    THANKS

    Hi,
    Use ALV to display your table records from FM 'REUSE_ALV_GRID_DISPLAY'.
    In your internal table add a field with char1. This will show you the selected records by 'X' or ' '. Use this field in your layout like g_layout-box_fieldname = 'CHK'.
    Here i used CHK TYPE CHAR1 added to internal table to display. Now ur ALV will be showing u a column to select records. U can select multiple records also. Evry selected record will reflect into internal table by modifying value of CHK as 'X'. Add button to ALV by creating PF-STATUS and  add code its behavior when executed.
    DATA: BEGIN OF ls_ekko,
          ebeln TYPE ekko-ebeln, " this is my internal table showed in alv
          bukrs TYPE ekko-bukrs,
          bstyp TYPE ekko-bstyp,
          bsart TYPE ekko-bsart,
          lifnr TYPE ekko-lifnr,
          ekorg TYPE ekko-ekorg,
          ekgrp TYPE ekko-ekgrp,
          waers TYPE ekko-waers,
          chk(1)   TYPE c, " check field
          END OF ls_ekko.
    DATA it_ekko LIKE TABLE OF ls_ekko.
    DATA : gt_fcat    TYPE slis_t_fieldcat_alv WITH HEADER LINE,
           g_layout   TYPE slis_layout_alv,
           gt_fcat1    TYPE slis_t_fieldcat_alv WITH HEADER LINE,
           g_layout1   TYPE slis_layout_alv.
      g_layout-colwidth_optimize = 'X'.
      g_layout-box_fieldname = 'CHK'. " adding check field to alv
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
       i_callback_program                = sy-repid
       i_callback_pf_status_set          = 'PF_STATUS_ALV'
       i_callback_user_command           = 'USER_COMMAND_ALV'
      IT_EXCLUDING                      =
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
          is_layout          = g_layout
          it_fieldcat        = gt_fcat[]
          i_default          = 'X'
          i_save             = 'A'
        TABLES
          t_outtab           = it_ekko
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
    *&      Form  PF_STATUS_ALV
        Subroutine for PF status
         -->RT_EXTAB   text
    FORM pf_status_alv USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'SELOBJ' EXCLUDING rt_extab.
    ENDFORM.                    "PF_STATUS_ALV
    Hope this help

  • How to display multiple selected rows in a table inside a popup?

    Hi,
    I have a table on which multiple selection is enabled. I am able to get hold of multiple selected rows i.e. i am able to iterate over the selected row keys and print their values. Now, my problem is how to display the contents of all the selected rows in a popup? I get the details of only one row when I launch the popup.
    Thanks
    Karan

    Hi,
    Not confident if this works or not but just try it...
    1. create a ViewLink between the same view Object.
    The source and destination wil be the same Vo and the source and destination attribute will be the pk of both Vos.
    2. Update the changes in Appln Module.
    Open the AM and in DataModel tab .
    select the Same VO from which you created table in the DataModel Listbox and select the VL in the "Avaible View Objects" List Box. Add under it(selected vo in datamodel listbox).
    3. Refresh DataControl accordion.
    4. in your jsff page drag and drop the child vo as a table..
    See if it works
    Regards,
    Santosh.

  • How to get the selected rows in a table

    Hi,
    How to get the ids of all the selected rows. On Page load a query is executed that shows the data in a table with a checkbox in the first column to select the rows and delete. Now if a user select multiple rows how do I get the ids of selected rows in the backend code.
    Thanks

    Please search the forum before posting questions.
    refer following thread for table selection.
    Re: Record selection with MessageCheckBox and print the selected record.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                           

  • How to populate the selected row details of table in the next view?

    hi,
    Im having a table, on selecting a particular row of a table by clicking on a radio button. i need that row details to be passed on(populated) to the next view when i navigate to that view by clicking on a button?
    Thanks & Regards,
    Suresh

    Hi Suresh,
    Your scenario is simple. Just follow the ex as shown below
    (Assuming you want default selection view provided by table itself.)
    1>Create 2 views (Ex:A and B)
    2>Create a Context with a node and attributes(For Ex:Person as node and Fname and Last Name as attributes
    2>In A view create a table with F name and L Name(map to context as well) and a action button to navigate to B view when you selected a particualr row o.k
    3>In B view, create a TextView with mapping to LastName(or all the data if you want from input selection) from the context
    If you want you can add back action button from B view to A view for easy navigation.
    4>Execute the application and select any row in the table appeared, press next action button,you can see that the selected row details will be shown in second(B) view.
    If you do the above example, I think you can easily find the solution for navigation issue.. try it out.
    In case if you are not able to ...let me know..I have that example.
    Hope that helps
    Regards
    Praveen

  • How to get the class from selected row in af:table

    I know that you can get individual selcted row values from an af:table using getRow().getAttribute("attName").
    But, can I obtain the class that the table iterator used to populate the table?
    For instance, a table lists the result of an employee search that was bound to a session bean method returning List<Employee>.
    After selecting the employee of interest and clicking a command button I want to access that instance of the Employee class to pass onto the session bean to do some stuff.
    I don't want to hit the database to do it either (via a query on a key value for example) - the search iterator has already retrieved it, I just want to access it and do something with it.
    Possible?
    Thanks.

    Hi,
    if you use ADF try iterator.getCurrentRow().getDataProvider() on the binding container. If you use ADF Faces without then the Row object is the instance of your class
    Frank

  • Updating data from multiple rows in a table view

    Hello,
    so far in my OAF programming, I have always selected one particular row from a table and saved from it. Now I have a requirement where in my table, fields from more than one row shall have to be updated.
    Can anyone please let me know how to accomplish this.
    Regards
    Hawker

    Hi Prince,
    currently I am selecting one row from the table and rendering a region at the top of the table and capturing the user entered data with the following code:
    ViewObjectVOImpl vo = getViewObjectVO1();
    Row CurrentRow = vo.getCurrentRow();
    //After this I perform the checks like user entered value is not null or check input as per business logic.
    if(CurrentRow.getAttribute("attributeName") ==null){
    //Add what message you want to display
    //Add other business logic.
    After making all the checks, i commit it.
    getOADBTransaction().commit();
    Now in my new page I am capturing the user input in the table itself like an excel sheet. Suppose there are ten rows in my advanced table on my page, and each row has one editable field. I have one save button at the bottom of the table.
    Now on clicking the save button I have to capture the user input, check whether there is any null value and if all the entered data is correct then only I should commit it.
    Can you please let me know how we can accomplish that.
    Regards
    Hawker

  • How to select data from 3rd row of Excel to insert into Sql server table using ssis

    Hi,
    Iam having Excel files with headers in first two rows , i want two skip that two rows and select data from 3rd row to insert into Sql Server table using ssis.3rd row is having column names.

                                                         CUSTOMER DETAILS
                         REGION
    COL1        COL2        COL3       COL4           COL5          COL6          COL7
           COL8          COL9          COL10            COL11      
    1            XXX            yyyy         zzzz
    2            XXX            yyyy        zzzzz
    3           XXX            yyyy          zzzzz
    4          XXX             yyyy          zzzzz
    First two rows having cells merged and with headings in excel , i want two skip the first two rows and select the data from 3rd row and insert into sql server using ssis
    Set range within Excel command as per below
    See
    http://www.joellipman.com/articles/microsoft/sql-server/ssis/646-ssis-skip-rows-in-excel-source-file.html
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Get ID from selected row in data table

    Hi!
    Does someone know how to get ID from row on which I click a button or link?
    getRowData() doesnt work!
    Or any other method in jsp or just something to get the ID from selected row?
    Thanks!!!

    Hi,
    I have a table with 3 columns, where column 1 represents the key, column 2 represents the data and column 3 displays the "details"-button. If you use
    String key =(String)outputText1.getValue();
    the variable key contains the key value of the row of the column in which the "details"-button was clicked. (outputText1 is the Output Text field of the first column).
    Problem with this is that the key Value must be displayed in the table but maybe it works if the OutputText Field is not rendered, too. If anyone has another (maybe nicer) solution for the problem i would be pleased to see it here.

  • HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?

    HI,
    HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?
    thanks,
    samba.

    By selection screen, what do you mean?   There is no selection screen in WDA as there was in classic dynpro. Do you mean you are using the Select-Options reusable component?  Are you wanting to call a standard transaction via ITS - SAPGUI for HTML?  Please provide more details to your question.

  • How save data from the one row of db to the one cell of excel sheet

    hi
    how to save data from one row of db to the one cell of excel sheet and so on..............

    hi,
    see this link
    http://poi.apache.org/hssf/quick-guide.html
    Regards,
    Ram

  • How to retrive data from selected checkboxes with fieldnames

    hi experts,
    how to retrive data from selected checkboxes with fieldnames into another alv grid report.(here the fieldnames selected from  table names is dynamically).
    thankx in advance
    rani.k.

    Hi,
    Use user_command in the alv grid and then
    do the follwoing code
    FORM user_command1 USING lv_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    Declaration of local Variables
      DATA : lv_ref1 TYPE REF TO cl_gui_alv_grid.
      DATA lv_cnt TYPE i.                                    "+INS SUHESH 12.07.2008
    Check function code
      CASE lv_ucomm.
        WHEN 'ONLI'.
          CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
            IMPORTING
              e_grid = lv_ref1.
          CALL METHOD lv_ref1->check_changed_data.
    now loop ur final internal table where check = 'X'.
    now pass data to other internal table..Now the internal table will be having values that the user selcetd on the screen.
    Hope this helps.
    Regards,
    Nagaraj

  • Selecting data from a cell in a table

    I want to be able select data from a cell in a table by looking up a specified header row and header column. For example, if my table has column headings of "Micro", "Emerging", and "Large" and my rows are labeled "Silver", "Gold", and "Platinum", how do I find the data in the table that is associated with column "emerging" and row "Platinum"?

    I thought that pointing to the User Guide was clear enough but it seems that it wasn't.
    Assuming that you have a spreadsheet with two sheets.
    The first one is named "jardin"
    it contains a table named "potager"
    a column header of this table is "carotte"
    a row header of this table is "longue"
    The cell of row "longue" of column "carotte" contains "cuite"
    The other sheet is named "garden"
    it contains a table named "potager"
    the column header of column 3 of this table is "carotte"
    the row header of row 5 of this table is "longue"
    In cell E10 of this table insert the formula :
    =INDIRECT("jardin"&" :: "&"potager"&" :: "&"carotte"&" "&"lapin")
    It will grab the value of row "lapin" of column "carotte" of table "potager" of sheet "jardin"
    This result is "cuite"
    I hope that now you are able to achieve your goal which we may write, in French :
    Les carottes sont cuites.
    Yvan KOENIG (VALLAURIS, France) lundi 7 juin 2010 16:59:52

Maybe you are looking for