‎2007 Jun 30 7:23 AM
Hi All,
How to display the data in text field based on the user selection from radio button. Thank you!
1) If user select
- radio 1, P_Name = ' BDC_HIBE'.
- radio 2, P_Name = ' BDC_HERS'.
<b><u>Parameters: -</u></b>
<u>Radio Button:</u>
1. HIBE Material
2. HERS Material
<u>Text Field:</u>
P_Name
‎2007 Jun 30 3:08 PM
Hi
Hi Define ur selection screen like...
PARAMETER: radio_1 RADIOBUTTON GROUP dtyp MODIF ID typ,
radio_2 RADIOBUTTON GROUP dtyp MODIF ID typ.
In At selection-screen Output event write the below code..
At Selection-screen output.
Loop at screen.
LOOP AT SCREEN.
IF screen-group1 = 'TYP'.
IF radio_1 = 'X'.
P_name = 'Ravi'.
MODIFY SCREEN.
ENDIF.
If radio_2 = 'X'
P_name = 'XXXXX'.
MODIFY SCREEN.
ENDIF.
ENDIF.
I hope this will solve ur problem
Reward me if its helpful.
Regards
Ravi
‎2007 Jun 30 7:26 AM
hi,
try using
loop at screen.
if p_button1 = 'X'.
p_name = 'abc'.
else.
p_name = 'xyz'.
endloop.
regards,
Navneeth K.
‎2007 Jun 30 7:27 AM
‎2007 Jun 30 7:27 AM
Sweety,
parameters: r1 radiobutton group g1,
r2 radiobutton group g1.
data: text1(10) type c value 'Sweety',
text2(10) type c value 'Garden'.
if r1 = 'X'.
write:/ text1.
else.
write:/ text2.
endif.
K.Kiran.
Message was edited by:
Kiran K
‎2007 Jun 30 7:27 AM
Hi,
Welcome to SDN.
Use two perform statement as
IF r_HIBE = 'X'.
PERFORM BDC_HIBE. "In this perform write all your code pertaining to your selection
ENDIF
IF r_HIERS = 'X'.
PERFORM BDC_HIERS.
ENDIF.Regards
Aneesh.
‎2007 Jun 30 8:46 AM
hi
try this example,
select-options : s_matnr for mara-matnr modif id aa,
s_matnr1 for marc-matnr modif id bb.
parameters : a radiobutton group grp1 user-command ucomm default 'X',
b radiobutton group grp1.
if a = 'X'.
loop at screen.
if screen-group1 = 'BB'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.
if b = 'X'.
loop at screen.
if screen-group1 = 'AA'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.
‎2007 Jun 30 9:13 AM
hi,
To define the input field of a parameter as a radio button, you use the following syntax:
<b>PARAMETERS <p> ...... RADIOBUTTON GROUP <radi>......</b>
Parameter <p> is created with type C and length 1, and is assigned to group <radi>. The maximum length of string <radi> is 4. You can use additions TYPE and LIKE, but you must refer to a field of type C with length 1. You must assign at least two parameters to each <radi> group. Only one parameter per group can have a default value assigned using the DEFAULT addition. The default value must be 'X'. If you do not use the DEFAULT addition, the first parameter of each group ist set to 'X'.
<b>follow this logic.</b>
PARAMETERS: HIBE RADIOBUTTON GROUP RAD1 DEFAULT 'X',
HERS RADIOBUTTON GROUP RAD1.
define text field P_Name as per your need.
DATA : P_Name(10) type c. " length depends on your need
AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
IF HIBE = 'X'.
P_Name = ' BDC_HIBE'
ELSEIF HERS = 'X'.
P_Name = ' BDC_HERS'.
ENDIF.
<b>OR</b>
AT SELECTION-SCREEN.
IF HIBE = 'X'.
P_Name = ' BDC_HIBE'
ELSEIF HERS = 'X'.
P_Name = ' BDC_HERS'.
ENDIF.
regards,
Ashok Reddy
Message was edited by:
Ashok Reddy
‎2007 Jun 30 2:41 PM
Hi Ashok,
If there any way to direct display the data in text field while choose one of the radio button without perform execute yet?
PARAMETERS: HIBE RADIOBUTTON GROUP RAD1 DEFAULT 'X',
HERS RADIOBUTTON GROUP RAD1.
PARAMETERS: p_name(12).
AT SELECTION-SCREEN.
IF HIBE = 'X'.
P_Name = ' BDC_HIBE' .
ELSEIF HERS = 'X'.
P_Name = ' BDC_HERS'.
ENDIF.
‎2007 Jun 30 3:08 PM
Hi
Hi Define ur selection screen like...
PARAMETER: radio_1 RADIOBUTTON GROUP dtyp MODIF ID typ,
radio_2 RADIOBUTTON GROUP dtyp MODIF ID typ.
In At selection-screen Output event write the below code..
At Selection-screen output.
Loop at screen.
LOOP AT SCREEN.
IF screen-group1 = 'TYP'.
IF radio_1 = 'X'.
P_name = 'Ravi'.
MODIFY SCREEN.
ENDIF.
If radio_2 = 'X'
P_name = 'XXXXX'.
MODIFY SCREEN.
ENDIF.
ENDIF.
I hope this will solve ur problem
Reward me if its helpful.
Regards
Ravi