cancel
Showing results for 
Search instead for 
Did you mean: 

hiding a table control column at push button command

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

former_member188685
Active Contributor
0 Kudos

Hi,

check this too....

Regards

vijay

former_member188685
Active Contributor
0 Kudos

hi,

check these links..,they will help you.

Regards

vijay

Former Member
0 Kudos
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
Former Member
0 Kudos

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 &#8216;Ente &#8216; . &#8220; ( user command )

*get data

CASE ok_code.

When &#8216;ENTE&#8217; .

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

rahulkavuri
Active Contributor
0 Kudos

set screen-invisible = '1'.

Former Member
0 Kudos

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

rahulkavuri
Active Contributor
0 Kudos

Yes u can do this

Use loop at screen and then set screen-invisibility = '1'.