‎2007 Dec 23 11:05 AM
hi,
plz tell me how can i control from the code the properties of the component on the screen.
(i.e if i have txtbox on screen and i set it invisable on the design mode, how can i from the code change it to be visable.
also how to enable and disable elements...etc.
Thanks,
Sreekar Pande.
‎2007 Dec 24 2:13 PM
Hi,
all you need to do is perform a loop at screen statement within the PBO of the screen and change the attributes of the particular field. I.e. to change an input field called 'PA9007-ID' from input to output use the following code:
loop at screen.
if screen-name = 'PA9007-ID'.
screen-input = 0.
modify screen.
endif.
endloop.
Reward points if found helpful....
Cheers,
Rakesh.
‎2007 Dec 23 11:18 AM
in case of selection screen.
u need to add modif-id <name> to the parameters & select-options.
SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN MODIF ID S1.
PARAMETER P_MATNR TYPE MARA-MATNR MODIF ID S2.
SELECTION-SCREEN END OF BLOCK B1.
PARAMETERS:R1 RADIOBUTTON GROUP G1 USER-COMMAND UC,
R2 RADIOBUTTON GROUP G1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF R1 = 'X' AND SCREEN-GROUP1 = 'S2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
CLEAR SCREEN.
ENDIF.
IF R2 = 'X' AND SCREEN-GROUP1 = 'S1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
CLEAR SCREEN.
ENDIF.
ENDLOOP.
Reward if useful
Regards
ANUPAM
‎2007 Dec 24 2:13 PM
Hi,
all you need to do is perform a loop at screen statement within the PBO of the screen and change the attributes of the particular field. I.e. to change an input field called 'PA9007-ID' from input to output use the following code:
loop at screen.
if screen-name = 'PA9007-ID'.
screen-input = 0.
modify screen.
endif.
endloop.
Reward points if found helpful....
Cheers,
Rakesh.