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: 

editing the fields in a table control

Former Member
0 Kudos

Hi experts,

I have a selection screen which has table control in it.Intially some columns table control should be input disabled.When i enter data in other columns which are input enabled and press enter then the columns which are input disabled should be input enabled.Then i should be able to enter the data in those columns as well.How can i do it in a table control? Is it possible to do it in a table control? Can anyone please give me a solution for this problem.

Thanks.

dp.

8 REPLIES 8

Former Member
0 Kudos

hi,

u can make one module in PBO like,

MODULE init_screen OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 111 .

screen-input = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDMODULE. " init_screen OUTPUT

and here u can check some condition that should b true if u have entered data in required field. and than u can put this condition...

0 Kudos

Hi shah,

Thanks for the reply.I tried the part what u have suggested me but it didn't work.Can we make the fields in the table control enable or disable like in a normal selection csree?

Thanks.

dp.

0 Kudos

i did that.

I have one table control, which has 4 columns.

Initially two columns are disable.

As soon as user enter data in second column and press enter, third column become input enable....

u want this only no?

0 Kudos

Hi shah,

Exactly what u said is my requirement?

0 Kudos

ok,

so i told u what i did..just try it....

Here its working

Former Member
0 Kudos

Use the followiung concept

Loop at screen.

if screen-name = <Fieldname>

screen-input = 0

endif.

modify screen.

endloop.

reward if useful

Former Member
0 Kudos

hi,

IN PAI u having like..

LOOP AT itab_det.

CHAIN.

  • FIELD itab_det-comp_code.

FIELD itab_det-bill_no.

FIELD itab_det-bill_date.

FIELD itab_det-vend_cust_code.

FIELD itab_det-bill_amt.

MODULE <b>tab1_modify</b> ON CHAIN-REQUEST.

ENDCHAIN.

FIELD itab_det-mark

MODULE tab1_mark ON REQUEST.

ENDLOOP.

i have did like,

MODULE tab1_modify INPUT.

if <b>itab_det-bill_no</b> is not initial.

fb = 1.

endif.

APPEND itab_det.

ENDMODULE. "TAB1_MODIFY INPUT

here iitab_det-bill_no is the column which will decide that 3rd column should b enable or not?

than in PBO...

MODULE init_screen OUTPUT.

LOOP AT SCREEN.

IF screen-group2 = 222 .

IF fb = 1.

screen-input = 1.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

ENDMODULE. " init_screen OUTPUT

here give groups as 222 in attribute of the field of table control( 3 rd column)

it will work...

former_member491305
Active Contributor
0 Kudos

Hi Dp,

Make sure you have called that module in Loop Endloop of the particular table control in PBO ( Process Before Event ).

EG;

LOOP AT it_est_approve

INTO x_est_approve

WITH CONTROL tc_ap

CURSOR tc_ap-current_line.

MODULE tc_ap_get_lines.

Module CHANGE_SCREEN.

*&SPWIZARD: MODULE TC_AP_CHANGE_FIELD_ATTR

ENDLOOP.