Application Development 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: 

How to make table control field invisible at runtime.

Former Member
0 Kudos

hi,

I have requirement that i should make a table control field invisible if there is no value in that particular cell of the screen .please let me know how to do that.

Regards,

Neha.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

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 =

wa-invisible = 1.

modify tbl_ctrl-cols from wa

endif

endloop

Regards

Pavan

3 REPLIES 3

Former Member
0 Kudos

Hi

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 =

wa-invisible = 1.

modify tbl_ctrl-cols from wa

endif

endloop

Regards

Pavan

Former Member
0 Kudos

HI

try this out

module process202 output.

case sy-tcode.

when 'ZPURCR_GR8' or 'ZPURCH_GR8'.

  • Check if the no of line is empty or not.

if lin ne 0.

loop at screen.

  • To make the screen editable.

screen-input = 1.

endloop.

else.

loop at screen.

if screen-name cs 'ITABLINE'.

  • To make the screen non-editable.

screen-input = 0.

modify screen.

endif.

endloop.

endif.

when 'ZPURDIS_GR8'.

loop at screen.

  • To make screen non editable .

screen-input = 0.

modify screen.

endloop.

endcase.

endmodule. " PROCESS202 OUTPUT

Former Member
0 Kudos

Hi,

I presume you want to make the particular cell only uneditable and without value (Dark Grey Cell). For that you need to write code in the PBO between LOOP ENDLOOP. Preferable add a new module before ENDLOOP. In that Check using the screen-name and if the value is zero then write the relevant LOOP AT SCREEN. screen-active = 0. Modify Screen. ENDLOOP. In else part make screen-active = 1. So only that cell is disabled.

Please check and revert.

Cordially,

Shankar Narayanan.