Table Control Cursor Position

Hi All,
in table control 6 records are coming. if i change the 5th,6th... row so how to get that position which i have changed.
Ex..
SR.         Matnr                                                     QTY.
1           NMSHH01001DENDESS                          25
2           NMSHH01001DENDESS                          25
3           NMSHH01001DENDESS                          25
4           NMSHH01001DENDESS                          25
5           NMSHH01001DENDESS                          25
6           NMSHH01001DENDESS                          25
thank's
Amit

Hi,
In the PAI when u loop on to table control. 'current_line' will give u the line no that u have changed.
Regards,
Sarang

Similar Messages

  • Table Control - Cursor placed on same field

    Hi,
       I am facing one problem in a User defined Screen that having Table control.
       I written some validations for each and every field in Screen including Table control.
       But each & every time i am pressing Enter , the cursor is going to first field in the screen . I want to restrict this one...i want to be cursor on the field which i entered value at that time or next navigation field.
       How i can achieve this...cursor should stay on the same field , it should not go to first field.
       Pls give ur suggestions...
    Thanks in Advance,
    Best Regards,
    pavan.

    Hello Pavan,
    This is the first time I'm coming across this problem and I find it quite peculiar. Anyways, I can think of one option that you can try out.
    Use the option GET CURSOR FIELD to get the cursor in the PAI event and then use the SET CURSOR FIELD statement in the PBO to set the cursor to the appropriate field.
    Regards,
    Anand Mandalika.

  • Controling cursor position.........

    AOA
    how could i control the cursor position on my swing GUI.
    Suppose i have two JTextFields jt1 and jt2.
    jt1 lies above jt2 in jPanel. My requirement is to have cursor in jt2 instead of jt1 at start of GUI application.
    How could i contrl curosr position.
    Regards

    JTextField inherits the grabFocus() method from JComponent, try using that.

  • Cursor positioning in table control: marking content of a field

    Hello everybody,
    I use a table-control for data input. For fast data input, my customers need dynamic positioning of the cursor. I'm using the set cursor field ... line ... statement and it works fine, except for one problem with a large text-field:
    Is it possible to set the cursor in a field plus mark all the content of the field? The behaviour, i'm looking for is that any input in the field will replace the existing content. Is there any other option?
    Thank you for any suggestions, regards, Kathrin!

    So you want dynamic cursor positioning within a table control. Take a look at FM SCROLLING_IN_TABLE and demo program DEMO_DYNPRO_TABCONT_LOOP. If this does not address your requirements the you can do it manually as follows:
    For example, your internal table has 30 rows, your table control displays 10 rows (value of sy-loopc) at one time. The value of <tabctrl>-top_line contains 11, meaning you are at the second page of table control. Your cursor is at 12th row and now on pressing ENTER, you want the cursor to be positioned at 13th row.
    In your PAI, issue the statement GET CURSOR LINE <lineno>. This will give you the current cursor position in the table control with reference to the top row currently displayed. So the value of <linno> will be 2.
    In your PBO, calculate the next line no to position your cursor into. This can be done by the formula:
      next_line = <tabctrl>-TOP_LINE + <linno> - 1.
    Then issue the statement SET CURSOR FIELD <field_name> LINE <next_line>.
    Hope this helps.
    Regards
    Message was edited by: Shehryar Khan

  • To handle cursor position in table control while using insert initial line

    hi,
          I have a requirement to handle cursor position in my table control in which i am using insert initial line by incrementing the index. Now i am handling the cursor position by using set cursor but after 14 records it is going to the first field of the screen. My table control length is 14 records.
          How to handle this, please reply me if anyone know.
    thanks & regards,
        sekhar.

    hi,
             I need to page down the page and then want to set cursor position but for this system command i am getting space for every command. Page down and cursor down or enter every thing it is taking as space. So for this how can i handle it.
    thanks & regards,
        sekhar.

  • Set cursor position within table control while scrolling

    hi,
    Anybody can guide me how to set the cursor with in table control while scrolling down,normally it is going to first input filed.
    Thanks and Regards,
    palani.

    Hi Palani,
    Could you please share with me what all you have done regarding get and set cursor. I am facing similar problem where
    I have made a Z Table Control where i have given vertical and horizontal scrolling . Now when I scroll and try to select a row, then ZTABLE_CONTROL-CURRENT_LINE fetches line number not from the top, it fetches from the current top of ztablecontrol.
    It is onlyy changing the value on scrolling, if i do not scroll table control then value is coming correct.
    My requirement is whenever i select any row of ZTABLE CONTROL i need to get the curent line number from top. Please guide me what should i do.
    Early reply will be rewarded.
    Thanks.

  • How to control the cursor position in the Table control in Module pool

    Hi,
    Can any body tell me how to change the cursor positon from last field of the first record to the
    first field of the second record , when user presses enter in the last field in the module pool
    programming.
    Thanks

    Hi,
    Please avoid posting duplicate posts.
    Re: how to get the cursor position from screen in module pool program
    Nag

  • How to set cursor in table control?

    I have a table control (Screen 300) to display invoice number and amount. For some checks we have around 200 invoices to be displayed.  When user enters the invoice number in invoice text box and click on OK, it should highlight the invoice number and amount row or set the cursor position.
    I have another problem.
    Screen 300 is being called from Screen 200. When the user clicks on OK in 300, 300 is getting closed. Acutally it should be displayed with Cusor position or highlighted row.
    I appreaciate your help ... Thanks

    I believe that you can use the SET CURSOR statement to do the first part of your requirement.  Something like this should work:
    SET CURSOR FIELD w_field LINE w_line.
    Here's the info from SAP help:
    Effect
    : The cursor is positioned on the screen element whose name is contained in upper case in field. The data object field must be character-type and flat. The screen layout or a table control is scrolled in the display so that the screen element on which the cursor is positioned is visible. If the specified screen element is not found, the statement is ignored.
    If the specified screen element is part of a table control or a step loop, the line of the table control or group of the step loop in which the cursor is positioned on the specified screen element must be specified using the addition LINE. For the data object line, the type i is expected. If there is no line or group for the value of line, or the addition LINE is not specified, the statement is ignored. The statement is also ignored if the addition LINE is specified and the screen element is not part of a table control or step loop.
    I hope this helps.
    - April King

  • Can set the cursor in next line when user inputted one record?table control

    For Dnypro Table control
    I just know when data check error, we can set the cursor to the error field of current line.
    Now user hope that after they inputted the data of one record, he enter the [ENTER], the cursor can be set to the next new line's first field.
    I tried to use such as
    [SET CURSOR FIELD 'WA_XXXX-XXXXX' LINES 5.].
    But if no any error , the cursor will be automatically setted to the field which setted at Cursor position in Dnypro's attribution
    Can it be realized?
    Thanks.

    try to use same procedure as when you program page down:
      DATA: ITAB_LINES LIKE SY-TABIX,
            FIRST_LINE LIKE SY-TABIX,
            J LIKE SY-TABIX.
      GET CURSOR FIELD CURSOR_FIELD.       "to see what Loop is selected
      DESCRIBE TABLE IRE05 LINES ITAB_LINES.
      RE05-LINES = ITAB_LINES.
        WHEN 'P+'.
    FIRST_LINE = RE05-TOP_LINE + LOOPLINE_IRE05.
    ->      FIRST_LINE = RE05-TOP_LINE + 1.
          J = RE05-LINES - LOOPLINE_IRE05 + 1.
          IF J LE 0.
            J = 1.
          ENDIF.
          IF FIRST_LINE LE J.
            RE05-TOP_LINE = FIRST_LINE.
          ELSE.
            RE05-TOP_LINE = J.
          ENDIF.
    Edited by: Andreas Mann on Feb 28, 2008 11:46 AM

  • Set cursor on table control not working

    Hi,
      I have a screen with delivery number field on top with Get Data Button next to it. Once I click on Get Data, I want to get all the handling units and show them in a table control below and show the first line of that table control selected by default.
      I m able to get the data but the cursor always goes back to the delivery number field.
    I have the following code in PBO
    Status & title for the screen
      MODULE status_0100.
    And in the module, the last lines are as follows
      if sy-ucomm = 'GET'.
        s_vepo-sel = c_x.
        set cursor field 'TABLE1' line 1. "TABLE1 is name of the table control in screen
                                                      "painter
      endif.
    I debugged and saw that the line " set cursor field 'TABLE1' line 1." is indeed the last line which gets executed but still the cursor goes back to delivery number field and table row doesnt get selected.
    Thanks for reading.

    Try maintaining the "Cursor position" in the screen layout in Attributes tab with the field name that you want the default cursor position to be present.
    Regards,
    Shri Hari.

  • Set the cursor on table control

    Hi All,
    I am trying to create a table control.
    Creation of table control is fine and i can update and save the records..But i am facing some strange problems.
    When i close my program and rerun it, the Cursor will be position on the default field of last run.
    How can we position the cursor on table control..Say to a particular row or columns?
    Also i am not able to interpret the meaning of
    Loop at itab with control control name cursor top_line/current_line.
    Does this means that if you use top_line, cursor will be placed at the top line and when you use current_line , it will be placed at current line?
    Regards
    Miesh

    Hi,
    Check this link for sample code for Table Control
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=/library/webas/abap/abapCodeSamples/TableControlin+ABAP.pdf
    http://members.aol.com/_ht_a/skarkada/sap/table_control/table_control.htm
    Re: Table Control
    Thanks & Regards,
    Judith.
    Message was edited by: Judith Jessie Selvi

  • How to set cursor at the first line in a table control?

    Hi,
           I have a customized infotype screen where a table control is being used to input new values.The tab control has 30 lines.Now, the problem is that when the screen is displayed, the cursor always starts at 8th or 4th line.The behaviour is not very consistent.I tried the following statement in the PBO, but no effect.
    SET CURSOR FIELD P9417-ZCOUNTRY LINE 1.  ( P9417-ZCOUNTRY is the name of the tab control field where i want to set the cursor ).This is the last statement in the PBO.
    Can someone please tell me why still I am not able to set the cursor at the first line? I have infact noticed that , in the debugging mode , sometimes the cursor starts at the first line.Please help. Thanks

    I have got a new requirement on this now. If the table control does not have any records , then the cursor position should be on the first row.Otherwise, if it already has some records, then the cursor should be at the first empty row.I wrote the code like below.
    if sy-ucomm = 'INSERT'.
    set cursor 'P9714-ZCOUNTRY'  line 1.
    else if sy-ucomm eq 'CHANGE'.
    describe table itab lines fill.
    fill = fill + 1.
    set cursor 'P9714-ZCOUNTRY'  line fill.
    endif.
    I am facing a strange problem now.The table control has some 10 rows when you see the screen for the first time.If the number of records already present is less than 10, I am able to position the cursor on the first empty row.But if the number is say 15, then the cursor position goes to eighth or fourth line or sometimes the first line.
    Is there any way to display the last few records , ie, if there are 15 records , is there any way to display the last five rows when I see the screen for the first time, rather than showing the first 10 records?How can I position the cursor at the first empty row, when there are more records?
    Thanks in advance..good answers will be rewarded.
    Mahesh

  • How to bring cursor in Table control??

    Hi to all
    How to bring cursor in Table control when entering into screen
    can anyone tell me??? pls explain with example..
    thanks
    senthil

    Hi,
    Check the below code
    data l_tc_name             like feld-name.
    data l_tc_field_name       like feld-name.
    get actual tc and column                            
      get cursor field l_tc_field_name
                 area  l_tc_name.
    Regards,
    Vind

  • How to control the cursor position on a text item..

    Hello,
    How can we control the cursor position programmatically on a text item.
    i.e. how do we move the cursor to home or end of the text item.
    TIA,
    Hiten

    If you have an access to metalink.oracle.com, take a look at notes:
    Note 61656.1 (V45) HIGHLIGHTING A REGION OF TEXT
    Note 131028.1 Default Highlighting in Forms (Client Server)
    and threads from metalink forum:
    531481.996 "Select_All not working in 6.0.8.25.2", 153092.995 "Text item cursor position"

  • [ADF Faces] set cursor position to the first column input text in ADF table

    How do i set the cursor position to the first column input text when i Insert a blank row?
    My idea is to implement using javascript. document.setfocus() but how do i do it from the backing bean code? or how do i install custom js to call document.setfocus()?
    any ideas?
    Message was edited by:
    user450391

    Did you try by iterating the selected row?
    Bind the table with the managed bean and then try with below code:
    RichTable empTable;
    RowKeySet selectedEmps = getEmpTable().getSelectedRowKeys();   
    Iterator selectedEmpIter = selectedEmps.iterator();
    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding empIter = bindings.findIteratorBinding("EmpView1Iterator");
    RowSetIterator empRSIter = empIter.getRowSetIterator();
    while(selectedEmpIter.hasNext()){
       Key key = (Key)((List)selectedEmpIter.next()).get(0);
       Row currentRow = empRSIter.getRow(key);
       System.out.println(currentRow.getAttribute("Ename"));

Maybe you are looking for

  • How do i install windows on the Imac and do i need a seperate disk to install it

    I am having trouble installing windows on my imac i really need someone to help me because i have certain downoas and things i need to install in order to go through college please help me!

  • Need to send a mail while safty stock goes down

    Dear experts, I Need to send a mail to concern persion while stock goes down from safty stock. We plan to put a check at the point of MARD table updation, Because we not able to put a check at the all transaction codes, So please LET ME KNOW HOW TO P

  • DHCP Server Issue

    Hi, We are facing a very weird issue with one of our DHCP server. The DHCP server is Windows 2008 Server. We have configured the scope. The clients are getting the IP address from DHCP server, and the lease is showing in the DHCP console. But after s

  • Rules and Schemas -

    Dear Gurus, Do you know any command so I can use inside a payroll rule, to find if the employee works for more or less than an year in the company? A friend told me that this command should do that:  NUM=F01C But it returns a strange value... Can any

  • Unable to locate my Ipad on icloud

    Hi I have Icloud set up and it can locate my Iphone but not my ipad. There message for Ipad is offline but WFI is on On my iphone I have 3G, WFI and phone network On my ipad I just have WFI. Can anyone help Regards Suab