Application Development 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: 

Alignment between radio buttons and fields

arumallaanusha
Explorer
0 Kudos
1,180

Hi ,

Greetings of the day

I am unable to get space between radio buttons

can anyone solve my issue

SELECTION-SCREEN SKIP.

"Settlement Partner
SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT (20) TEXT-001.

PARAMETERS: pstlptnr(10) TYPE c, pstltit(30) TYPE c .

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

"Selection by

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT (20) TEXT-002.

PARAMETERS pcntrno RADIOBUTTON GROUP grp1.

SELECTION-SCREEN COMMENT (20) FOR FIELD pcntrno.

PARAMETERS pcntrid RADIOBUTTON GROUP grp1.

SELECTION-SCREEN COMMENT (20) FOR FIELD pcntrid.

PARAMETERS pcntrtyp RADIOBUTTON GROUP grp1.

SELECTION-SCREEN COMMENT (20) FOR FIELD pcntrtyp.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

"Contract

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT (20) TEXT-003.

PARAMETERS: pcntr(10) TYPE c, pcntrdis(30) TYPE c .

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN COMMENT (60) TEXT-004.

SELECTION-SCREEN COMMENT (32) TEXT-005.

SELECTION-SCREEN COMMENT (10) TEXT-006.
SELECTION-SCREEN: END OF LINE.

"Settlement period Processing Process
****************************************************
SELECTION-SCREEN: BEGIN OF LINE.

PARAMETERS: pstlult RADIOBUTTON GROUP rad1 USER-COMMAND test.
*SELECTION-SCREEN POSITION 20.
SELECTION-SCREEN: COMMENT (30) FOR FIELD pstlult.

PARAMETERS: pmonth(2) TYPE c, pyear(4) TYPE c.

PARAMETERS: pback RADIOBUTTON GROUP rad2.

SELECTION-SCREEN POSITION 60.

SELECTION-SCREEN: COMMENT (30) FOR FIELD pback.

PARAMETERS: pstanstl RADIOBUTTON GROUP rad3 .

SELECTION-SCREEN: COMMENT (30) FOR FIELD pstanstl.

SELECTION-SCREEN: END OF LINE.
*************************************************

SELECTION-SCREEN: BEGIN OF LINE.

PARAMETERS: pstltdat RADIOBUTTON GROUP rad1.

SELECTION-SCREEN: COMMENT (30) FOR FIELD pstltdat.
**
PARAMETERS: pdate TYPE sy-datum.

PARAMETERS: ponline RADIOBUTTON GROUP rad2.

SELECTION-SCREEN: COMMENT (30) FOR FIELD ponline.

PARAMETERS: pinsol RADIOBUTTON GROUP rad3.

SELECTION-SCREEN: COMMENT (30) FOR FIELD pinsol.

SELECTION-SCREEN: END OF LINE.

7 REPLIES 7

arumallaanusha
Explorer
0 Kudos
330

selection-screen-error.png

can anyone help me to solve this issue

srikanthnalluri
Active Participant
330

Specify the location where do you want to display the text, something like this

PARAMETERS: pstltdat RADIOBUTTON GROUP rad1.
SELECTION-SCREEN: COMMENT 30(10) FOR FIELD pstltdat.

arumallaanusha
Explorer
0 Kudos
330

I am not getting space between fields and background radio button

Sandra_Rossi
Active Contributor
330

Please use the CODE button to format your code so that it's shown in a more user-friendly format (colorized).

Sandra_Rossi
Active Contributor
330

So, you are complaining about the fact that the label of a radio button is too close to it.

That's a dynpro technology constraint.

Workaround:

  1. Either add spaces at the beginning of the selection text (best solution)
  2. Or don't output the label but define a separate comment (this solution has the drawback that clicking the comment doesn't tick the radio button because they are not related)

SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS ponline RADIOBUTTON GROUP rad1.
SELECTION-SCREEN COMMENT (30) FOR FIELD ponline.
SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS pinsol RADIOBUTTON GROUP rad1.
SELECTION-SCREEN COMMENT 10(30) pinsoltx.
SELECTION-SCREEN END OF LINE.

INITIALIZATION.
  pinsoltx = 'Insolvency'(001).

PS: no need of posting lots of useless lines, only a few ones are needed to ask your question!

Jelena
Active Contributor
330

"We don't do that here" (c)

No disrespect but it's just bad UI design that doesn't follow SAP "look and feel".

First, there should be a block with a frame grouping screen elements in some logical way.

Second, radio buttons are not meant to be aligned the way you are wanting. They should be each on their own line and the text should be maintained properly in the Selection Texts where it can be easily translated.

We can also use other elements, such as tabs, to organize selection fields. Look, for example, at transaction WLF_IDOC. It has a very complex selection screen but you won't find any elements looking like the design you're trying to implement.

As a user, I'd be personally very annoyed by such design too. Instead of one nice column, I have to drag the mouse around the whole screen? No, thanks.

Preetha
Explorer
0 Kudos
330

Hi,

To display Text for the radiobutton or field we can use as follows:

Selection-screen begin of line.
PARAMETERS: p_field RADIOBUTTON GROUP r1.
selection-screen comment 25(10) forfield p_field.
Selection-screen end of line.

Thanks & Regards,

Preetha.