‎2009 Dec 21 10:46 AM
Dear all,
i m writing code in se38.
i want a selection screen which contain one input screen, ex-
Material Number
on based upon material number i want to show some radio button on screen.
i want to display radio buttons based on material number.
suppose i material = 1.
then, Radio Button 1
Radio Button 2
If Material = 2
Then,
Radio Button 1
Radio Button 2
Radio Button 3
Radio Button 4
Plz Help me how can i set this functionality in program
Anshuman
‎2009 Dec 21 11:19 AM
Hi Anshuman,
You need to write the logic at AT SELECTION-SCREEN OUTPUT.
TRY this code.
PARAMETERS: p_matnr(8) TYPE c.
PARAMETER: r_b1 TYPE c RADIOBUTTON GROUP g1,
r_b2 TYPE c RADIOBUTTON GROUP g1,
r_b3 TYPE c RADIOBUTTON GROUP g1,
r_b4 TYPE c RADIOBUTTON GROUP g1.
AT SELECTION-SCREEN OUTPUT.
IF p_matnr EQ '1'.
LOOP AT SCREEN.
IF screen-name EQ 'R_B3'.
screen-active = '0'.
ENDIF.
IF screen-name EQ 'R_B4'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
screen-active = '1'.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
START-OF-SELECTION.
‎2009 Dec 21 10:54 AM
Use AT SELECTION SCREEN OUTPUT event and then place radio buttions in group and using SCREEN internal table do what erver you want ...!
Hope it helps
‎2009 Dec 21 10:54 AM
Hi Anshuman ,
You will have to use Flow logic of screen. In PBO call one module say CHECK . In that Module you write the code as follows :
1. Create a screen with radio buttons 1,2,3,4.
2. MODULE CHECK OUTPUT.
if material = 1.
loop at screen.
IF screen-name = 'radio button 3'.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
IF screen-name = 'radio button 4'.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
endloop.
endif.
Hope this will help you. Please get back to me in case of any confusion.
regards,
Nikhil
‎2009 Dec 21 11:00 AM
I m writing a ALV report.
where i write these codes, in AT selection screen or some where else?
‎2009 Dec 21 11:19 AM
write in the block of AT SELECTION SCREEN OUTPUT
GOUP YOUR RADIO BUTTONS OR MAKE A FRAME OR MAKE A BLOCK
in the AT SELECTION SCREEN OUTPUT block
LOOP AT SCREEN.
( User proper radio button group name and all and also see the screen structre you have fields for visiblity and enebeling - dusabkubg )
modify screen.
ENDLOOP.
‎2009 Dec 21 11:19 AM
Hi Anshuman,
You need to write the logic at AT SELECTION-SCREEN OUTPUT.
TRY this code.
PARAMETERS: p_matnr(8) TYPE c.
PARAMETER: r_b1 TYPE c RADIOBUTTON GROUP g1,
r_b2 TYPE c RADIOBUTTON GROUP g1,
r_b3 TYPE c RADIOBUTTON GROUP g1,
r_b4 TYPE c RADIOBUTTON GROUP g1.
AT SELECTION-SCREEN OUTPUT.
IF p_matnr EQ '1'.
LOOP AT SCREEN.
IF screen-name EQ 'R_B3'.
screen-active = '0'.
ENDIF.
IF screen-name EQ 'R_B4'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
screen-active = '1'.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
START-OF-SELECTION.
‎2009 Dec 22 5:24 AM
Thanx a lot Ravindra,
My Problem is Solved.
this code is exactly the solution which i want.
Thanx once again.
Anshuman
‎2009 Dec 21 11:21 AM
yep ...Raveendra Sunagar .has given you a better code...!
Cheers...!