07-14-2009 8:49 AM
Hi All,
I have one requirement to activate and deactivate the fields in Sub screen.
The requirement is initially the all screen fields are output field with some value .Suppose user want to edit the value, they choose the check box then automatically the sub screen fields are changed to input modeu2026
How to validate these settings in the sub screens..
Thanks & Regards,
Samantula
07-14-2009 9:11 AM
You can use following code:
LOOP AT SCREEN.
CASE screen-name.
WHEN 'Screen Name'.
screen-input = 1.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
Provide Name of the field which you want to disable. This should be written in PBO module of the subscreen.
Execute this code based on your condition.
07-14-2009 9:56 AM
Hi Samantula,
Give User-command for your check box in your screen then when you click you can write your desired code to activate the input and output fields.
07-15-2009 7:36 AM
Hi,
Give a Function code for your check boxes in the Screen Attributes (in the Layout). If you are declaring the check box explicity, then use the syntax
| {AS CHECKBOX [USER-COMMAND fcode]}
This will trigger the PAI when you click on the check box. And then in the PBO of the subscreen,
IF checbox EQ 'X'.
LOOP AT SCREEN.
IF screen-name eq 'fieldname'.
screen-input = 1.
MODIFY screen.
ENDIF.
ENDLOOP.
ENDIF.
07-15-2009 12:45 PM
Hi,
if it is report then use the both at-selection screen.
if it is in dialog program AT SELECTION-SCREEN OUTPUT instead of PBO and AT SELECTION-SCREEN instead of PAI
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_chk <> 'X' AND screen-name = 'FLATFILE'.
screen-required = 0.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
AT SELECTION-SCREEN.
LOOP AT SCREEN.
IF p_chk <> 'X' AND screen-name = 'FLATFILE'.
screen-required = 0.
screen-input = 0.
MODIFY SCREEN.
ELSEIF p_chk = 'X' AND screen-name = 'FLATFILE'.
screen-input = 1.
MODIFY SCREEN.
ENDIF.
Thanks & Regards,
Vallamuthu.M