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: 

dynamically disabling a text field in dialogue programming

Former Member
0 Kudos

Hi all ,

i am doing a case study on library management . I made a screen for editing the book details.. The initial screen will display the all the information regarding a book based on ISBN no. In top i have a change button. <b>My need is to disable only the ISBN text field when i press change button</b> .

Now i am using this code ..But this code will activate all text field.

IF OK_CODE EQ 'CHANGE'.

  • Make all the Fields non-Editable

LOOP AT SCREEN.

SCREEN-INPUT = 1.

MODIFY SCREEN.

CLEAR OK_CODE.

ENDLOOP.

ENDIF

Please give a solution regarding this issue...

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Umesh,

U r correct but modify the codesw as follows:

IF OK_CODE EQ 'CHANGE'.
* Make all the Fields non-Editable
LOOP AT SCREEN.
IF SCREEN-NAME = 'URSCR_FLD'.
SCREEN-INPUT = 1.
MODIFY SCREEN.
ENDIF.
CLEAR OK_CODE.
ENDLOOP.
ENDIF

2 REPLIES 2

Former Member
0 Kudos

Hi Umesh,

U r correct but modify the codesw as follows:

IF OK_CODE EQ 'CHANGE'.
* Make all the Fields non-Editable
LOOP AT SCREEN.
IF SCREEN-NAME = 'URSCR_FLD'.
SCREEN-INPUT = 1.
MODIFY SCREEN.
ENDIF.
CLEAR OK_CODE.
ENDLOOP.
ENDIF

Former Member
0 Kudos

Hi Umesh,

Go to the Screen Painter and Double click on the Text field you are discussing here. It will open a window. In that window u will see group boxes (they are 4). For that text button sepcify group as GRP1 in any of the box. Then write foolwing code.

LOOP AT SCREEN.

IF SCREEN-GROUP = 'GRP1'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

CLEAR OK_CODE.

ENDLOOP.

    • Please Reward points if this solves your query. it motivates us.

Darshan