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: 

issue with selection screen

Former Member
0 Kudos

Hi,

HI all,

i am having some problem with selection screen.

i have three radio buttons on my selections creen , and upon selection of diffrent radio button the selection screen should change.

initilly i will get a selections cren for the default selected radi button and when change the radio button i need to get diffrent selection screen,

this works fine when i have the normal selection screen, but my problems is i have

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

selection-screen : skip 1.

selection-screen begin of line.

selection-screen comment 1(10) text_002.

parameters: p_MATNR like MARA-MATNR modif id g1.

selection-screen comment 50(10) text_001.

parameters: p_MATNR1 like MARA-MATNR modif id g1.

selection-screen end of line.

selection-screen : begin of block blk2 with frame title text-003.

selection-screen : skip 1.

selection-screen begin of line1.

selection-screen comment 1(10) text_003.

parameters: p_DATE TYPE SY-DATUM modif id g2.

selection-screen comment 50(10) text_004.

parameters: p_DATE1 TYPE SY-DATUM modif id g2.

selection-screen end of line1.

TEXT_004 IS DATE .

TEXT_003 IS DATE WITH .

TEXT_002 IS MATERIAL .

TEXT_001 IS MATERIAL WITH .

WHEN I SELECT FIRST RADIO BUTTON ,

I SEE 3 RADIO BUTTONS

ADN BELOW I SEE

MATERIAL -


WITH MATERIAL -


DATE WITH DATE

I SHOULDNOT GET DATE AND DATE WITH

WHEN I SELECT THE SECOND RADIO BUTTON I NEED TO SEE

DATE -


WITH DATE -


.

WHAT I AM GETTING NOW FOR SECOND RADIO BUTTON IS

MATERIAL WITH MATERIAL

DATE -


WITH DATE -


.

I AM USING THE FOLLOWING CODE AT SELECTION SCREEN OUTPUT.

LOOP AT SCREEN.

IF RAD1 = 'X'.

IF LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'G2'.

SCREEN-ACTIVE = 1.

ENDIF. ENDIF. ENDIF.

ENDLOOP.

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Deepthi,

This is because you will have values avialable for TEXT_001,TEXT_002,TEXT_003 and TEXT_004 globally,so inaddition to inacitving group, we have to clear values for respecitve group too.

Plz do the changes as follows.

LOOP AT SCREEN.

IF RAD1 = 'X'.

IF LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'G2'.

SCREEN-ACTIVE = 1.

<b>CLEAR: TEXT-001,TEXT-002.</b>

ENDIF. ENDIF. ENDIF.

ENDLOOP.

LOOP AT SCREEN.

IF RAD2 = 'X'.

IF LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'G1'.

SCREEN-ACTIVE = 1.

<b>CLEAR: TEXT-003,TEXT-004.</b>

ENDIF. ENDIF. ENDIF.

ENDLOOP.

Thanks,

Vinay

8 REPLIES 8

Former Member
0 Kudos

Hi,

Try this..Clear the text_001 and text_002..

LOOP AT SCREEN.

IF RAD1 = 'X'.

IF LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'G2'.

SCREEN-ACTIVE = 1.

<b> CLEAR: TEXT_001, TEXT_002.</b>

ENDIF.

ENDIF.

ENDIF.

ENDLOOP.

Thanks,

Naren

Former Member
0 Kudos

Hi Deepthi,

This is because you will have values avialable for TEXT_001,TEXT_002,TEXT_003 and TEXT_004 globally,so inaddition to inacitving group, we have to clear values for respecitve group too.

Plz do the changes as follows.

LOOP AT SCREEN.

IF RAD1 = 'X'.

IF LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'G2'.

SCREEN-ACTIVE = 1.

<b>CLEAR: TEXT-001,TEXT-002.</b>

ENDIF. ENDIF. ENDIF.

ENDLOOP.

LOOP AT SCREEN.

IF RAD2 = 'X'.

IF LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'G1'.

SCREEN-ACTIVE = 1.

<b>CLEAR: TEXT-003,TEXT-004.</b>

ENDIF. ENDIF. ENDIF.

ENDLOOP.

Thanks,

Vinay

0 Kudos

Hi , Narendran and Vinay,

I DID AS YOU GUYS TOLD ME . IT WORKS BUT IT LEAVES BEHIND THE BLOCK

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

selection-screen : skip 1.

selection-screen begin of line.

selection-screen comment 1(10) text_003.

parameters: p_date like zXXX-erdat modif id g2.

selection-screen comment 50(10) text_004.

parameters: p_date1 like zXXX-erdat modif id g2.

selection-screen end of line.

selection-screen : skip 1.

selection-screen : end of block blk2.

I HAVE TO DELETE THE BLK2 WITH TEXT-002.

let me know thanks

deepthi

0 Kudos

Hi Deepthi,

You need to have all parameters and select-options under one selection-screen block rather having them separately into two blocks.

If you maintain them in two blocks then you will get an additional always displayed.

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

selection-screen : skip 1.

selection-screen begin of line.

selection-screen comment 1(10) text_002.

parameters: p_MATNR like MARA-MATNR modif id g1.

selection-screen comment 50(10) text_001.

parameters: p_MATNR1 like MARA-MATNR modif id g1.

selection-screen end of line.

<b>*selection-screen : begin of block blk2 with frame title *text-003.</b>

selection-screen : skip 1.

selection-screen begin of line1.

selection-screen comment 1(10) text_003.

parameters: p_DATE TYPE SY-DATUM modif id g2.

selection-screen comment 50(10) text_004.

parameters: p_DATE1 TYPE SY-DATUM modif id g2.

selection-screen end of line1.

<b>selection-screen : end of block blk1.</b>

Thanks,

Vinay

0 Kudos

Hi Vinay,

Thanks and one last question.

i have 3 things for rad button 1 and 2 for radi button 2

but when i use rad button 2, its leaving the space that the 3 things of rad button 1 occupy. can we move the radio button 2 things up.

let me know

i am awarding poinst to all

thanks

deepthi

0 Kudos

Hi Deepthi,

The space due to selection-screen : skip 1 statement.

Comment this statement and check once.

.

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

<b>*selection-screen : skip 1.</b>

selection-screen begin of line.

selection-screen comment 1(10) text_002.

parameters: p_MATNR like MARA-MATNR modif id g1.

selection-screen comment 50(10) text_001.

parameters: p_MATNR1 like MARA-MATNR modif id g1.

selection-screen end of line.

*selection-screen : begin of block blk2 with frame title *text-003.

<b>*selection-screen : skip 1.</b>

selection-screen begin of line1.

selection-screen comment 1(10) text_003.

parameters: p_DATE TYPE SY-DATUM modif id g2.

selection-screen comment 50(10) text_004.

parameters: p_DATE1 TYPE SY-DATUM modif id g2.

selection-screen end of line1.

selection-screen : end of block blk1.

Thanks,

Vinay

0 Kudos

Hi Vinay,

I have awarded points to you all.

I have already commented the skip statement.

but since we are make the selction things of rad button 1 when we are selection radio button 2 , but the space reamins like that , its leaving space blank and then the starting the radio butt 2 selection things. IASKED WHETHER WE CAN MOVE THIS THINGS UP.

THANKS

DEEPTHI

0 Kudos

Hi Deepthi,

We can not move this things up but you can do in another way.

First of all, have radio button selection in one block and

the respective parameters for the radibuttons in the other block.

SELECTION-SCREEN BEGIN OF BLOCK MAIN WITH FRAME TEXT-001.

PARAMETERS: P_RB1 RADIOBUTTON GROUP RBG DEFAULT 'X',

P_RB2 RADIOBUTTON GROUP RBG.

SELECTION-SCREEN END OF BLOCK MAIN.

SELECTION-SCREEN BEGIN OF BLOCK SUB WITH FRAME TEXT-001.

selection-screen begin of line.

selection-screen comment 1(10) text_002.

parameters: p_MATNR like MARA-MATNR modif id g1.

selection-screen comment 50(10) text_001.

parameters: p_MATNR1 like MARA-MATNR modif id g1.

selection-screen end of line.

selection-screen begin of line1.

selection-screen comment 1(10) text_003.

parameters: p_DATE TYPE SY-DATUM modif id g2.

selection-screen comment 50(10) text_004.

parameters: p_DATE1 TYPE SY-DATUM modif id g2.

selection-screen end of line1.

SELECTION-SCREEN END OF BLOCK SUB.

Thanks,

Vinay