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

Disabled Mode

Former Member
0 Likes
870

Hi guys,

In module pool program, in the first screen, i have a buttons like create, change, Display.

i need the output will greyed(disabled) when i click display button. wat i have to do for this ? do you have any sample code for disable mode.

Thanks

Raja

Edited by: Matt on Mar 10, 2009 9:50 AM - removed ALL CAPITALS from subject

7 REPLIES 7
Read only

Former Member
0 Likes
825

Hi,

Go Layout in se51

Click on the field which you want only display.

A screen will appear go to attributes and program and click Output Only,

Hope this helps .

Regards,

Amit Teja

Read only

GauthamV
Active Contributor
0 Likes
825

SEARCH in SCN you will get lot of posts on the same.

Read only

former_member242255
Active Contributor
0 Likes
825

you have to write the code under the USER_COmmand event,

when the DISPLAY button is clicjed you have to make the particluar filed disable.

Read only

Former Member
0 Likes
825

Hi,

Refer to this link..

Read only

Former Member
0 Likes
825

Hi,

Lets say that the field that you want to disable is a textbox with name as txt1. Suppose that the function code for display button is DISP, then try something like

IF SY_UCOMM = 'DISP'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'TXT1'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Now if the textbox has name TXT1 and you click on the display button then the textbox will be diabled. Likewise if you need to enable it use SCREEN-INPUT = 1.

Hope this helps.

Regards,

Sachin

Read only

Former Member
0 Likes
825

Hi Raja,

LOOP AT SCREEN.

IF screen-group1 = 'REF'.

screen-active = 0.

else.

screen-active = 1.

ENDIF.

Here screen group is the group of fields need to be assigned.

Thanks & Regards,

Ruchi Tiwari

Read only

Former Member
0 Likes
825

hi,

u can get the user command for display(the one u will have for button),then if display then u can loop at screen and make the elements input = 0,so tht the elements will be only display output mode.