Need to get the row selected in table control without ay action

Dear Team,
I have a requirement in which I need to pass the row selected of a table control to a variable.
Here I need to get the row selected with out any other action
then the action of selection of a row.
Is it possible to read table control values using FM DYNP_VALUES_READ.
thanks in advance,
regards,
Sai

HI,
Sai Kumar Potluri
I tried in IDES it working.
Here is the code.
REPORT  ZPRA_TC_D.
TABLES : SCARR.
CONTROLS TC TYPE TABLEVIEW USING SCREEN 1.
DATA : SELLINE TYPE I,
       SELINDEX TYPE I.
DATA : ACT LIKE SCARR-CARRID,
       ANT LIKE SCARR-CARRNAME.
DATA : ITAB LIKE SCARR OCCURS 0 WITH HEADER LINE.
CALL SCREEN 1.
*&      Module  STATUS_0001  OUTPUT
*       text
MODULE STATUS_0001 OUTPUT.
  SET PF-STATUS 'ME'.
*  SET TITLEBAR 'xxx'.
SELECT * FROM SCARR INTO TABLE ITAB.
ENDMODULE.                 " STATUS_0001  OUTPUT
*&      Module  MOV  OUTPUT
*       text
MODULE MOV OUTPUT.
  MOVE-CORRESPONDING ITAB TO SCARR.
ENDMODULE.                 " MOV  OUTPUT
*&      Module  USER_COMMAND_0001  INPUT
*       text
MODULE USER_COMMAND_0001 INPUT.
CASE SY-UCOMM.
WHEN 'BACK' OR 'UP' OR 'EXIT'.
  LEAVE PROGRAM.
WHEN 'SEL'.
  GET CURSOR FIELD SCARR-CARRID LINE SELLINE.
  SELINDEX = TC-TOP_LINE + SELLINE - 1.
  READ TABLE ITAB INDEX SELINDEX.
  ACT = ITAB-CARRID.
  ANT = ITAB-CARRNAME.
ENDCASE.
ENDMODULE.                 " USER_COMMAND_0001  INPUT
In Flow Logic.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0001.
LOOP AT ITAB WITH CONTROL TC.
  MODULE MOV.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT ITAB.
ENDLOOP.
MODULE USER_COMMAND_0001.

Similar Messages

  • ABAP WD, Multiple Row selection in table control without using Crtl key

    Hi all,
    I am displaying the records using the table control, i have to select the multiple records in the list <b>without using Crtl key</b>.
    How do i solve this?
    Thanks

    Hi,
    you should set the table parameter selectionMode to multi or multinolead
    than you can select multiple records,
    these you can retrieve: lt_selected_elements = node->get_selected_elements( ).
    also see this <a href="https://forums.sdn.sap.com/click.jspa?searchID=4209200&messageID=3544158">thread</a> for info
    grtz,
    Koen

  • How to get the rows from a table having some column has any letter

    Hi All,
    suppose i have a table having columns id(number), code(varchar).
    code has alphanumeric characters (ex. ABC123, 67B56 etc).
    some codes are only numbers (2344, 7898 etc).
    how can i get the rows which have alphabets in the code.
    ex:
    id code
    1 AB45
    2 456
    3 890
    4 67B7
    how can i write a query such that it should give me the ids 1 and 4 (as they have alphabets in code)
    thanks in advance to all

    Thanks to one and all.
    i am gettig my required output.
    But i have a doubt in the operator.
    If i add or remove '[]' in the operator, i am getting different ouputs.
    There is a count difference in the result of the operators used.
    REGEXP_LIKE(<column>,'[[:lower:]]')
    REGEXP_LIKE(<column>,'[[[:lower:]]]')
    REGEXP_LIKE(<column>,'[:lower:]')
    Can anybody please explain what is the difference in using '[]', in the operator?
    What is the correct syntax, whether i have to use two '[]'s or one '[]'.
    Also, can i use REGEXP_LIKE() in oracle 8i version.( I am unable to use the operator in 8i)?
    Any query to get the required output in 8i version?
    Thanks in advance to all.

  • How to get the row selected in af:inputComboBoxListOfValues

    Hi,
    Am using jdev 11.1.1.2.1.
    Am using af:inputComboBoxListOfValues component , i have made the component based on the " department id" and the display value is " department name".
    In the value change listener i want to get the selected department id but currently am getting only the department name.(using valueChangeEvent.getNewValue().toString())
    So is there any way to get the entire row and get the "department id" using that ??
    Please help.
    Thanks,
    Hari

    Sorry for the confusion, needed to check it out:
    this code should work:
        public void nameValueCangeListener(ValueChangeEvent valueChangeEvent) {
            FacesContext contxt = FacesContext.getCurrentInstance();
            valueChangeEvent.getComponent().processUpdates(contxt); // after this the new row is selected!
            BindingContext lBindingContext = BindingContext.getCurrent();
            BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry();
            JUCtrlListBinding list = (JUCtrlListBinding) lBindingContainer.get("YOUR_LIST_BINDING_NAME");
            Row lFromList = (Row)list.getCurrentRow();
            Object lAttribute = lFromList.getAttribute("YOUR_ATTRIBUTE_YUO_WANT_TO_GET");
        }Timo

  • Can you select the row in a table view without highlighting the cell?

    I have an an app with a table view which is presented modally. Cell selections in this table are saved in the parent controller so that they can be reselected if the table is reloaded after being dismissed.
    When the cell is first highlighted, I want to momentarily highlight the cell and have it fade out, which I do by unselecting the cell from the modal view controller's didSelectRowAtIndexPath by calling setSelected:animated on the table view cell.
    However, when I present the table view controller modally again and want to display the previously selected cell as selected, I don't want the cell background to be highlighted, and I'm having trouble doing this.
    In order to make sure the table view knows the cell is selected, I am calling selectRowAtIndexPath. I need to make sure the cell is selected so that I can set/unset the cell's accessoryType. However, this has the sideeffect of highlighting the cell too, which looks weird and confusing to the user.
    I've tried things like temporarily setting the cell's selection style to none, but while that stops the cell background from highlighting? I've tried setting the selectionStyle to UITableViewSelectionStyleNone, but while this prevents the cell background from highlighting, the cell text still changes to white, so it the text is invisible against the white background.
    Is there a easy way of setting a cell to selected in the table view without also changing the highlight and text colour of the actual cell? Immediately setting the cell to be unselected still makes the highlight visible for a split second.

    I tried that, but setting the highlighted property doesn't seem to affect it.
    I figured out how what I was doing wrong though. I was setting selection style UITableViewSelectionStyleNone, selecting the cell, then setting the selection style back to whatever it had previously been. This causes the background not to draw highlighted, but the text and accessory type to still draw highlighted.
    In order to fix this, I moved the code to set the cell selection style to whatever it had previously been to the didDeselectRowAtIndexPath method.

  • How to get the focus in a Table Control

    Hello Experts,
                         I have a simple Table control in my screen . I want to know under which column my cursor is ? Basically i want to get the focus the table control . How can i achieve this  ?
    Thanks
    Vivek

    >
    Vivek Joshi wrote:
    > Hello Router ,
    >                      I do not want to set the focus , I want to get focus . User can click on any cell in the table and then press a button in the toolbar . Now in the event handler of the button i want to under which column User has set the focus .
    > I hope , I am clear now .
    > Thanks for your help
    > Regards
    > Vivek
    An yet you keep getting suggestions of how to set the focus.   I looked through the API documentation and I don't see anything that would suggest you can request to see where the current focus is.  Perhaps someone might still come along with a solution, but my hopes wouldn't be too high at this point.  I can pass the requirement onto Product Definition, as the use case does seem interesting.  Perhaps it is something we have even considered in the past. 
    But for now, there might be a better way to solve your problem.  It will probably mean redesign the interaction.  What exactly are your requirements?  Do you need to be able to get the data in a particular cell of table when a button is clicked?  Just throwing out some ideas here, but maybe just use the lead selection to select the row, but then have a button choice to choose the action associated with the column you want. A hack for sure - but it might work.  Also it doesn't help you right now, but in the near future update to NetWeaver 7.0, WDA does have a onColSelect event for the table.

  • How to increase the rows of a Table control on ITS

    Hi,
    I'm trying to increase the number of rows to 20 on ITS but it always shows 2 rows per navigation. Although in the backend module pool there are 8 rows and the GV_SOS_LIST_CONTROL-LINES contains the total no of rows of the internal table. yet there are always 2 rows getting printed. This screen is in different function group and being called from some other function group i.e BBP_SC_UI_ITS. Are there any parameters that we have missed out to pass from BBP_SC_UI_ITS to our function group. Reply needed urgently!!!!!!!!!!!

    Hi,
    i tried increasing the rows on the browser by hard coding the counter and then the rows do increase but the records that are shown are still 2 per navigation. i doubt if it is a screen size constraint. the transaction in which i'm trying all this is bbpsc01.

  • Get all rows from a table control

    Hi All,
    I have a table control with one column. What function should I use to retrieve all the rows ? Do I need to iterate row by row and read each row or is it possible to do it in one function ?
    Thanks,
    Kanu
    Solved!
    Go to Solution.

    Supposing vells in the column have all the same data type, you can retrieve the whole column with a single instruction:
    GetTableCellRangeVals (panel, control, VAL_TABLE_COLUMN_RANGE (1), array, VAL_COLUMN_MAJOR);
    The array passed must be large enough to retrieve all data. Alternatively, you may substitute the macro VAL_TABLE_COLUMN_RANGE with the appropriate MakeRect instruction.In case your table was dinamically built, you can obtain the nu,ìmber of rows using GetNumTableRows and dimension your array accordingly.
    The above macro is defined in userint.h together with some other useful macros that can be used to access data in a table.
    There are some precautions to take in case of string values or some cell type (ring, combo box, button...) that are described in the hell for the function.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to get current row data in table control

    Hi , expert ,
       I am professional in oracle ,  but  now I am a new guy in SAP ABAP .
    I  have a question in UI
    How to get current row data and click pushbutton  in table control  to open next screen ?
    I want to get the current data and open next screen to carry out detail detail .
    Thansk for all your suggestion .

    GET CURSOR LINE SY-CUROW .
      READ TABLE internal_table index SY-CUROW.

  • To insert a new row in a table control without affecting the other rows

    Halo experts,
    I have a Table control TCTRL in a program .
    The lt_tab contains two cols A and B
    In change mode of the transaction Col A is in display mode and Col B is in change mode
    When i press the + button to insert a new blank entry .I need a blank row with both col A and col B input enabled w/o affecting the display of above and below rows of table control
    In PBO module of subscreen 101
    LOOP AT lt_tab  WITH CONTROL tctrl.
    MODULE tctrl_status.
    endloop.
    In the user command of 0101
    i am writn
    When 'INS'.
    INSERT INITIAL LINE INTO itab.
    Inside MODULE tctrl_status.
    IF lt_tab IS INITIAL.
        LOOP AT SCREEN.
          IF screen-name = 'COLA'.
          screen-input = 1.
      ENDIF.
        ENDLOOP.
          MODIFY SCREEN.
    endif.
    but the problem here is still the Col A is in display mode and Col B is in change mode after output
    .Here modify statement is happening but it does not update the TCTRL-COLS-Screen structure for the col A ( which I have set statically while designing the screen ).I dont want to make the entire row in edit mode only the inserted row ( for both Col A and Col B) and the rest shud remain as it is
    Thanks
    Kallu

    hi Naveen
    I have made my tctrl input disabled for both the columsn and
    I have a module before the PBO loop where I set the like
    module set_tctrl_status.
    IF gv_ok_code NE gc_disp.
        LOOP AT tctrl-cols INTO gs_cols.
          IF gs_cols-screen-name = 'ColB'.
            gs_cols-screen-input = 1.
            MODIFY tctrl-cols FROM gs_cols INDEX sy-tabix.
          ENDIF.
        ENDLOOP.
    This is just to set the Col B in edit mode when in change and create status.
    But if i press the INS button for that change i am coding inside the loop endloop of the pBO like
    if itab is initial.
    LOOP AT tctrl-cols INTO gs_cols.
    gs_cols-screen-input = 1.
    MODIFY tctrl-cols FROM gs_cols INDEX sy-tabix.
    endloop.
    But the problems i it is setting the enite rows as input enabled . I want tos et only that row inpur enabled

  • ABAP WD, Multiple Row selection in table control

    Hi all,
            I am populating and displaying the records using the table control, i have to select the multiple records in the list and want do some deletion,selection,so i could not select the more than one record.
    How do i solve this?
    Please give me your valuable suggestions.
    Thanks

    Hi ulli,
    thanks for your quick reply,
    now its working for me but i have to press the 'CTRL' key and select the row, for selecting the multiple rows.
    one more thing i wanted some methods for "DELETION", "SELECTING ALL RECORDS","DESELECTING",in the displayed list.
    plz suggest me..,
    thanks and regards
    kamal

  • Multiple row selection in table control...

    hi...
    i can select one row from table control and display in a list..
    the same thing i want to do for multiple lines...
    thanks..

    use the table control wizard to create a table control on the screen...while going thru the steps, there will be a screen which asks you about the selection column (this is a single character field in your internal table). on this step there is a selection option for single/multiple selection of rows....
    to access the selected records, use...
    loop at itab where sel eq 'X'.
    endloop.
    where
    <b>itab</b> is the underlying internal table for table control and <b>sel</b> is the name of the selection column
    or if u already have a table control on screen...double click and open the properties window...there u can see radio buttons None, Single and Multiple for line selection. choose the multiple option.
    rgds,
    PJ
    Message was edited by: Priyank Jain

  • Need to get the heart rate in run keeper without bying expense additional hardware

    Hi,
    I am using runkeeper to track my activities.
    Till now, there is no compatible bluetooth device that can work directly with the iPhone in order to get the heart rate, this is very dispapointing.
    Any project in progress on this point?

    archman-cro wrote:Just a wild guess here: Try putting "resume=" in menu.lst as "by-uuid" like you have with the root partition.
    Nope, that didn't help. now the dmesg related lines appear as:
    TuxOnIce 3.2-rc1 (http://tuxonice.net)
    TuxOnIce: Can't translate "/dev/disk/by-uuid/4564e7cd-aa5b-4b41-a7b5-20db4069bf1b" into a device id yet.
    Also, that 6GB swap partition you got is a pure waste or resources. You need 3GB of swap max, and that is only if you want to store all your cache when you hibernate. If not, you don't even need a swap. If you're a normal user (means, you're not using some resource heavy apps, like those for editing HD vids or similar).
    Sadly I realized that quite late Can't do a thing about it now.

  • Get the count of rows in a table control

    Hi Experts,
      How do I get the count of the rows in a table control during run time.
    I am developing a BDC in which I have to check all entries in a table control.
    My requirement is to get the total number of rows in a table control dynamically.
    Thanks
    Kumar

    Hi,
    Use a variable when u r passing the records from the internal table to the screen fields
    and display the same.
    I think this idea may help u.
    And pls explain me ur requirement clearly.
    Refer to the following link this may help u.
    http://sapabapnotes.blogspot.com/2008/03/working-with-ecatt-extended-computer.html
    Reward if helpful.
    Jagadish

  • How to get the Row and Column values in ALV (without using Objects)

    Hi All,
    I need to get the Row / Column when double click is used in ALV, I can use the double click event for this. However, I do not want to use the Object Oriented ALV. I want to implement the same functionality using general (using functions) ALV.
    Is there any way to get the row / column values for a Generia (non-OOPs) ALV report.
    Please help.
    Thanks,
    Vishal.

    Hello,
    The only think you have to do is to get the index where the user clicked, and then read the internal table you sent to the alv
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = 'prg_name'
          i_callback_pf_status_set = 'SET_PF_STATUS'
          i_callback_user_command  = 'USER_COMMAND' " this is to the click event!!
          i_callback_top_of_page   = 'TOP_OF_PAGE'
          is_layout                = alv_layout
          it_fieldcat              = alv_fieldcat
          i_save                   = 'A'
          it_events                = alv_events[]
        TABLES
          t_outtab                 = i_totmez.  ---> TOUR IT.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    " then....
    FORM user_commandUSING r_ucomm     TYPE sy-ucomm
                                    ls_selfield TYPE slis_selfield.
    " r_ucomm -> HAS THE STATUS
    " ls_selfield-tabindex  -> HAS THE SELECTED INDEX
    " THEN READ THE INTERNAL TABLE
    " HERE YOU WILL HAVE THE SELECTED ROW
    READ TABLE i_totmez INDEX ls_selfield-tabindex.
    ENDFORM.
    cheers,
    Gabriel P.

Maybe you are looking for

  • Thousands of entries in Apache access logs for a single IP

    We are seeing thousands of connections in our Apache access logs coming from the same IP address connecting to the same pages with in a short period of time (~5-20 minutes). We see this in Firefox 27, 28, 29, and 30. Below is an example of the entrie

  • ERROR: DW050:  - Acrobat Professional : Install failed (CS6 design

    ERROR: DW050:  - Acrobat Professional : Install failed (CS6 design & web Premium) win7 64bits ***************************************error message after installation failure*************************** Exit Code: 6 Please see specific errors and warni

  • My Macbook Pro (10.6.8) takes about 5 minutes to boot

    I'm not against a Re-Format, but short of that is there anything that could be recommended? Its just a pain to reinstall all the software.

  • Is there anyway to get a list of songs that won't transfer to my ipod?

    Every time I sync my ipod I get 74 items that are not able to be transfered. I know I can click on the + below the notification but I want to be able to see them listed by artist or album not by song. I just want to delete them off my Itunes so this

  • Membership.CreateUser() error

    I use Membership.CreateUser() method to create user , it works fine when browsing site locally i.e. with in LAN but when I put my site Online and access it from outside my network it gave Null Exception. Membership.CreateUser("Name", "password" "Emai