Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Radiobuttons

Former Member
0 Likes
1,339

Hi,

I have requirement like

1. Validate

1.1 full validation.

1.2 partial validation.

2. Upload

2.1 full upload

2.2 Parital upload

how can i write the code for these radiobuttons.

Regards,

Suresh

15 REPLIES 15
Read only

Former Member
0 Likes
1,295

Hello,

check this code.

parameters: r1 radiobutton group g1,

r2 radiobutton group g1.

if r1 = 'X' .

write: /'123'.

else.

write: /'456'.

endif.

Thank u,

santhosh

Read only

Former Member
0 Likes
1,295

Hi,

seems you want to have TWO different sets of radiobuttons ?????

then do like:

SELECTION-SCREEN BEGIN OF BLOCK a .
PARAMETERS:
  rb_vdt  RADIOBUTTON GROUP rad0        " Validate 
             DEFAULT 'X',
   rb_uld RADIOBUTTON GROUP rad0.        " Upload
SELECTION-SCREEN END OF BLOCK a.
   SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-t01."Validate
     PARAMETERS:
           rb_fvdt RADIOBUTTON GROUP rad1        " Full Validate 
             DEFAULT 'X' MODIF ID r1,
             rb_pvdt RADIOBUTTON GROUP rad1       " Partial Validate 
               MODIF ID r1.
     SELECTION-SCREEN END OF BLOCK b.

SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-t02.  "Upload
PARAMETERS:
     rb_fuld RADIOBUTTON GROUP rad2,       " full Upload
        DEFAULT 'X' MODIF ID r2,
     rb_puld RADIOBUTTON GROUP rad2       " Partial Upload
        MODIF ID r2.

SELECTION-SCREEN END OF BLOCK b.
..........................................................
INITIALIZATION.
loop at screen.
  case screen-group.
     when 'R1' or 'R2'.
        screen-invisible = '1'.
        modify screen.
     endcase.
endloop.
............................................................
AT SELECTION-SCREEN OUTPUT.
if rb_vdt = 'X'.
  <modify screen elements to make visible 'R1'>
elseif rb_uld = 'X'.
  <modify screen elements to make visible 'R2'>
endif.

regards,

Neha

Read only

Former Member
0 Likes
1,295

HI,

Declare the two radibuttons for Validate & Upload. and two input filed for full validation.

partial validation.

depending on the radio the use the full validation partial validation values.

PARAMETES p_validate RADIOBUTTON GROUP rad1 default 'X'.
PARAMETES p_upload  RADIOBUTTON GROUP rad1 . 

PARAMETES  full validation ...
PARAMETES  partial validation

Edited by: avinash kodarapu on Jan 5, 2009 12:19 PM

Edited by: avinash kodarapu on Jan 5, 2009 12:20 PM

Read only

Former Member
0 Likes
1,295

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

parameter : r1 radiobutton group rad1,

r11 radiobutton group rad2,

r12 radiobutton group rad2,

r2 radiobutton group rad1,

r21 radiobutton group rad3,

r22 radiobutton group rad3.

SELECTION-SCREEN END OF BLOCK b1.

initialization.

r1 = '1. Validate'.

r11 = '1.1 full validation'.

r12 = '1.2 partial validation.'.

r2 = 'Upload'.

r21 = ' 2.1 full upload'.

r22 = ' 2.2 Parital upload'.

Hope this will help u

Read only

Former Member
0 Likes
1,295

Hi,

In first selection screen, have these two Radio button

1. Validate

2. Upload

when u click Validate radio button, it displays these two radio button

1 full validation.

2 partial validation.

if u click Upload, it displays

1 full upload

2 Parital upload

do like this using modify screen.

it'll be Good.

If u need sample code for Modify screen let me know

Read only

0 Likes
1,295

Hi,

Please provide me sample code.

Regards,

Suresh

Read only

0 Likes
1,295

Hi

Check this

TABLES : mara,marc.

*******************************************************************************************

************************Selection screen fields******************************************

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS : p_meth1 RADIOBUTTON GROUP g1 USER-COMMAND g1,

p_meth2 RADIOBUTTON GROUP g1.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK matnr

WITH FRAME TITLE text-002.

SELECTION-SCREEN SKIP 1.

SELECT-OPTIONS : so_matnr FOR marc-matnr MODIF ID m1.

SELECTION-SCREEN SKIP 1.

SELECT-OPTIONS : so_werks FOR marc-werks MODIF ID m1 .

SELECTION-SCREEN END OF BLOCK matnr.

SELECTION-SCREEN BEGIN OF BLOCK file WITH FRAME TITLE text-003.

SELECTION-SCREEN SKIP 1.

PARAMETERS: p_fpath TYPE ibipparms-path MODIF ID m2 LOWER CASE.

SELECTION-SCREEN END OF BLOCK file.

SELECTION-SCREEN BEGIN OF BLOCK date WITH FRAME TITLE text-004.

SELECTION-SCREEN SKIP 1.

PARAMETERS : p_date TYPE datuv.

SELECTION-SCREEN END OF BLOCK date.

***************************************************************************************

***********************Screen Validation*********************************************

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'M1'.

IF p_meth1 <> 'X'.

screen-active = 1.

ENDIF.

IF p_meth2 = 'X'.

screen-active = 0.

ENDIF.

WHEN 'M2'.

IF p_meth2 = 'X'.

screen-active = 1.

ELSE.

screen-active = 0.

ENDIF.

IF p_meth1 = 'X'.

screen-active = 0.

ENDIF.

ENDCASE.

MODIFY SCREEN.

ENDLOOP.

Read only

Former Member
0 Likes
1,295

Hi,

Follow below code:

SELECTION-SCREEN BEGIN OF BLOCK b1

WITH FRAME TITLE text-000.

PARAMETERS:

r1 radio button group A

p_fulpip TYPE rlgrap-filename LOWER CASE.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2

WITH FRAME TITLE text-000.

PARAMETERS:

r2 radio button group B

p_prtpip TYPE rlgrap-filename LOWER CASE.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fulpip.

IF r1 = 'X.

do your logic,

elsefi r2 = 'X'

do logic.

Endif.

Thanks

Read only

Former Member
0 Likes
1,295

Hi,

Try below code

SELECTION-SCREEN BEGIN OF BLOCK a.

PARAMETERS:

rb_vdt RADIOBUTTON GROUP rad1 " Validate

DEFAULT 'X'.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN: POSITION 3.

PARAMETERS: rb_fvdt RADIOBUTTON GROUP rad1. " Full Validate

SELECTION-SCREEN: COMMENT 5(21) text-028.

PARAMETERS: rb_pvdt RADIOBUTTON GROUP rad1. " Partial Validate

SELECTION-SCREEN: COMMENT 29(21) text-029.

SELECTION-SCREEN END OF LINE.

PARAMETERS:

rb_uld RADIOBUTTON GROUP rad1. " Upload

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN: POSITION 3.

PARAMETERS: rb_fuld RADIOBUTTON GROUP rad1. " full Upload

SELECTION-SCREEN: COMMENT 5(21) text-028.

PARAMETERS: rb_puld RADIOBUTTON GROUP rad1. " Partial Upload

SELECTION-SCREEN: COMMENT 29(21) text-029.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK a.

and do your screen validations under AT SELECTION-SCREEN.

regards,

Siva.

Read only

Former Member
0 Likes
1,295

Hello,

as per my understaning, the code for your requirement would as below,

parameters:

p_val RADIOBUTTON GROUP rad1,

p_val_full RADIOBUTTON GROUP rad2,

p_val_part RADIOBUTTON GROUP rad2,

p_upload RADIOBUTTON GROUP rad1,

p_up_full RADIOBUTTON GROUP rad3,

p_up_part RADIOBUTTON GROUP rad3.

Read only

Former Member
0 Likes
1,295

Hi Suresh

Try this:

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

parameter : ra radiobutton group rad1,

ra1 radiobutton group rad2,

ra2 radiobutton group rad2,

rb radiobutton group rad1,

rb1 radiobutton group rad3,

rb2 radiobutton group rad3.

SELECTION-SCREEN END OF BLOCK b1.

I'll suggest you to use this using MODIFY SCREEN, i.e if Validate is selected, display ra1 and ra2 and keep rb1 and rb2 hidden and vice-versa.

Hope this help.

Read only

0 Likes
1,295

according to req. its looks like...


parameters:
p_val_1 RADIOBUTTON GROUP r1,
p_val_2 RADIOBUTTON GROUP r1,
p_val_3 RADIOBUTTON GROUP r1,

p_upl_1  RADIOBUTTON GROUP r2,
p_upl_2  RADIOBUTTON GROUP r2,
p_upl_3  RADIOBUTTON GROUP r2.

Regards,

RH

Read only

Former Member
0 Likes
1,295

Hi,

You try this for your requirement.

parameters: v1 radiobutton group rad1 default 'X' user-command aa. " Validate.

selection-screen begin of block a with frame title text-001.

parameters: v2 radiobutton group radi modif id aa. " Full Validate

parameters: v3 radiobutton group radi modif id aa. " Partial Validate

selection-screen end of block a.

parameters: u1 radiobutton group rad1. " Upload

selection-screen begin of block b with frame title text-002.

parameters: u2 radiobutton group rad2 modif id cc. " full Upload

parameters: u3 radiobutton group rad2 modif id cc. " Partial Upload

selection-screen end of block b.

Initialization.

at selection-screen output.

if v1 = 'X'.

loop at screen.

if screen-group1 = 'AA'.

screen-input = '1'.

modify screen.

endif.

if screen-group1 = 'CC'.

screen-input = '0'.

screen-invisible = '1'.

modify screen.

endif.

endloop.

elseif u1 = 'X'.

loop at screen.

if screen-group1 = 'AA'.

screen-input = '0'.

screen-invisible = '1'.

modify screen.

endif.

if screen-group1 = 'CC'.

screen-input = '1'.

screen-invisible = '0'.

modify screen.

endif.

endloop.

endif.

if v1 = 'X'.

if v2 = 'X'.

'Mention your logic'

elseif v3 = 'X'.

'Mention your logic'

endif.

elseif u1 = 'X'.

if u2 = 'X'.

'Mention your logic'

elseif u3 = 'X'.

'Mention your logic'

endif.

endif.

Regards,

Joan

Read only

Former Member
0 Likes
1,295

Hi,

Check the following code:

parameters: rd_valid radiobutton group rd1 user-command abc default 'X'.

selection-screen: begin of block val with frame title txt1.

parameters: rd_flvld radiobutton group rd2 modif id r1,

rd_prvld radiobutton group rd2 modif id r1.

selection-screen: end of block val.

parameters: rd_uplod radiobutton group rd1.

selection-screen: begin of block upd with frame title txt2.

parameters: rd_flupd radiobutton group rd3 modif id r2,

rd_prupd radiobutton group rd3 modif id r2.

selection-screen: end of block upd.

initialization.

txt1 = 'Validation Block'.

txt2 = 'Upload Block'.

at selection-screen output.

if rd_valid = 'X'.

loop at screen.

if screen-group1 = 'R1'.

screen-active = 1.

modify screen.

endif.

if screen-group1 = 'R2'.

screen-active = 0.

modify screen.

endif.

endloop.

elseif rd_uplod = 'X'.

loop at screen.

if screen-group1 = 'R2'.

screen-active = 1.

modify screen.

endif.

if screen-group1 = 'R1'.

screen-active = 0.

modify screen.

endif.

endloop.

endif.

Regards,

Bhaskar

Read only

Former Member
0 Likes
1,295

Hi,

do it like this.

AT SELECTION-SCREEN.

if rd1 = 'X'.

codelines.

ELSEIF rd2 = 'X'.

codelines.

and so on for the number of buttons you required.

Regards

Rajesh Kumar