on 05-10-2006 1:18 PM
Hi All ,
I want to hide or disable a table control column at enter command of an input-output field
Or on pressing of a push button .
Can I do it during runtime i.e; in PAI of a screen ?
I need your help .
Thanks ,
Sun
hi sunand,
1. define group name(s) for the columns to be hidden
2. Add the following code...
(define)
controls tbl_ctrl type tableview ...
wa like tbl_ctrl-cols.
loop at tbl_ctrl-cols into wa.
if wa-screen-group1 = <group defined for the column>
wa-invisible = 1.
modify tbl_ctrl-cols from wa
endif
endloop
u can surely do this in the pai module.
award pts if helpful.
regards,
keerthi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hii
Set screen attributes for table control
loop at zzhb6_0100 with control zhb6ctl
cursor zhb6ctl-top_line.
module move_data_to_0100.
module modify_screen_0100.
endloop.
Then:
module modify_screen_0100 output.
loop at screen.
if screen-group1 = '001'.
screen-INVISIBLE = '1'.
modify screen.
endif.
endloop.
thanks & regards
Naresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try like this
in PAI
when 'PUSH'.
loop at screen.
if screen-name = 'ITAB-COLMN1'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
where PUSH is ur FCODE for ur pushbutton
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rahul & Chandrashekhar ,
Thanks for the reply .
Actually I am writing it like this in PAI of screen .
Under MODULE user_command_3000 INPUT.
When ‘Ente ‘ . “ ( user command )
*get data
CASE ok_code.
When ‘ENTE’ .
loop at screen .
if screen-name = 'I_TABL-MATNR'.
screen-invisible = '0' .
modify screen .
endif .
endloop.
Clear ok_code .
Endcase .
But not working .
Regards ,
Sun
Hi
If you want to hide the whole colunm you have to update the characteristics of table control (not SCREEN TABLE):
MODULE MODIFY_TABLE_CONTROL OUTPUT.
DATA: BEGIN OF WA_CTRL,
SCREEN LIKE SCREEN, "Attributes struktur SCREEN
INDEX TYPE I, "Position of a column screen
SELECTED(1) TYPE C, "Indicator 'column selected'
VISLENGTH LIKE ICON-OLENG, "Visualised length
INVISIBLE(1) TYPE C, "Indicator 'column invisible'
END OF WA_CTRL.
LOOP AT <TABLE CONTROL> INTO WA_CTRL.
IF WA_CTRL-SCREEN-NAME = <COLUNM>.
WA_CTRL-SCREEN-INPUT = 0.
WA_CTRL-INVISIBLE = 'X'.
ELSE.
WA_CTRL-SCREEN-INPUT = 1.
WA_CTRL-INVISIBLE = SPACE.
ENDIF.
MODIFY <TABLE CONTROL> FROM WA_CTRL.
ENDLOOP.
ENDMODULE.
Insert this module in PBO:
MODULE MODIFY_TABLE_CONTROL.
LOOP AT ...
MODULE LOOP_SCREEN.
ENDLOOP.
If you want to became the colunm enable for input:
MODULE LOOP_SCREEN.
loop at screen .
if screen-name = 'I_TABL-MATNR'.
screen-input = '0' .
modify screen .
endif .
ENDMODULE.
Max
Yes u can do this
Use loop at screen and then set screen-invisibility = '1'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.