2007 Sep 24 7:13 AM
Hi,
I have 3 radio button, and was group as radio button group with FctCode 'RG'.
When select a radio button, the text of the radio button must change to other color or being highlighted to differentiate from the other 2. The inputfield beside the radio button also must change to the same color or highlighted. How do i go about it? Thanks
Regards,
Rayden
2007 Sep 24 7:26 AM
Hi Rayden,
Use this code as reference...
at selection-screen output.
loop at screen.
*--- If Radio Button 1 is checked
IF rad1 = 'X'.
IF screen-group1 = 'MI2'.
*--- Fields with MODIF ID MI2 are colored
screen-color = 1.
screen-intensified= 1.
ENDIF.
endloop.
You may only get blue color tho'
Reward points for useful Answers
Regards
Karthik
Hi,
I have 3 radio button, and was group as radio button group with FctCode 'RG'.
When select a radio button, the text of the radio button must change to other color or being highlighted to differentiate from the other 2. The inputfield beside the radio button also must change to the same color or highlighted. How do i go about it? Thanks
Regards,
Rayden
2007 Sep 24 7:26 AM
Hi Rayden,
Use this code as reference...
at selection-screen output.
loop at screen.
*--- If Radio Button 1 is checked
IF rad1 = 'X'.
IF screen-group1 = 'MI2'.
*--- Fields with MODIF ID MI2 are colored
screen-color = 1.
screen-intensified= 1.
ENDIF.
endloop.
You may only get blue color tho'
Reward points for useful Answers
Regards
Karthik
2007 Sep 24 7:39 AM
Hi Karthik,
Thanks for the reply. I don't understand the code. screen-group1 refer to the Radio button group is it?
Regards,
Rayden
2007 Sep 24 7:55 AM
Rayden,
No, Not the Radio Button grp...
The selection sceen fields musy have a MODIF-ID addition. Sry, i 4got to mention it... use the below code for ref...
*--- Radio buttons to set properties
PARAMETERS:
rad1 RADIOBUTTON GROUP rad default 'X' USER-COMMAND radio,
rad2 RADIOBUTTON GROUP rad,
rad3 RADIOBUTTON GROUP rad.
SELECT-OPTIONS:
s_matnr FOR mara-matnr MODIF ID MI1,
s_mtart FOR mara-mtart MODIF ID MI1.
at selection-screen output.
loop at screen.
*--- If Radio Button 1 is checked
IF rad1 = 'X'.
IF screen-group1 = 'MI1'.
*--- Fields with MODIF ID MI2 disappear from the screen
screen-color = 1.
screen-intensified= 1.
ENDIF.
endloop.
Reward points for useful Answers
Regards
Karthik
Message was edited by:
Karthik
2007 Sep 24 8:05 AM
Hi Karthik,
That was useful. I have abit clearer picture now. The reference given is for selection screen. I'm using dislog screen. I try to do a MODIF in my declaration but it seem like not working.
Sample Code:
========================================================
DATA:
rb_1(1) TYPE c MODIF ID SQ1,
rb_2(1) TYPE c MODIF ID SQ2,
rb_3(1) TYPE c MODIF ID SQ3,
=========================================================
The MODIF is in red color in my abap workbench. Any solution? Thanks
Regards,
Rayden
2007 Sep 24 8:13 AM
Rayden, if it is in dialog pgm, assign youe screen element to a screen GROUP (dbl click on it and u will see the GROUP field in properties.)
Now simply write a module to set screem propertieds in PBO. In that check if screen-group = X'... do ur stuff.
2007 Sep 24 8:38 AM
Hi this is the exmple code,
i am not using any color, but when the input is diabled, automatically its color will be different.
selection-screen begin of line.
parameters: p1 radiobutton group rg1 user-command ucomm default 'X'.
parameters: input(7) .
selection-screen end of line.
selection-screen begin of line.
parameters:
p2 radiobutton group rg1,
input1(7).
selection-screen end of line.
at selection-screen output.
loop at screen.
IF P1 = 'X'.
IF SCREEN-NAME = 'INPUT'.
screen-INPUT = 1.
ELSE.
IF SCREEN-NAME = 'INPUT1'.
screen-INPUT = 0.
ENDIF.
ENDIF.
ELSEIF P2 = 'X'.
IF SCREEN-NAME = 'INPUT1'.
screen-INPUT = 1.
ELSE.
IF SCREEN-NAME = 'INPUT'.
screen-INPUT = 0.
ENDIF.
ENDIF.
endif.
modify screen.
endloop.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |