‎2008 Feb 01 2:10 PM
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..
‎2008 Feb 01 5:31 PM
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
‎2008 Feb 01 5:31 PM
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
‎2008 Feb 04 3:36 PM