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: 

About ABAP Selection-screen radiobutton

0 Kudos

Hi all,

I have a problem.

Is there some way to creat selection-screen button (the same radiobutton group) in different blocks.

the err message is [A parameter of the radio group 'GP1' has already been defined in the block 'BLK1']

SELECTION-SCREEN BEGIN OF BLOCK BLK1.		
  PARAMETERS P_1 TYPE C RADIOBUTTON GROUP GP1.
SELECTION-SCREEN END  OF BLOCK BLK1.

SELECTION-SCREEN BEGIN OF BLOCK BLK2.
  PARAMETERS P_2 TYPE C RADIOBUTTON GROUP GP1.
SELECTION-SCREEN END  OF BLOCK BLK2.
1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor

I confirm what the compiler says, it's impossible.

Instead, define them in the same block (or outside any block), and define one different block below each radio button, which you hide and show based on which button is pressed (use USER-COMMAND to trigger the PAI when the button is pressed).

6 REPLIES 6

RAF
Active Contributor
0 Kudos

Hi,

i am wondering how this radiobutton should look like.

Maybe you can provide a mockup

bpawanchand
Active Contributor
0 Kudos

Hi,

I guess the best reference would be ABAPDOCU transaction.

Regards

Pavan

Sandra_Rossi
Active Contributor

I confirm what the compiler says, it's impossible.

Instead, define them in the same block (or outside any block), and define one different block below each radio button, which you hide and show based on which button is pressed (use USER-COMMAND to trigger the PAI when the button is pressed).

DoanManhQuynh
Active Contributor
0 Kudos

you can read this in documentation:

There cannot be more than one radio button group with the same name in one program, even if they are defined in different selection screens.

so its not possible. If you still want to stick with that design, maybe it you can use checkbox and write some logic to enable / disable it like radio button. or follow Sandra answer.

former_member1716
Active Contributor
0 Kudos

Hi,

No You cannot Create Same Radio button Group in different Block, probably if you can tell us your requirement we can solve the issue.

0 Kudos

OK, thanks everyone's kindly answers.

Now I confirm that it's really an impossible requirement .

I've changed the design.

Thanks for everyone again.