‎2009 Jun 23 3:57 PM
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.
‎2009 Jun 23 4:10 PM
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.
‎2009 Jun 23 4:16 PM
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
‎2009 Jun 23 4:21 PM
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.