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

Dynamic selection screen

Former Member
0 Likes
994

Dear all,

i m writing code in se38.

i want a selection screen which contain one input screen, ex-

Material Number

on based upon material number i want to show some radio button on screen.

i want to display radio buttons based on material number.

suppose i material = 1.

then, Radio Button 1

Radio Button 2

If Material = 2

Then,

Radio Button 1

Radio Button 2

Radio Button 3

Radio Button 4

Plz Help me how can i set this functionality in program

Anshuman

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
952

Hi Anshuman,

You need to write the logic at AT SELECTION-SCREEN OUTPUT.

TRY this code.

PARAMETERS: p_matnr(8) TYPE c.

PARAMETER: r_b1 TYPE c RADIOBUTTON GROUP g1,

r_b2 TYPE c RADIOBUTTON GROUP g1,

r_b3 TYPE c RADIOBUTTON GROUP g1,

r_b4 TYPE c RADIOBUTTON GROUP g1.

AT SELECTION-SCREEN OUTPUT.

IF p_matnr EQ '1'.

LOOP AT SCREEN.

IF screen-name EQ 'R_B3'.

screen-active = '0'.

ENDIF.

IF screen-name EQ 'R_B4'.

screen-active = '0'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

screen-active = '1'.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

START-OF-SELECTION.

7 REPLIES 7
Read only

anup_deshmukh4
Active Contributor
0 Likes
952

Use AT SELECTION SCREEN OUTPUT event and then place radio buttions in group and using SCREEN internal table do what erver you want ...!

Hope it helps

Read only

Former Member
0 Likes
952

Hi Anshuman ,

You will have to use Flow logic of screen. In PBO call one module say CHECK . In that Module you write the code as follows :

1. Create a screen with radio buttons 1,2,3,4.

2. MODULE CHECK OUTPUT.

if material = 1.

loop at screen.

IF screen-name = 'radio button 3'.

screen-invisible = 1.

MODIFY SCREEN.

ENDIF.

IF screen-name = 'radio button 4'.

screen-invisible = 1.

MODIFY SCREEN.

ENDIF.

endloop.

endif.

Hope this will help you. Please get back to me in case of any confusion.

regards,

Nikhil

Read only

0 Likes
952

I m writing a ALV report.

where i write these codes, in AT selection screen or some where else?

Read only

0 Likes
952

write in the block of AT SELECTION SCREEN OUTPUT

GOUP YOUR RADIO BUTTONS OR MAKE A FRAME OR MAKE A BLOCK

in the AT SELECTION SCREEN OUTPUT block

LOOP AT SCREEN.

  • ( User proper radio button group name and all and also see the screen structre you have fields for visiblity and enebeling - dusabkubg )

modify screen.

ENDLOOP.

Read only

Former Member
0 Likes
953

Hi Anshuman,

You need to write the logic at AT SELECTION-SCREEN OUTPUT.

TRY this code.

PARAMETERS: p_matnr(8) TYPE c.

PARAMETER: r_b1 TYPE c RADIOBUTTON GROUP g1,

r_b2 TYPE c RADIOBUTTON GROUP g1,

r_b3 TYPE c RADIOBUTTON GROUP g1,

r_b4 TYPE c RADIOBUTTON GROUP g1.

AT SELECTION-SCREEN OUTPUT.

IF p_matnr EQ '1'.

LOOP AT SCREEN.

IF screen-name EQ 'R_B3'.

screen-active = '0'.

ENDIF.

IF screen-name EQ 'R_B4'.

screen-active = '0'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

screen-active = '1'.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

START-OF-SELECTION.

Read only

0 Likes
952

Thanx a lot Ravindra,

My Problem is Solved.

this code is exactly the solution which i want.

Thanx once again.

Anshuman

Read only

anup_deshmukh4
Active Contributor
0 Likes
952

yep ...Raveendra Sunagar .has given you a better code...!

Cheers...!