Skip to Content
author's profile photo Former Member
Former Member

table control in module pool.

hi all,

i have one table control,in which i have four coloumn.

at design time (layout), i defined one row .

<b>now my question is that how i add /delete row in table at run time at any sy-ucomm command</b>.

please help me.

thankyou.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 03:55 AM

    Hi Kumar,

    When you define the table control you can select the number of rows that are displayed at runtime.

    At run time Based on your Internal Table values, The Table control displays the values.

    Thanks,

    Reward If Helpful.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 20, 2007 at 04:01 AM

    Hi Pawan,

    Check this program "RSDEMO02"

    Regards,

    Prabhu Rajesh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 20, 2007 at 04:05 AM

    hi Pawan ,

    For that you need to modify the table control lines inside the loop at statement .

    In the PBO assign the number of required lines to the Table control .

    eg: TC_COLS-LINES = no_of_desired_lines .

    Hope this solves your problem .

    Regards,

    Ranjita

    null

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 04:07 AM

    hi,

    Refer the program

    "demo_dynpro_tabcont_loop_at"

    thanks

    Dharmishta

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 20, 2007 at 04:14 AM

    To delete a row from table control.

    Add one more field in the database table as MARK of character length 1. Then while creating the table in the screen, in the table properties at the below there will be one option with check box (W/selcolumn). Click that and mention the value ITAB-MARK in the text box next to it.

    Once you inserted the MARK colunm in your table control and assign this field to a flag field of your internal table:

    PROCESS PBO.

    LOOP AT ITAB....

    MODULE SHOW_ITAB.

    ENDLOOP.

    PROCESS PAI.

    LOOP AT ITAB....

    MODULE MODIFY_ITAB.

    ENDLOOP.

    MODULE USER_COMMAND.

    MODULE SHOW_ITAB.

    <TABLE CONTROL FIELD FOR MARK> = ITAB-MARK.

    ENDMODULE.

    MODULE MODIFY_ITAB.

    ITAB-MARK = <TABLE CONTROL FIELD FOR MARK>.

    MODIFY ITAB INDEX <TABLE CONTROL>-CURRENT_LINE.

    ENDMOFULE.

    MODULE USER_COMMAND.

    CASE OK_CODE.

    WHEN 'DELE'.

    DELETE ITAB WHERE MARK = 'X'

    ENDCASE.

    ENDMODULE.

    Regards,

    SaiRam

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.