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

abap-gui

Former Member
0 Likes
256

hi experts and gurus,

i have a screen with two buttons like 'chang' and 'display' . my requirment is that when i click on change the screen should enable and when i click on display it should disable. please help me with the code and it is urgent pls send as soon as possible.

regards,

jacob

1 REPLY 1
Read only

Former Member
0 Likes
236

Hello,

You can use the follow.

This to turn the fields editable.


LOOP AT SCREEN.
  CHECK SCREEN-NAME = 'FIELD_NAME'.
  SCREEN-INPUT = '1'.
  MODIFY SCREEN.
ENDLOOP.

And this to turn the fields closed.


LOOP AT SCREEN.
  CHECK SCREEN-NAME = 'FIELD_NAME'.
  SCREEN-INPUT = '0'.
ENDLOOP.

You should use this in the PBO of you screen or at the event AT SELECTION-SCREEN OUTPUT. in a report.

Here there's some examples:

[https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/use%2bof%2bat%2bselection-screen%2boutput]

[https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/table%2bmaintenance%2bin%2babap]

Regards,