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

how ti disable screen fields in Module pool

former_member192432
Participant
0 Likes
6,209

hi

How to change screen fields to DISPLAY MODE aftr clicking on a particular pushbutton in Module pool prg .

regards

chetan

Edited by: chetan teli on Jul 29, 2008 1:04 PM

1 ACCEPTED SOLUTION
Read only

GauthamV
Active Contributor
0 Likes
2,098

hi,

CHECK THIS SAMPLE CODE.

LOOP AT SCREEN.

IF screen-name = 'DISP'.

IF p_pspnr = 'X'.

screen-input = 1.

ELSE.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

hi

How to change screen fields to DISPLAY MODE aftr clicking on a particular pushbutton in Module pool prg .

regards

chetan

Edited by: chetan teli on Jul 29, 2008 1:04 PM

5 REPLIES 5
Read only

GauthamV
Active Contributor
0 Likes
2,099

hi,

CHECK THIS SAMPLE CODE.

LOOP AT SCREEN.

IF screen-name = 'DISP'.

IF p_pspnr = 'X'.

screen-input = 1.

ELSE.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
2,098

Hi,

loop at screen.

if pushbutton name.

screen name-active = ' 0'

modify screen.

endif.

endloop.

Read only

Former Member
0 Likes
2,098

hiiii

use following code for disabling field

IF p_rad2 IS INITIAL .
    LOOP AT SCREEN.
      IF screen-name CS 'p_docno'.
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.                           " IF screen-name CS 'p_docno'.
    ENDLOOP.                           " LOOP AT SCREEN.

  ELSE.
    LOOP AT SCREEN .
      IF screen-name CS 'p_docno'.
        screen-active = 1.
        screen-input = 1.
        MODIFY SCREEN.
      ENDIF.                           " IF screen-name CS 'p_docno'.
    ENDLOOP.                           " LOOP AT SCREEN .
  ENDIF.                               " IF p_rad2 IS INITIAL .

regards

twinkal

Read only

Former Member
0 Likes
2,098

Chetan,

In the PAI of that screen.
If sy-ucomm = 'Fcode of that push bbutton'.
loop at screen.
if screen-name = 'xyz'.(give all the screen names which u want to activate)
screen-active = ' 0'.
modify screen.
endif.
endloop.
endif.

Read only

Former Member
0 Likes
2,098

case ok_code.

  when 'PBT'.                                 " Fcode for pushbutton
    Loop at screen.
      If screen-name = {Name of Sel. Screen field}.
        Screen-active = 1.
        Screen-input = 0.
        Modify screen.         
      Endif.
    Endloop.

endcase.