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: 

How to activate and deactivate the text fields in subscreens

Former Member
0 Kudos

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

4 REPLIES 4

sivasatyaprasad_yerra
Active Contributor
0 Kudos

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.

former_member585865
Contributor
0 Kudos

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.

Former Member
0 Kudos

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.

vallamuthu_madheswaran2
Active Contributor
0 Kudos

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