Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Resizing a table control dynamically.

Former Member
0 Likes
911

Hi,

I have a table control that I want to resize dynamically dependant on the number of lines I get back from MODULE tc_recover_perc_get_lines. Can one of you guru's assist. my code is as follows:-

PROCESS BEFORE OUTPUT.
* MODULE STATUS_0205.

  MODULE get_data_0205.

* Obtain number of lines on the table control.
  MODULE tc_recover_perc_get_lines.

* This binds the table control and the table memory.
  LOOP AT gtc_recperc INTO zrc_gui_tc_recperc
    WITH CONTROL tc_recoverable_perc.
  ENDLOOP.

  MODULE modify_screen_0205.
  MODULE hide_buttons.

*
PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0205.

* Loop at the table rows.
  LOOP AT gtc_recperc.

    CHAIN.
*     Tranfer the screen field values to the ABAP work area.
      FIELD: zrc_gui_tc_recperc-selected,
             zrc_gui_tc_recperc-cost_group,
             zrc_gui_tc_recperc-cost_group_text,
             zrc_gui_tc_recperc-fec_category,
*             zrc_gui_tc_recperc-fec_rate_code,
             zrc_gui_tc_recperc-fr_perc,
             zrc_gui_tc_recperc-split_rule,
             zrc_gui_tc_recperc-split_limit1,
             zrc_gui_tc_recperc-fr_perc2.
      MODULE modify_gtc_recperc ON CHAIN-REQUEST.

    ENDCHAIN.


  ENDLOOP.

  MODULE user_command_0205.
  MODULE set_data_0205.

3 REPLIES 3
Read only

Former Member
0 Likes
482

Hi,

Use TABC-LINES = lv_lines. " Keep this in PBO module after determining the Number of lines

TABC is the Table control reference

lv_lines is the var that the number of line from that module.

Regards,

Bharat Kalagara.

Read only

0 Likes
482

not sure what you mean I've modified my code to be as follows but it doesn't compile.

* Obtain number of lines on the table control.
  MODULE tc_recover_perc_get_lines.
  tc_recoverable_perc-LINES = 20 " RP 23.06.09 - 20 here being just an example

Read only

0 Likes
482

Hi,

Is "tc_recoverable_perc" the reference to ur table control? If yes then

Keep tc_recoverable_perc-LINES = 20 . statement inside one of the module.

U should have only modules in the Flow logic part and have to write the code in side the Modules.

Regards,

Bharat Kalagara.