‎2007 Jan 09 9:40 AM
Hi
I want to design the Selection screen as Follows:
Parameter Value RadiobuttonName RadioButton
Like this.
Please suggest and send me the Sample Code.
Regards,
Kumar
‎2007 Jan 09 9:50 AM
Hi ,
You can find the logic in below code.
SELECTION-SCREEN BEGIN OF BLOCK r1.
selection-screen begin of line.
selection-screen comment 1(10) TEST1 for field p_TEST1.
parameters:
p_test1(10) type c.
selection-screen comment 40(10) TEST2 for field p_r1.
PARAMETERS:
p_r1 RADIOBUTTON GROUP r1 USER-COMMAND change.
selection-screen end of line.
parameters:
p_r2 RADIOBUTTON GROUP r1.
SELECTION-SCREEN END OF BLOCK r1.
INITIALIZATION.
TEST1 = 'PARAMETER 1'.
TEST2 = 'RADIOBUTTON 1'.
Regards.
va.
‎2007 Jan 09 9:42 AM
Hello Sree,
Use this code.
Addition 12
... RADIOBUTTON GROUP radi
Effect
The parameter appears on the selection screen as a radio button. All parameters assigned to the same group radi in this way, form a group of radio buttons on the selection screen. When one is selected, all of the others are not selected. The name of the radio button group can be up to four characters long.
When you define a radio button parameter, you cannot specify a length. However, you can use the LIKE addition to refer to a field with length 1 and type C or the TYPE addition to specify length 1 and type C.
The addition does not affect the way in which the parameter is displayed (as in the AS CHECKBOX additino). You can arrange the parameters as you like using the SELECTION-SCREEN statement.
Notes
You can assign a user command to the radio button group using the USER-COMMAND ucomm addition. Since all of the buttons in the same group have the same command, you can only use this addition with the first parameter in the group.
A RADIOBUTTON group must have at least two parameters, of which only one (at most) can have a DEFAULT addition. The DEFAULT value must be 'X'.
In the database INCLUDE DBldbSEL, RADIOBUTTON parameters, like all others, must have the addition FOR TABLE dbtab. All of the parameters in a group must belong to the same table dbtab.
You cannot use a group name radi in a program if it has already been used in DBldbSEL.
Unlike in the case of "normal" parameters, the system does not jump to the AT SELECTION-SCREEN ON p event (in fact, it is syntactically not allowed). Instead, there is an event AT SELECTION-SCREEN ON RADIOBUTTON GROUP radi for the entire group. If this event contains a Error or Warning message, the entire radio button group is ready for input when the selection screen is redisplayed.
If useful reward.
Vasanth
‎2007 Jan 09 9:43 AM
Hi sree Ram,
REPORT demo_at_selection_on_radio.
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 w888(sabapdocu) WITH text-001.
ENDIF.
AT SELECTION-SCREEN ON RADIOBUTTON GROUP rad2.
IF r4 = 'X'.
MESSAGE w888(sabapdocu) WITH text-001.
ENDIF.
‎2007 Jan 09 9:50 AM
Hi ,
You can find the logic in below code.
SELECTION-SCREEN BEGIN OF BLOCK r1.
selection-screen begin of line.
selection-screen comment 1(10) TEST1 for field p_TEST1.
parameters:
p_test1(10) type c.
selection-screen comment 40(10) TEST2 for field p_r1.
PARAMETERS:
p_r1 RADIOBUTTON GROUP r1 USER-COMMAND change.
selection-screen end of line.
parameters:
p_r2 RADIOBUTTON GROUP r1.
SELECTION-SCREEN END OF BLOCK r1.
INITIALIZATION.
TEST1 = 'PARAMETER 1'.
TEST2 = 'RADIOBUTTON 1'.
Regards.
va.
‎2007 Jan 09 9:53 AM
hi,
i suppose u require the parameter and the radio button to be on the same line. if it is so the below code would be useful.
<b>report</b> demo.
begin of line.
<b>Parameter</b> para1 <b>like</b> mara-matnr.
<b>Parameter</b> rb1 <b>radiobutton group </b> rg1 <b>default</b> 'X'.
end of line.
‎2007 Jan 09 9:57 AM
> Hi
> I want to design the Selection screen as Follows:
>
> Parameter Value RadiobuttonName RadioButton
>
> Like this.
>
> Please suggest and send me the Sample Code.
>
> Regards,
> Kumar
hi
SELECTION-SCREEN BEGIN OF SCREEN 800 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK PREDT WITH FRAME TITLE PREDT1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS LOGINID LIKE Z243_MAT-MAS_AG_ID VALUE CHECK.
SELECTION-SCREEN COMMENT 4(20) CYR.
PARAMETERS YEARLY RADIOBUTTON GROUP YR1 USER-COMMAND UCYR.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK PREDT.
SELECTION-SCREEN END OF SCREEN 800.
in
INITIALIZATION.
CYR = 'YEARLY'.
PLS REWARD ALL HELPFUL POINTS
SIVA
Message was edited by:
Shan
‎2007 Jan 09 10:01 AM
REPORT ABC.
SELECTION-SCREEN BEGIN OF BLOCK B1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(10) TEXT-001 FOR FIELD P_MATNR.
PARAMETERS: P_MATNR LIKE MARA-MATNR.
PARAMETERS: R1 RADIOBUTTON GROUP RAD.
SELECTION-SCREEN COMMENT 60(10) TEXT-001 FOR FIELD R1.
PARAMETERS: R2 RADIOBUTTON GROUP RAD.
SELECTION-SCREEN COMMENT 75(10) TEXT-001 FOR FIELD R2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
‎2007 Jan 09 10:01 AM
Hi
PARAMETERS : R1 RADIOBUTTON GROUP RAD1,
R2 RADIOBUTTON GROUP RAD1,
R3 RADIOBUTTON GROUP RAD1 DEFAULT 'X',
S1 RADIOBUTTON GROUP RAD2,
S2 RADIOBUTTON GROUP RAD2,
S3 RADIOBUTTON GROUP RAD2 DEFAULT 'X'.
Example Selection screen.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_BUKRS LIKE BKPF-BUKRS OBLIGATORY.
"Company code
SELECT-OPTIONS : S_BELNR FOR BKPF-BELNR MODIF ID M01.
"Accounting Doc No
PARAMETERS: P_GJAHR LIKE BKPF-GJAHR MODIF ID M02.
"Fiscal year
SELECT-OPTIONS: S_BLART FOR BKPF-BLART MODIF ID M03,
"Document type
S_BUDAT FOR BKPF-BUDAT MODIF ID M04.
"Posting date
PARAMETERS: S1 RADIOBUTTON GROUP RAD2,
S2 RADIOBUTTON GROUP RAD2,
S3 RADIOBUTTON GROUP RAD2 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK B1.
-charitha
‎2007 May 23 9:07 AM