How to control manually the scrolling of Table Control?

Hi,
I have one selection screen which takes me to the next screen (Screen 2) having a table control.In this screen I have some buttons like display, change etc ,by clicking on which it goes to the third screen.Now my problem is even when I try to vertically scroll this table control it is taking me to the third screen which I do not want to happen. Could anyone please help me in this.
Thanks in advance.

In PBO write the following code for scrolling
*& Module set_lines OUTPUT
text
MODULE SET_LINES OUTPUT.
DATA VLINES TYPE I.
DESCRIBE TABLE ITABCTL LINES VLINES.
TABCTL-LINES = VLINES + 1.
ENDMODULE. " set_lines OUTPUT
This is code for vertical scrollin..
Howevr check ur ok-codes..
Hope dis helps...
reward if it does..

Similar Messages

  • How to make editable the colums of table control in the PBO

    Hello Experts!
    I`m using the table control in dynpro, and i want to make editable some colums depending of some values.
    How can i do that?
    Thanks!

    Hi
    U need to change the screen attributes of colunm by statament LOOP AT SCREEN/ENDLOOP into the loop of table control in PBO:
    PROCESS PBO.
       LOOP AT ITAB ......
            MODULE LOOP_SCREEN_TC.
      ENDLOOP.
    MODULE LOOP_SCREEN_TC.
      IF ITAB-FIELD1 = .........
         LOOP AT SCREEN.
            IF SCREEN-NAME = 'ITAB-FIELD2'.
               SCREEN-INPUT = 0.
               MODIFY SCREEN.
            ENDIF.
        ENDLOOP.
      ENDIF.
    ENDMODULE.
    Max

  • How to select all the rows of table control in BDC

    Hi All,
    While I am doing BDC for Transaction Code MC88, After the first screen I will get another screen with tabble control, Here I need to select all the rows of table control, I am assignng the 'X' to the first field of Table Control which is the indicator for selection.
    Here I am getting message called Indicator field is not in program and screen.
    While doing Recording I am not able to record the indicator, Please any one let me know how to record the Entire table control selection.
    Thanks in advance..

    Sorry about that lakshmi. Here is my code.
        PERFORM dynpro USING : 'X'   'SAPMMCP6'          '0105',
                               ' '   'RMCP2-MATNR'       t_matnr,
                               ' '   'RMCP2-WERKS'       t_werks,
                               ' '   'BDC_OKCODE'        '=AKTV'.
        PERFORM dynpro USING : 'X'   'SAPLMCPA'          '0707',
                               ' '   'BDC_OKCODE'        '=MRKE'.
        PERFORM dynpro USING : 'X'   'SAPLMCPA'          '0707',
                               ' '   'BDC_OKCODE'        '=GRAO

  • 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 can we get a Scrolling in Table Control while data uploading?.

    Can anybody suggest me the way to put a scrolling in a table control while uploading the data?

    Hello,
    I dont think it is possible, anyways dont do it. It will make the program perfomance very bad. There is an indicator (little watch on the left hand side), that you can use, but it is better to dont do it. As I have told you the perfomance will be very bad.
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          percentage = 20
          text       = 'Uploading data'.
    THAT IS THE FM. Use it after and before the upload.
    Hope this helps
    Gabriel

  • How to select all the lines of table control

    Hi all,
             In table control, I have more than 100 records. My requirement is I have to select all the records when I press check box in the table control. Please guide me in this regard.
    Searched in sdn before  posting.
    Thanks,
    regards,
    Murali Krishna. T

    PROBLEM SOLVED

  • How can i change the color of table control'  lines?

    Such as the subject. Thanks in advance!

    Hi,
    Please check,
    TABLE CONTROL LINES COLOR CHANGE
    color rows in table control
    Regards,
    Hema.
    Reward points if it is useful.

  • 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 do I identify OK Code in table control in BDC (scroll up/down)?

    Hi. I have read a lot of very good posts and articles here in the forums about how to work with table controls when writing a BDC program. Unfortunately I haven't found any that address the specific issue that I'm having.
    I'm writing a program to update the line items of a Parked Document using transaction FBV2. I want to be able to insert a row at the end of the previously existing rows regardless of how many there are and I can't seem to figure out the correct OK Codes to scroll up or down, or page up or down within the table control so I can guarantee that I will get to the next available row.
    For example. I have a Parked Document with 13 line items. I would like to insert the new line item as row 14. I know that 10 rows will be displayed at run time on this screen according to my settings in the BDC call and want to scroll down 1 time and then enter the new data on the 4th line on the new set of rows.
    Does anyone have any experience with this, or can someone point me in the right direction where I might find this information?
    Thanks in advance,
    Andy

    Hi
    In my system I can't run that trx, anyway there's any ok-code for the scrolling, you can have only the okcode for the page up/down buttons.
    So you should try to understand how many rows a page can have, so if a page have 10 rows per page and you need to change the row 22, it means you have to simulate to press the page down twice and change the second row of third page.
    If you run your BDC by CALL TRANSACTION u should use the option OPTIONS FROM opt, here you indicate to use the standard size of the dynpro. In this way the size of table control is not screen resolution dependent.
    TABLES CTU_PARAMS.
    CTU_PARAMS-DEFSIZE = 'X'.
    CALL TRANSACTION 'FBV1'  USING ITAB
                                                OPTIONS FROM CTU_PARAMS.
    Max

  • 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.

  • Unable get the table scroll for table control

    hai
    i unable get horizontal scrolling for table control when the output is dislayed
    help me
    very urgent

    Hi,
    check out the sample program it might help you
    See the following simple ex
    *& Module pool ZTEST_TBLCTRL
    PROGRAM ZTEST_TBLCTRL.
    ***&SPWIZARD: DATA DECLARATION FOR TABLECONTROL 'TC1'
    *&SPWIZARD: DEFINITION OF DDIC-TABLE
    TABLES: ZFG_SRNO, ZFIH0004.
    *&SPWIZARD: TYPE FOR THE DATA OF TABLECONTROL 'TC1'
    *TYPES: BEGIN OF T_TC1,
    ZSRNO LIKE ZFG_SRNO-ZSRNO,
    SCRNAME LIKE ZFIH0004-SCRNAME,
    END OF T_TC1.
    *TYPES: BEGIN OF T_TC1.
    STRUCTURE ZFG_SRNO.
    END OF T_TC1.
    *&SPWIZARD: INTERNAL TABLE FOR TABLECONTROL 'TC1'
    *DATA: G_TC1_ITAB TYPE T_TC1 OCCURS 0 WITH HEADER LINE,
    G_TC1_WA TYPE T_TC1. "work area
    DATA: G_TC1_ITAB LIKE ZFG_SRNO OCCURS 0 WITH HEADER LINE,
    G_TC1_WA LIKE G_TC1_ITAB. "work area
    DATA: G_TC1_COPIED. "copy flag
    *&SPWIZARD: DECLARATION OF TABLECONTROL 'TC1' ITSELF
    CONTROLS: TC1 TYPE TABLEVIEW USING SCREEN 0100.
    *&SPWIZARD: LINES OF TABLECONTROL 'TC1'
    DATA: G_TC1_LINES LIKE SY-LOOPC.
    DATA: OK_CODE LIKE SY-UCOMM,
    S_CODE LIKE SY-UCOMM,
    MARK.
    DATA: T1(10).
    *&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: COPY DDIC-TABLE TO ITAB
    MODULE TC1_INIT OUTPUT.
    IF G_TC1_COPIED IS INITIAL.
    *&SPWIZARD: COPY DDIC-TABLE 'ZFG_SRNO'
    *&SPWIZARD: INTO INTERNAL TABLE 'g_TC1_itab'
    SELECT * FROM ZFG_SRNO
    INTO CORRESPONDING FIELDS
    OF TABLE G_TC1_ITAB.
    G_TC1_COPIED = 'X'.
    REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
    IF T1 <> SPACE.
    G_TC1_ITAB-ZSRNO = T1.
    CLEAR T1.
    APPEND G_TC1_ITAB.
    REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
    ENDIF.
    *TC1-TOP_LINE = 1.
    ENDIF.
    ENDMODULE.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: MOVE ITAB TO DYNPRO
    MODULE TC1_MOVE OUTPUT.
    MOVE-CORRESPONDING G_TC1_WA TO ZFG_SRNO.
    if sy-subrc ne 0.
    *append G_TC1_WA to G_TC1_ITAB.
    *endif.
    READ TABLE G_TC1_ITAB INDEX TC1-CURRENT_LINE.
    IF SY-SUBRC = 0.
    G_TC1_WA-ZSRNO = G_TC1_ITAB-ZSRNO.
    ENDIF.
    MOVE-CORRESPONDING G_TC1_ITAB TO ZFG_SRNO.
    REFRESH CONTROL 'TC1' FROM SCREEN '8001'.
    *******Below line is the logic for scrolling.
    tc1-lines = G_TC1_LINES + 100.
    ENDMODULE.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: GET LINES OF TABLECONTROL
    MODULE TC1_GET_LINES OUTPUT.
    G_TC1_LINES = SY-LOOPC.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: MODIFY TABLE
    MODULE TC1_MODIFY INPUT.
    *break-point.
    MOVE-CORRESPONDING ZFG_SRNO TO G_TC1_ITAB.
    MODIFY G_TC1_ITAB INDEX TC1-CURRENT_LINE.
    G_TC1_COPIED = 'X'.
    REFRESH CONTROL 'TC1' FROM SCREEN '8001'.
    MOVE-CORRESPONDING ZFG_SRNO TO G_TC1_WA.
    MODIFY G_TC1_ITAB
    FROM G_TC1_WA
    INDEX TC1-CURRENT_LINE.
    G_TC1_COPIED = 'X'.
    if sy-subrc ne 0.
    append G_TC1_WA to G_TC1_ITAB.
    endif.
    *modify G_TC1_ITAB INDEX TC1-CURRENT_LINE.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: PROCESS USER COMMAND
    MODULE TC1_USER_COMMAND INPUT.
    OK_CODE = SY-UCOMM.
    PERFORM USER_OK_TC USING 'TC1'
    'G_TC1_ITAB'
    'FLAG'
    CHANGING OK_CODE.
    SY-UCOMM = OK_CODE.
    ENDMODULE.
    INCLUDE TABLECONTROL_FORMS *
    *& Form USER_OK_TC *
    FORM USER_OK_TC USING P_TC_NAME TYPE DYNFNAM
    P_TABLE_NAME
    P_MARK_NAME
    CHANGING P_OK LIKE SY-UCOMM.
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA: L_OK TYPE SY-UCOMM,
    L_OFFSET TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
    *&SPWIZARD: Table control specific operations *
    *&SPWIZARD: evaluate TC name and operations *
    SEARCH P_OK FOR P_TC_NAME.
    IF SY-SUBRC <> 0.
    EXIT.
    ENDIF.
    L_OFFSET = STRLEN( P_TC_NAME ) + 1.
    L_OK = P_OK+L_OFFSET.
    *&SPWIZARD: execute general and TC specific operations *
    CASE L_OK.
    WHEN 'INSR'. "insert row
    PERFORM FCODE_INSERT_ROW USING P_TC_NAME
    P_TABLE_NAME.
    CLEAR P_OK.
    WHEN 'DELE'. "delete row
    PERFORM FCODE_DELETE_ROW USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME.
    CLEAR P_OK.
    WHEN 'P--' OR "top of list
    'P-' OR "previous page
    'P+' OR "next page
    'P++'. "bottom of list
    PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
    L_OK.
    CLEAR P_OK.
    WHEN 'L--'. "total left
    PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
    WHEN 'L-'. "column left
    PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
    WHEN 'R+'. "column right
    PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
    WHEN 'R++'. "total right
    PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
    WHEN 'MARK'. "mark all filled lines
    PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME .
    CLEAR P_OK.
    WHEN 'DMRK'. "demark all filled lines
    PERFORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME .
    CLEAR P_OK.
    WHEN 'SASCEND' OR
    'SDESCEND'. "sort column
    PERFORM FCODE_SORT_TC USING P_TC_NAME
    l_ok.
    ENDCASE.
    ENDFORM. " USER_OK_TC
    *& Form FCODE_INSERT_ROW *
    FORM fcode_insert_row
    USING P_TC_NAME TYPE DYNFNAM
    P_TABLE_NAME .
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA L_LINES_NAME LIKE FELD-NAME.
    DATA L_SELLINE LIKE SY-STEPL.
    DATA L_LASTLINE TYPE I.
    DATA L_LINE TYPE I.
    DATA L_TABLE_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE CXTAB_CONTROL.
    FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
    FIELD-SYMBOLS <LINES> TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc *
    CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
    ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
    *&SPWIZARD: get looplines of TableControl *
    CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
    ASSIGN (L_LINES_NAME) TO <LINES>.
    *&SPWIZARD: get current line *
    GET CURSOR LINE L_SELLINE.
    IF SY-SUBRC <> 0. " append line to table
    L_SELLINE = <TC>-LINES + 1.
    *&SPWIZARD: set top line *
    IF L_SELLINE > <LINES>.
    <TC>-TOP_LINE = L_SELLINE - <LINES> + 1 .
    ELSE.
    <TC>-TOP_LINE = 1.
    ENDIF.
    ELSE. " insert line into table
    L_SELLINE = <TC>-TOP_LINE + L_SELLINE - 1.
    L_LASTLINE = <TC>-TOP_LINE + <LINES> - 1.
    ENDIF.
    *&SPWIZARD: set new cursor line *
    L_LINE = L_SELLINE - <TC>-TOP_LINE + 1.
    *&SPWIZARD: insert initial line *
    INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
    <TC>-LINES = <TC>-LINES + 1.
    *&SPWIZARD: set cursor *
    SET CURSOR LINE L_LINE.
    ENDFORM. " FCODE_INSERT_ROW
    *& Form FCODE_DELETE_ROW *
    FORM fcode_delete_row
    USING P_TC_NAME TYPE DYNFNAM
    P_TABLE_NAME
    P_MARK_NAME .
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA L_TABLE_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE cxtab_control.
    FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
    FIELD-SYMBOLS <WA>.
    FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc *
    CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
    ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
    *&SPWIZARD: delete marked lines *
    DESCRIBE TABLE <TABLE> LINES <TC>-LINES.
    LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header *
    ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
    IF <MARK_FIELD> = 'X'.
    DELETE <TABLE> INDEX SYST-TABIX.
    IF SY-SUBRC = 0.
    <TC>-LINES = <TC>-LINES - 1.
    ENDIF.
    ENDIF.
    ENDLOOP.
    ENDFORM. " FCODE_DELETE_ROW
    *& Form COMPUTE_SCROLLING_IN_TC
    text
    -->P_TC_NAME name of tablecontrol
    -->P_OK ok code
    FORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
    P_OK.
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA L_TC_NEW_TOP_LINE TYPE I.
    DATA L_TC_NAME LIKE FELD-NAME.
    DATA L_TC_LINES_NAME LIKE FELD-NAME.
    DATA L_TC_FIELD_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE cxtab_control.
    FIELD-SYMBOLS <LINES> TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get looplines of TableControl *
    CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
    ASSIGN (L_TC_LINES_NAME) TO <LINES>.
    *&SPWIZARD: is no line filled? *
    IF <TC>-LINES = 0.
    *&SPWIZARD: yes, ... *
    L_TC_NEW_TOP_LINE = 1.
    ELSE.
    *&SPWIZARD: no, ... *
    CALL FUNCTION 'SCROLLING_IN_TABLE'
    EXPORTING
    ENTRY_ACT = <TC>-TOP_LINE
    ENTRY_FROM = 1
    ENTRY_TO = <TC>-LINES
    LAST_PAGE_FULL = 'X'
    LOOPS = <LINES>
    OK_CODE = P_OK
    OVERLAPPING = 'X'
    IMPORTING
    ENTRY_NEW = L_TC_NEW_TOP_LINE
    EXCEPTIONS
    NO_ENTRY_OR_PAGE_ACT = 01
    NO_ENTRY_TO = 02
    NO_OK_CODE_OR_PAGE_GO = 03
    OTHERS = 0.
    ENDIF.
    *&SPWIZARD: get actual tc and column *
    GET CURSOR FIELD L_TC_FIELD_NAME
    AREA L_TC_NAME.
    IF SYST-SUBRC = 0.
    IF L_TC_NAME = P_TC_NAME.
    *&SPWIZARD: et actual column *
    SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
    ENDIF.
    ENDIF.
    *&SPWIZARD: set the new top line *
    <TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
    ENDFORM. " COMPUTE_SCROLLING_IN_TC
    *& Form FCODE_TC_MARK_LINES
    marks all TableControl lines
    -->P_TC_NAME name of tablecontrol
    FORM FCODE_TC_MARK_LINES USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME.
    &SPWIZARD: EGIN OF LOCAL DATA----
    DATA L_TABLE_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE cxtab_control.
    FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
    FIELD-SYMBOLS <WA>.
    FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc *
    CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
    ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
    *&SPWIZARD: mark all filled lines *
    LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header *
    ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
    <MARK_FIELD> = 'X'.
    ENDLOOP.
    ENDFORM. "fcode_tc_mark_lines
    *& Form FCODE_TC_DEMARK_LINES
    demarks all TableControl lines
    -->P_TC_NAME name of tablecontrol
    FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME .
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA L_TABLE_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE cxtab_control.
    FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
    FIELD-SYMBOLS <WA>.
    FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc *
    CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
    ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
    *&SPWIZARD: demark all filled lines *
    LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header *
    ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
    <MARK_FIELD> = SPACE.
    ENDLOOP.
    ENDFORM. "fcode_tc_mark_lines
    *& Module D20XX_INIT OUTPUT
    text
    MODULE D20XX_INIT OUTPUT.
    *if screen-name = 'ZSRNO'.
    SCREEN-INPUT = 0.
    SCREEN-COLOR = 0.
    MODIFY SCREEN.
    endif.
    ENDMODULE. " D20XX_INIT OUTPUT
    *& Module STATUS_0100 OUTPUT
    text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    *CLEAR R1_REF.
    DO 30 TIMES.
    APPEND G_TC1_ITAB.
    ENDDO.
    DESCRIBE TABLE G_TC1_ITAB LINES TC1-LINES.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module TAB1_INIT OUTPUT
    text
    MODULE TAB1_INIT OUTPUT.
    ENDMODULE. " TAB1_INIT OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE USER_COMMAND_0100 INPUT.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module MESSAGE INPUT
    text
    MODULE MESSAGE INPUT.
    OK_CODE = SY-UCOMM.
    S_CODE = OK_CODE.
    CLEAR OK_CODE.
    if S_CODE = 'DELE'.
    loop at G_TC1_ITAB.
    if G_TC1_ITAB-scrname = 'X'.
    delete g_tc1_itab.
    endif.
    endloop.
    ELSEIF S_CODE = 'SAVE'.
    G_TC1_WA-ZSRNO = T1.
    MOVE-CORRESPONDING G_TC1_WA TO ZFG_SRNO.
    REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
    ENDIF.
    ENDMODULE. " MESSAGE INPUT
    *& Module DELETE_RECORD INPUT
    text
    MODULE DELETE_RECORD INPUT.
    IF MARK = 'X' AND S_CODE = 'DELE'.
    DELETE TABLE G_TC1_ITAB FROM ZFG_SRNO.
    DESCRIBE TABLE G_TC1_ITAB LINES TC1-LINES.
    ENDIF.
    ENDMODULE. " DELETE_RECORD INPUT
    *********************Screen modules*********************
    PROCESS BEFORE OUTPUT.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TC1'
    MODULE TC1_INIT.
    *&SPWIZARD: MODULE TC1_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE TC1_CHANGE_COL_ATTR.
    LOOP AT G_TC1_ITAB
    INTO G_TC1_WA
    WITH CONTROL TC1
    CURSOR TC1-CURRENT_LINE.
    *&SPWIZARD: MODULE TC1_CHANGE_FIELD_ATTR
    MODULE TC1_MOVE.
    MODULE TAB1_INIT.
    MODULE TC1_GET_LINES.
    ENDLOOP.
    MODULE D20XX_INIT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TC1'
    *BREAK POINT.
    LOOP AT G_TC1_ITAB.
    CHAIN.
    FIELD ZFG_SRNO-ZSRNO.
    MODULE TC1_MODIFY ON CHAIN-REQUEST.
    MODULE TC1_MODIFY.
    ENDCHAIN.
    MODULE MESSAGE .
    MODULE DELETE_RECORD.
    ENDLOOP.
    MODULE TC1_USER_COMMAND.
    *&SPWIZARD: MODULE TC1_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE TC1_CHANGE_COL_ATTR.
    MODULE USER_COMMAND_0100.
    please check out the link below for more information it might help you
    http://help.sap.com/saphelp_sm32/helpdata/en/9f/dbac9f35c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d1/801c7b454211d189710000e8322d00/content.htm
    http://www.sapbrainsonline.com/REFERENCES/ABAP_SYNTAX/SAP_ABAP_SYNTAX.html
    *********please reward points if the information is helpful to you*************

  • 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.

  • 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

  • Problem in SCROLLING  of TABLE CONTROL which is designed using WIZARD

    Hello Friends ,
                              I have designed a entry screen by using table control with wizard.  My table control layout  has 11 rows. I have used all 3 facilities i.e. SCROLLING , INSERT/DELETE  & SELECT/DESELECT by cheking ( ticking ) check boxes while designing table control with wizard.  
      Now i have 3 problems.
    1> In my entry screen , if 11 entries are entered , they are displayed in entry screen and are saved correctly in DB.
         But when  i copy a file of suppose 15 entries into entry screen then it displays only 11 entries in entry screen and after that  if  i click/move  VERTICAL SCROLL BAR to see remaining/next 4 entries  then it does not display  12th 13th 14th &15th entry in entry screen. So the problem is i am unable to display remaining/next 4 entries  in entry screen & also to save them DB.
    2>  At the same time when i click/move  VERTICAL SCROLL BAR to see remaining/next 4 entries  then  earlier 11 entries  are disappeared/ get cleared from entry screen.
    3> The FIRST PAGE, PREVIOUS PAGE , NEXT PAGE , LAST PAGE and INSERT , DELETE push buttons are dispalyed in my entry screen . But they are not working or doing their opertions on table control though there is system generated code for them written in module pool program and  PBO & PAI OF SCREEN 100 on which table control is present.
       So eagerly waiting for POSITIVE replies  &  Correct solutions from all ABAP techies.
    THANKS & REGARDS,
      Ashish.

    Hi friend,
                         I have visited the link u have given . But it is a report program .it is available in ABAPDOCU tcode.
    ABAPDOCU----
    >ABAP User Dialogs -
    >Screens -
    >Complex Screen Elements -
    >Table Control with Scrolling .
    It is a REPORT program. and not a module pool program. plz check this in ur link also.
    REPORT demo_dynpro_tabcont_loop.    &
    *SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.* -
    > this statement is used only in report program and system does not allow us to use in module pool program.
    Second thing here data is retrived from spfli table where as my data will be whatever enduser enters it may be 15 lines , may be 50 lines or may be 200 lines and it shold be displayed on entry screen before clicking SAVE or any other user action.
    My main problem is that I am unable to enter more than 11 entries in my entry screen. I want dynaamic table. Mean whichever enteries are entered they should be displayed on entry screen as well as can be scrolled up & down before saving and get saved after clicking SAVE button. here table control design is not imp because entry data depends on table control layout rows & which has limit. It can not be extended beyond certain level. i think max will be 20 Or 25 rows in layout. How to make it dynamic so that we can get any no. of entries in entry screen hiich canbe scrolled up & down.
    Anyways thanks for ur reply And send some other soln.
    Thanks & regards,
    Ashish

  • How to Insert Data in Ztable Using table Control

    Hi All,
      Please give some ideas of how to store the data from table control into the ztable database.
    There is a table control in which the end user enters the data manually and clicks the save button. Then, the data from the table control will go and store in the ztable.
    regards
    Vicky Kumar

    Hi Vicky,
    are you talking about ABAP transaction SE11 or about creating tables in the SAP HANA directly, i.e. in the HANA Modeler perspective?
    Cheers,
      Jasmin

Maybe you are looking for

  • Data from Table to Backend

    Hi Guys I want to insert data from a Table( in a View ) to R3.. Though data is getting inserted but only one Row... I want all the Rows to be inserted.. Plz help...

  • FDM & ERPI to FDMEE - Upgrade approach/challenges ?

    Hello, We are in FDM/ERPI 11.1.2.2.300 (used for loading data from EBS and file systems into HFM 11.1.2.2.300) and planning to upgrade (within the existing environment [in-place upgrade]) to 11.1.2.3. As we see that FDM/ERPI are integrated together a

  • Downloaded I-tunes 7.01 with Quick Time but...old IPOD

    I got a prompt to download 7.01, so like a 'do be' I did. Thing is, I don't have video, and QuickTime said it could not run unless I had a 'key'. I logged back on, and the key is $30.00 approx...if it was only 5 dollars, maybe I'd get it. So I uninst

  • Formatted output in output_file

    Hello, String name = "Drabick"; int age = 22; System.out.print("%s%20d",name,age);Above can be used to write output in nice way, but I want to write output in separate file. BufferedWriter out2 = null;            try {                   out2 = new Bu

  • Oracle VM suggestions for small firm.

    We're a small IT services firm that's looking to expand it's virtual farm.  While we're VMware certified, it's price point is pushing us out in favor of something else.  For the last year, we have standarized on Oracle Linux so naturally Oracle VM is