‎2007 Jun 18 5:48 AM
Hi Abap Guru,
I have one doubt in screen layout. If i click the radioutton on screenlayout i want some msg on different screen like "your ans is correct".
Please help me to olve this problem.
Thanks
‎2007 Jun 18 5:50 AM
hi
u can use <b>pop_to_inform</b> function module.
regards
ravish
<b>plz dont forget to reward points if helpful</b>
‎2007 Jun 18 5:51 AM
Hi,
At selection-screen output.
If Radio = 'X'.
message text-001 type 'S'.
endif.
regards,
Ruchika
‎2007 Jun 18 5:51 AM
Hi,
Check this code..
PARAMETERS: P_R1 RADIOBUTTON GROUP G1 USER-COMMAND USR
DEFAULT 'X',
P_R2 RADIOBUTTON GROUP G1.
AT SELECTION-SCREEN.
* Check if the radio button is pressed..
IF SY-UCOMM = 'USR' AND P_R1 = 'X'.
* display the message.
MESSAGE I208(00) with 'Message raised'.
ENDIF.
Thanks
Naren
‎2007 Jun 18 6:01 AM
My pgm is
data: radio1(1) type c,
radio2(1) type c,
ok_code type sy-ucomm,
save_ok type sy-ucomm.
call screen 100.
&----
*& Module USER_COMMAND_0100 INPUT
&----
text
----
MODULE USER_COMMAND_0100 INPUT.
save_ok = ok_code.
clear ok_code.
case save_ok.
when 'button'.
if radio2 = 'x'.
write 'x'.
else .
write 'w'.
endif.
when 'CANCEL'.
leave program.
endcase.
ENDMODULE. " USER_COMMAND_0100 INPUT
form read.
endform.
My requirement is that if i click radiobutton radio2 i want the msg
‎2007 Jun 18 5:52 AM
HI,
see the system defined program demo_dynpro_check_radio.it will be helpful for u.
reward points if helpful.
rgds,
bharat.
‎2007 Jun 18 5:56 AM
Hi,
try this at selection-screen output.
if radiobutton = 'X'
message 'your ans is correct' type 'S'.
endif.
regards,
sudha
‎2007 Jun 18 6:22 AM
hi,
use this piece of code
if p_rb = 'X'.
message i000(zz) with 'correct'.
endif.
zz- is message class.
‎2007 Jun 18 6:29 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>
<b>follow this logic.</b>
REPORT demo_sel_screen_user_command.
PARAMETERS: rad1 RADIOBUTTON GROUP rad ,
rad2 RADIOBUTTON GROUP rad,
rad3 RADIOBUTTON GROUP rad.
AT SELECTION-SCREEN.
IF rad1 = 'X'.
MESSAGE i001 WITH 'your ans is correct'.
ElSEIF rad2 = 'X'.
MESSAGE i002 WITH 'your ans is not correct'.
START-OF-SELECTION.
WRITE text-002.<b>or</b>
<b>SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
PARAMETERS: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',
R2 RADIOBUTTON GROUP RAD1,
R3 RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
PARAMETERS: R4 RADIOBUTTON GROUP RAD2 DEFAULT 'X',
R5 RADIOBUTTON GROUP RAD2,
R6 RADIOBUTTON GROUP RAD2.
SELECTION-SCREEN END OF BLOCK B2.
AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
IF R1 = 'X'.
MESSAGE I040 WITH 'your ans is correct'.
ELSEIF R2 ='X'.
MESSAGE I041 WITH 'your ans is not correct'
AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD2.
IF R4 = 'X'.
MESSAGE W040(HB).
ENDIF.</b>
regards,
Ashokreddy.
‎2007 Jun 18 6:31 AM
Hi,
In the RADIO button properties..there is a field called FctCode..Where you can use this field to assign a function code..Lets say if you had given the value RAD1
Then use this function module in the PAI..
CASE SY-UCOMM.
WHEN 'RAD1'. " Radio button is pressed.
*** " Do all your code here..
Thanks
Naren
‎2007 Jun 18 6:47 AM
hI AJAY,
USE THE CODE LIKE THIS.
TABLES:SSCRFIELDS.
PARAMETERS: radio1 RADIOBUTTON GROUP RAD1 USER-COMMAND BUTTON,
radio2 RADIOBUTTON GROUP RAD1.
AT SELECTION-SCREEN.
CASE SSCRFIELDS-UCOMM.
when 'BUTTON'.
if radiO1 = 'X'.
MESSAGE I000(Z_MSG_TAB).
else .
MESSAGE I001(Z_MSG_TAB).
endif.
endcase.
rgds,
bharat.