Skip to Content
avatar image
Former Member

How to activate and deactivate the text fields in subscreens

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jul 14, 2009 at 08: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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 14, 2009 at 08: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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 15, 2009 at 06: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.
    

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 15, 2009 at 11:45 AM

    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

    Add comment
    10|10000 characters needed characters exceeded