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: 

the input or display only attribute of table contorl fileds

Former Member
0 Kudos

HI,experts

in the program there is one parameter p_recount.

in my table control ,there are 5 columns, f1 f2 f3 f4 f5

f1 f2 f3 is display only, and if p_recount = 00.,f4 f5 may input but if p_recount != 00.

f4 f5 also display only.

and when i push the "new" button,all the 5 fileds are input fields.

when i use LAY OUT to set attributes for the fields,the input/output attributes may not change

i think.

if there is some way to do this in the program use code?

how to do this?

thank you very much!

Edited by: hongtan zhang on Sep 15, 2008 9:11 AM

6 REPLIES 6

Former Member
0 Kudos

Hi,

In PBO write code to call a method inside Loop at itab with control statement.

And in that method write Loop at screen and check p_recount and field name and modify the filed attributes accordingly.

Regards

Karthik D

Former Member
0 Kudos

Hi

You can do like this.

In the PBO -

loop at tabcntl1-cols into cols.

if cols-screen-group1 = 'MOD'.

cols-screen-input = '0'.

modify tc-cols from cols.

endif.

endloop.

tabcntl1 is Table Contreol name

assign fields which you want to display into one group(MOD). Do this while creating table control fields. so that you can get N number of fields in display mode.

Former Member
0 Kudos

Hi you group the fields F1,F2,F3 in a single group1 named 'GP1'. and f4,f5 in group 'GP2'..

you also create a another group 'GP3' having all fields.

now in PBO.

loop at <i_tab> with control <tc-con>.

module modify.

if ok_code = 'NEW'.

loop at screen .

if screen-group2 = 'GP3'.

screen-input = '1'.

modify screen.

endif.

endloop.

endif.

loop at screen .

if screen-group1 = 'GP1'.

screen-input = '1'.

modify screen.

endif.

endloop.

loop at screen .

if screen-group1 = 'GP2'.

screen-input = '1'.

modify screen.

endif.

endloop.

0 Kudos

how to group them

0 Kudos

Hi,

i do it as you say.

but i can't pass error check

where should i put this code in?

in the status or ??

0 Kudos

Hi for error check.

you write code in PAI.

chain.

field:f1,f2,f3.

module validation.

endchain.

now for module validation.

write your condition like

if f1 > f2.

message e001( zsgclass).

endif.