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

Similar Messages

  • SAPUI5: How to set the appearance of Table control?

    Hi there,
    I have a table on my app UI. Now I want simply show the table grid lines (currently, the vertical lines between columns are not shown). Any idea?
    Furthermore, how to set the width of the bord lines or even teh color of the lines?
    Thanks very much in advance!
    Dong Zhu

    Hi,
    The demo link provided by Chandra uses Blue Crystal theme, hence it shows the vertical lines between the columns of the table. If you are using Gold Reflection theme, then to get the vertical lines, you need to play with CSS. Add the below snippet of CSS between <head></head> of your html file.
    <style>
    .sapUiTableTr>td {
                  border-right: 1px solid #cccccc !important;
    </style>
    Thanks & Regards,
    Vishwa

  • 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

  • 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

  • What are the uses of table control and tabstrip control

    can anyone tell me the uses of table control and tabstrip control

    Hi,
    table control is more comfortable for customizing.scroll bars all possible in this.where as it is not possible in step loops.
    check this example.
    PROGRAM ZBHTCTRL.
    TABLES: LFA1, EKKO.
    DATA: OKCODE1 LIKE SY-UCOMM,
    OKCODE2 LIKE SY-UCOMM.
    CONTROLS TABC TYPE TABLEVIEW USING SCREEN 1001.
    DATA: BEGIN OF ITAB OCCURS 0,
    MANDT LIKE EKKO-MANDT,
    EBELN LIKE EKKO-EBELN,
    BSTYP LIKE EKKO-BSTYP,
    BSART LIKE EKKO-BSART,
    END OF ITAB.
    MODULE USER_COMMAND_1000 INPUT.
    CASE OKCODE1.
    WHEN 'BACK'.
    SET SCREEN 0.
    WHEN 'NEXT'.
    SET SCREEN 1001.
    SELECT * FROM EKKO INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE
    LIFNR = LFA1-LIFNR.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_1001 INPUT
    MODULE MOVE_DATA OUTPUT.
    EKKO-MANDT = ITAB-MANDT.
    EKKO-EBELN = ITAB-EBELN.
    EKKO-BSTYP = ITAB-BSTYP.
    EKKO-BSART = ITAB-BSART.
    ENDMODULE. " MOVE_DATA OUTPUT
    MODULE USER_COMMAND_1001 INPUT.
    CASE OKCODE2.
    WHEN 'BACK'.
    SET SCREEN 1000.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_1001 OUTPUT
    MODULE STATUS_1001 OUTPUT.
    SET PF-STATUS 'MENU'.
    SET TITLEBAR 'TIT'.
    ENDMODULE. " STATUS_1001 OUTPUT
    MODULE STATUS_1000 OUTPUT.
    SET PF-STATUS 'DMENU'.
    SET TITLEBAR 'xxx'.
    ENDMODULE. " STATUS_1000 OUTPUT
    FORM ON_CTMENU_FORM1 USING CMENU TYPE REF TO CL_CTMENU.
    CALL METHOD CMENU->LOAD_GUI_STATUS
    EXPORTING
    PROGRAM = ' ZBHTCTRL'
    STATUS = 'CMENU'
    MENU = CMENU.
    CALL METHOD CMENU->ADD_FUNCTION
    EXPORTING
    FCODE = 'RX'
    TEXT = 'RECIEVE'.
    ENDFORM.
    FLOW LOGIC:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_1000.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_1000.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_1001.
    LOOP AT ITAB WITH CONTROL TABC CURSOR TABC-TOP_LINE.
    MODULE MOVE_DATA.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_1001.
    LOOP AT ITAB.
    ENDLOOP.
    for more info check this link.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm
    thanks
    Ashu.

  • 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 can I change the size of table control in table maintenance re-gen?

    Hello Experts,
    I hv created a maintenance view and after generated table maintenance view for it.
    now it adjusts the size of table control in table maintenance generation.
    I want to change the size (width) of table control and again re-generate the table maintenance.
    But when re-generation occurs, table control size is set to initial.
    why it is happening? and wt to do to solve this issue? any user exit?
    I need the changed size of table control even if its re-generated.
    Regards,
    R.Hanks

    Hello Ronny,
    Goto SM30, Enter your table name for which you have maintained your table maintainence generator .
    When the maintainence screen appears for your table name , Goto System->Status->Screen Program name.
    Copy that program name from there.
    Open that module program through SE80,this is the program name of your SM30 screen which appears when we enter our table name in SM30 transaction.
    In SE80,click the layout of the module program name you have entered there.
    Its layout will display you the table control(of SM30) present to enter your your enteries.
    In the change mode you can change its size , savee it and activate that program.
    Now goto to SM30 again and enter your table name, it will show you the changed size of the table control used to take the enteries.
    Note:This changed size is only for your table name and it will remain of its previous size for other table enteries.
    Hope it helps you.
    Thanks Mansi

  • How do I set the cursor in the text response of a message box

    I am using TestStand 4.1.1. During testing I need to scan in some data from the operator.
    I am using a message popup with the text response box enabled. My problem is the cursor does not automatically appear in the text box at run time. I don't want to have to place the mouse in the box each time.
    Is there someway to set the cursor to automatically be in the text box.
    Regards,
    Don1.
    Solved!
    Go to Solution.

    Hi,
    You have to make the Response Box the active control. You will find the 'Active Control' control in the main tab of the Message Box setup properties window.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Push button in one of the columns of Table Control

    Hi,
    I have a requirement, where i have to display a push button in one of the columns of table control for long text. When user clicks on the control, a pop up has to be appeared in which user should be able to enter some meaning ful description and save it. please suggest me how to do this requirement.
    Best Regards,
    Phani Kumar. S

    Hai,
      You can drag n drop a button to the required column in the table control and give the required parameters like ok_code , name etc.
    You can now place a text field as the heading of the column.
    Now when the user clicks the the button in a row, read the corresponding line in which he has clicked.For that u can use
    get cursor lines wrk_line.
    now u'll  get the data in that row using
    Read table it_tab into wa_tab index wrk_line.
    now u can call the text editor (using FM's READ_TEXT ,EDIT_TEXT and CREATE_TEXT in which the user can enter the meaningful description and save it.
    When u save the text entered save it with a key part of the row that was read earlier(keep it as the text name).
    So now if u need to get the description which was entered earlier u can easily read the text (using READ_TEXT ).
    I hope this will be helpful for u .
    Thanks
    Neeraj

  • How to control the display of table control

    hi,
    If I dont find any entry in the internal table to be displayed in table control then I should not display the blank table in the screen.
    I tried using if not itab[] is initial in PBO but there(PBO) 'if' is not recognised and it gives syntax error.
    Even if I tried to put the code of table control 'loop at itab[] into wa_tab contrl....'this part in a module and there to put the If condition it gives error to put where after wa_tab.
    Thanks,
    mohan

    hi,
    As i told i had put the if part in the module but then it is the error with syntax check of table control as shown below
    PBO
    module pbo_100.
    loop at itab into wa with contril Tc cursor tc-lines.
    endloop
    pai
    module pai_100
    but here if i create a new module in PBO say module check_table and put the code for table control as
    if not itab is initial
    loop at itab into wa with contril Tc cursor tc-lines.
    endloop
    endif.
    then here error comed with syntax of loop at itab into wa has to be 'where' condition.
    So the problem is i dont want to display the table control in 1st but after some input on the screen then only the table control is to be displayed .
    Let me know if this is clear.
    thanks,
    mohan

  • Setting the cursor on a particular input field in module pool

    Hi,
    I am working on an abap module program, the requirement is the cursor should be placed on a particular field at run time.
    In detail:  Table contains zserialno primary key field, zemailid of char type.
    Screen design: 1st text input field is zserialno
                             2nd field zemailid is splitted into 3 input text fields.
    For 2nd field zemailid 1st input field allows user to enter his/her email name, 2nd input field is an drop down which contains domain names and 3rd field is an empty field which is to be triggered on user action.
    example: zemailid- 1st input field  XYZ 2nd input field conatains @gm../@yah....and others. If user selects on others value in drop down of 2nd input field, the cursor should point the 3rd input field which allows the  user to enter his/her other domain.
    I used
    SET CURSOR FIELD <3rd inpu field namet>.
    , but the cursor pointing the key field of the table zserialno even the input field of zserialno was provided with a value.
    Any idea on this is appreciated.
    Edited by: Sona_abaper on May 7, 2011 5:34 PM

    Hi Sona,
    F1:
    Effect:
    During PBO processing, this statement sets the cursor in the screen layout of the current screen. The cursor can be positioned by entering a screen element after FIELD or by entering a specific position using col and lin. Outside of PBO processing, the cursor is positioned in the next list displayed on the screen.
    If the SET CURSOR statement is not specified, depending on the definition of the screen, the cursor is set according to the following hierarchy:
        On the cursor position determined statically in the screen properties,
        On the first input field of the screen,
        On the first screen element of the screen,
        On the command field in the systemtoolbar.
    The latter also applies if the command field in the system toolbar is not displayed.
    I'm convinced your code works as designed.
    Let us know your PBO module and code.
    Regards,
    Clemens

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • How to delete the row in table control with respect to one field in module pool programming?

    Hi,
    Can I know the way to delete the row in table control with respect to one field in module pool programming
    Regards
    Darshan MS

    HI,
    I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
    I have written this code,
    module USER_COMMAND_9000 input.
    DATA OK_CODE TYPE SY-UCOMM.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
         WHEN 'DELETE'.
            LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
                APPEND LS_SOURCE TO LT_RESTORE.
                DELETE TABLE LT_SOURCE FROM LS_SOURCE.
                SOURCE-LINES = SOURCE-LINES - 1.
            ENDLOOP.
    But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
    So I thought of doing with respect to the field.

  • Set the cursor busy steered by supanel vi

    I let run a vi and there is a subpanel. Is there a way that I can set the cursor busy steered by the subpanel vi. I pass the reference of the mainvi over a global variable into subvi. Without success there is no error message but the busy cursor does not appear. Just setting the cursor in subvi creates a null window error. Is there a easy way to implement it. Or do I have to use user events in main vi called by suvi an then se it busy. Would be not so nice to understand it later.
    kind regards reto

    I attach my test VI (LV 8.0). You can try it.
    Attachments:
    test sub.vi ‏17 KB
    test.vi ‏22 KB
    test global.vi ‏4 KB

  • Deleting the values from table control

    HI,
    I need to remove the selected line from the Table control on my screen.
    The point is that the Internal table does not have any records,.
    for example in the Customer Create screen,
    while entering the bank details we will enter it in a tbale contraol.
    but the records doesnt exist in the database. but the record gets deleted from the table control only if we press delete button.
    please guide me.
    please note : I want to delete the record from Table Control on the screen and I dont have any corresponding database records..
    regards

    Hi..
    The solution to your problem - deleting values from table control.
    Here: it_wizard is the internal table which is holding the value of table control.
             wa_wizard is the work are of the internal table it_wizard.
             it_delete is the internal table which holds the deleted record of table control.
             wa_delete is the work area of the internal table it_delete
    Also here the field ZSEL is the character field which is used to select the entire record in the table control.
    LOOP AT it_wizard into wa_wizard WHERE zsel = 'X'.
           MOVE-CORRESPONDING wa_wizard TO wa_delete.
           APPEND wa_delete TO it_delete.
           delete table it_wizard from wa_wizard.
    DELETE  FROM zfin_goods WHERE ZFG = WA_delete-ZFG.
    ENDLOOP
    if sy-subrc eq 0.
    Message 'Delete Successful' type 'S'.
    endif.
    The above code will delete the record from both the table control.internal table and the database table.
    I think this will help you to great extent.
    Ward regards,
    Bhuvaneswari
    Edited by: BHUVANESWARI THIRUNAVUKKARASU on Jan 7, 2009 10:39 AM

Maybe you are looking for

  • Steps to configure Toplink 11g(11.1.1.0.1) on OC4J 10.

    Please inform detailed steps to configure Toplink 11g(11.1.1.0.1) on OC4J 10.1.3.4

  • UFS vs. HFS+ on a fire wire drive

    Is there any reason not to use UFS for an external firewire drive that is to hold general user files. HFS+ is more common but I don't like the "ignore ownership on this volume" check box on the info panel of all external drives. It turns out the chec

  • Visibility of the components not working

    Hi, I have a simple requirement in which i have to display some menu items depending on the "*Role*" of the user who has logged in. I tried all the following methods, 1. In backing bean of the .jspx file, checking the Role and setting "component.setv

  • Vendor Evaluation Period Selection

    Dear Sir, We use ME63 for Vendor Evaluation , here we do not find any option to give  the period over which Vendor should be Evaluated . We have a requirement that Vendor Evaluation must be based upon the Purchases made during period 1-DEC-2007 to 31

  • Automatic clearing - Grouping rules

    Hi All, I try to configure the automatic clearing process but unfortunatelly the grouping variants don't work: First rule:  group by DFKKOP-XBLNR and DFKKOP-ZZ_RST3 Second rule: group by DFKKOP-XBLNR Posting 1: xblnr = A / zz_rst3 = B / 10 EUR Postin