‎2009 Mar 10 8:47 AM
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
‎2009 Mar 10 8:50 AM
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
‎2009 Mar 10 8:51 AM
‎2009 Mar 10 8:52 AM
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.
‎2009 Mar 10 8:52 AM
‎2009 Mar 10 8:53 AM
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
‎2009 Mar 10 8:53 AM
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
‎2009 Mar 10 8:54 AM
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.