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

check boxes

Former Member
0 Likes
750

hi all,

i want to use check boxes instaed of radio buttons and those check boxes shoulbe form as a group

SELECTION-SCREEN BEGIN OF LINE.

selection-screen position 1.

SELECTION-SCREEN COMMENT 1(30) TEXT-002 FOR FIELD p_pdm.

PARAMETERS:

p_pdm RADIOBUTTON GROUP grp1 USER-COMMAND pntf."PDM Notification

SELECTION-SCREEN POSITION 40.

SELECTION-SCREEN COMMENT 41(10) TEXT-003 FOR FIELD P_task.

PARAMETERS:

p_task RADIOBUTTON GROUP grp1. "Task Notification

SELECTION-SCREEN END OF LINE.

I want to use check boxes instead of radio buttons and those radio buttons should be divided into two groups

For ex

group 1: Pdm group2: task

Check boxes

A d

B e

C f

thanks

ram

6 REPLIES 6
Read only

Former Member
0 Likes
723

use the command;

parameters: p_cb as check-box. "try with checkbox(without hyphen if it doesnt work).

There is no concept of grouping in checkboxes.

Regards,

ravi

Read only

0 Likes
723

hi ,

how u can decalre check boxes under radio button

radiobutton1:

1)cbox1

2)cbox2

---

tahnks

ram

Read only

Former Member
0 Likes
723

hi rams,

you cannot group the check boxes ...

Regards,

Santosh

Read only

Former Member
0 Likes
723

hi,

We have to write few lines of code for making checkboxes to behave like radio buttons.

  parameters : p_chk1 as checkbox user-command ABCD default 'X',
               p_chk2 as checkbox user-command PQRS.

  data: v_clk1 type c value 'X',
        v_clk2 type c.

  at selection-screen output.

   if v_clk1 = 'X'.
     p_chk1 = 'X'.
   else.
     p_chk1 = ' '.
   endif.
  if v_clk2 = 'X'.
    p_chk2 = 'X'.
  else.
    p_chk2 = ' '.
  endif.
  at selection-screen.

    case sy-ucomm.
      when 'ABCD'.
        if p_chk1 = 'X'.
          v_clk1 = 'X'.
          v_clk2 = ' '.
        else.
          v_clk1 =  ' '.
          v_clk2 = 'X'.
        endif.
      when 'PQRS'.
       if p_chk2 = 'X'.
          v_clk2 = 'X'.
          v_clk1 = ' '.
       else.
          v_clk2 = ' '.
          v_clk1 = 'X'.
       endif.

Regards,

Sailaja.

Read only

Former Member
0 Likes
723

Hi,

You can not declare checkboxes under radiobuttons.

You can get the similar functionality which you get for radiobuttons to the checkboxes also (making into a group) by few lines of code which i have given in my earlier post.

Regards,

Sailaja.

Read only

uwe_schieferstein
Active Contributor
0 Likes
723

Hello Rams

Probably you can achieve that your checkboxes behave like radiobuttons using user-commands attached to the checkboxes.

Yet this makes absolutely no sense to me, because it is violating the SAP standards for creating user interfaces.

Exclusive options (XOR) are represented using radio-buttons, whereas alternative options (OR) are represented as checkboxes.

So do not waste your time to change things where the entire SAP community has become familiar with for decades (not to speak of all the Windows/Mac/Linux users around the world).

Regards

Uwe