‎2007 May 11 12:28 PM
hi abapers,
Can anyone help me with the code to disable the text fields created in dialog prgming...
Also how to disable the buttons in screens (Module pool)
‎2007 May 11 12:32 PM
HI,
You just need to put this code in the PBO of the screen in a PBO module.
LOOP AT SCREEN.
IF SCREEN-NAME = 'Field or button name you want to hide'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN
ENDIF.
ENDLOOP.
Regards,
Sesh
‎2007 May 11 12:32 PM
Hi,
In the PBO Module,
Use the following code :
LOOP AT SCREEN.
IF SCREEN-NAME = FIELD1.
SCREEN-OUTPUT = 1.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
This will make a text field as uneditable.
Also, for a button created on the screen itself u can use the following :
LOOP AT SCREEN.
IF SCREEN-NAME = BTN1.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
This shud disable the button.
Regards,
Himanshu
‎2007 May 11 12:32 PM
HI,
You just need to put this code in the PBO of the screen in a PBO module.
LOOP AT SCREEN.
IF SCREEN-NAME = 'Field or button name you want to hide'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN
ENDIF.
ENDLOOP.
Regards,
Sesh
‎2007 May 11 12:34 PM
hi
in the properties of the field u can set this attribute
u uncheck the inputfield
attributes->inputfield->uncheck the checkbox.
‎2007 May 11 12:35 PM
Hi Maheshkumar,
write this code in PBO of modulepool.
LOOP AT SCREEN.
IF screen-name = i_tab-matnr.
screen-input = 0.
screen-output = 1.
MODIFY SCREEN.
ENDIF.
endloop.
U can disable text fields as well as buttons using <b>screen-name</b> statement.
reward points if helpful
Regards,
Hemant