Application Development and Automation 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: 
Read only

table control add line

Former Member
0 Likes
347

I have table control it pick data from ztable there are 4 (A ,B,C,D )field in it.

My requirement is when it going to display field B( text-filed ) on screen it should come in disable mode and (C- int ,D - int )should come in enable mode.

And when I add new line then only New Line data i.e B (Txt) come in enable mode .whatever data coming from ztable B(txt) must be disable mode . So that user can not change coming from ztale only new entries to allowed to edit..

How to do that logic ?

Please help me..

Point is assured..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
328

hi Monica,

Do this, assign a group (modif) id to the screen field/column for B field in the table control. When you double click on the column, you shall four boxes, which are group IDs .. SCREEN-GROUP1 to GROUP4.

Now in first box, assign say HID.

Now in the PBO flow logic, you have the LOOP ... ENDLOOP on table control. Create a new module within this LOOP/ENDLOOP as follows:


MODULE md_enable_disable_b.
 LOOP AT SCREEN WHERE GROUP1 EQ 'HID'. 
IF WA-B IS INITIAL. "no value in b field
    SCREEN-INPUT = '1'. "enable field for input
ELSE.
   SCREEN-INPUT = '0'. "value is there in the field then disable
ENDIF.
SCREEN-ACTIVE = '1'.
MODIFY SCREEN.
ENDLOOP.
ENDMODULE.

Assuming here wa is the work area of the internal table.

this should do it

Cheers,

Aditya

Edited by: Aditya Laud on Feb 1, 2008 12:31 PM

2 REPLIES 2
Read only

Former Member
0 Likes
329

hi Monica,

Do this, assign a group (modif) id to the screen field/column for B field in the table control. When you double click on the column, you shall four boxes, which are group IDs .. SCREEN-GROUP1 to GROUP4.

Now in first box, assign say HID.

Now in the PBO flow logic, you have the LOOP ... ENDLOOP on table control. Create a new module within this LOOP/ENDLOOP as follows:


MODULE md_enable_disable_b.
 LOOP AT SCREEN WHERE GROUP1 EQ 'HID'. 
IF WA-B IS INITIAL. "no value in b field
    SCREEN-INPUT = '1'. "enable field for input
ELSE.
   SCREEN-INPUT = '0'. "value is there in the field then disable
ENDIF.
SCREEN-ACTIVE = '1'.
MODIFY SCREEN.
ENDLOOP.
ENDMODULE.

Assuming here wa is the work area of the internal table.

this should do it

Cheers,

Aditya

Edited by: Aditya Laud on Feb 1, 2008 12:31 PM

Read only

Former Member
0 Likes
328

thanks adity...

point has been given