‎2006 Nov 24 10:46 AM
Hi all,
I am having two radiobuttons in selection-screen, if i check one radiobutton , another selectio-screen has to display in that standard selection-screen only.
send me the code.
BALU.
‎2006 Nov 24 12:00 PM
just check this
PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
PARAMETERS : R2 RADIOBUTTON GROUP RG .
*-------------------------------------------
selection-screen begin of block b1 with frame.
parameters : a(10) type c modif id abc.
parameters : b(10) type c modif id abc.
selection-screen end of block b1.
selection-screen begin of block b2 with frame.
parameters : c(40) type c modif id def.
parameters : d(20) type c modif id def.
selection-screen end of block b2.
*-------------------------------------------
at selection-screen output.
IF R1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-name = '%B%_F006' or
screen-group1 = 'DEF'.
screen-active = '0'. "check this
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF R2 = 'X'.
LOOP AT SCREEN.
IF SCREEN-name = '%B%_F002' or
screen-group1 = 'ABC'.
screen-active = '1'. "check this
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.regards,
vijay
‎2006 Nov 24 10:48 AM
hi,
chk this sample.
report abc.
*-------------------------------------------
PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
PARAMETERS : R2 RADIOBUTTON GROUP RG .
*-------------------------------------------
selection-screen begin of block b1 with frame.
parameters : a(10) type c modif id abc.
parameters : b(10) type c modif id abc.
selection-screen end of block b1.
selection-screen begin of block b2 with frame.
parameters : c(20) type c modif id def.
parameters : d(20) type c modif id def.
selection-screen end of block b2.
*-------------------------------------------
at selection-screen output.
IF R1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'DEF'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF R2 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.rgds
Anver
‎2006 Nov 24 10:59 AM
Hi anversha,
thnx for ur code,
but i dont want that second block when i executed the program,it has to come when i clicked on the second radio button.
plz send me the code for that.
BALU.
‎2006 Nov 24 11:04 AM
Hi you can modify the above code like this :
use <b>screen-ACTIVE = '0'</b> instead of <b>screen-input = '0'</b>
This will hide the second screen.
‎2006 Nov 24 11:08 AM
H iravi thnk u for the code,
But the first block is going, it has to be there only.
BALU.
‎2006 Nov 24 11:01 AM
Hi Bala,
chk this code and select 2nd radio button , the same selection-screen will open in popup , u can modify the same to ur requirement
REPORT ychatest. .
PARAMETERS : r1 RADIOBUTTON GROUP rad USER-COMMAND new,
r2 RADIOBUTTON GROUP rad.
AT SELECTION-SCREEN.
IF r2 = 'X'.
CALL SCREEN 1000 STARTING AT 50 50 ENDING AT 100 100.
ENDIF.
‎2006 Nov 24 11:05 AM
No i dont want in popup, i want the screen in that standard screen only.
Plz Can any body help me.
BALU.
‎2006 Nov 24 11:08 AM
then try this...
REPORT ychatest. .
PARAMETERS : r1 RADIOBUTTON GROUP rad USER-COMMAND new,
r2 RADIOBUTTON GROUP rad.
AT SELECTION-SCREEN.
IF r2 = 'X'.
CALL SCREEN 100 .
ENDIF.
where 100 is ur another screen number
‎2006 Nov 24 11:09 AM
In anversha's code just do the following changes :
use <b>screen-ACTIVE = '0'</b> instead of <b>screen-input = '0'</b>
This will hide the second screen.
‎2006 Nov 24 11:12 AM
hi sekhar,
it will come, but the clicked radio buttons block will not come, so when i clcked on the second radio button, another screen has to come into that standard selection-screen and the clicked radiobutton group has to be there only for clicking.
BALU.
‎2006 Nov 24 11:42 AM
check this , small modification to Anvershas code
report abc.
*-------------------------------------------
PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
PARAMETERS : R2 RADIOBUTTON GROUP RG .
*-------------------------------------------
selection-screen begin of block b1 with frame.
parameters : a(10) type c modif id abc.
parameters : b(10) type c modif id abc.
selection-screen end of block b1.
selection-screen begin of block b2 with frame.
parameters : c(40) type c modif id def.
parameters : d(20) type c modif id def.
selection-screen end of block b2.
*-------------------------------------------
at selection-screen output.
IF R1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-name = '%B%_F006' or
screen-group1 = 'DEF'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF R2 = 'X'.
LOOP AT SCREEN.
IF SCREEN-name = '%B%_F002' or
screen-group1 = 'ABC'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
‎2006 Nov 24 11:49 AM
Hi sekhar really thanku for ur coding,
But again the first block is overwriting with second block, i dont want like that, the second block has to come below the first block immediately.
BALU.
‎2006 Nov 24 11:54 AM
Hi,
Try this.
PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
PARAMETERS : R2 RADIOBUTTON GROUP RG .
*----
selection-screen begin of block b1 with frame.
parameters : a(10) type c modif id abc.
parameters : b(10) type c modif id abc.
selection-screen end of block b1.
selection-screen begin of block b2 with frame.
parameters : c(40) type c modif id def.
parameters : d(20) type c modif id def.
selection-screen end of block b2.
*----
<b>INitialization.</b>
IF R1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-name = '%B%_F006' or
screen-group1 = 'DEF'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
<b>at selection-screen output.</b>
IF R2 = 'X'.
LOOP AT SCREEN.
IF SCREEN-name = '%B%_F002' or
screen-group1 = 'ABC'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
‎2006 Nov 24 12:02 PM
i am just changing anver's code it works
have look,
*----
PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
PARAMETERS : R2 RADIOBUTTON GROUP RG .
*----
selection-screen begin of block b1 with frame.
parameters : a(10) type c modif id abc.
parameters : b(10) type c modif id abc.
selection-screen end of block b1.
selection-screen begin of block b2 with frame.
parameters : c(40) type c modif id def.
parameters : d(20) type c modif id def.
selection-screen end of block b2.
*----
at selection-screen output.
IF R1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-name = '%B%_F006' or
screen-group1 = 'DEF'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF R2 = 'X'.
LOOP AT SCREEN.
IF SCREEN-name = '%B%_F002' or
screen-group1 = 'ABC'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
santhosh
Message was edited by:
Kaluvala Santhosh
‎2006 Nov 24 12:07 PM
hope this should solve ur problem
report abc.
*-------------------------------------------
PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
PARAMETERS : R2 RADIOBUTTON GROUP RG .
*-------------------------------------------
selection-screen begin of block b1 with frame.
parameters : a(10) type c modif id abc.
parameters : b(10) type c modif id abc.
selection-screen end of block b1.
selection-screen begin of block b2 with frame.
parameters : c(40) type c modif id def.
parameters : d(20) type c modif id def.
selection-screen end of block b2.
*-------------------------------------------
at selection-screen output.
IF R1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-name = '%B%_F006' or
screen-group1 = 'DEF'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
‎2006 Nov 24 12:00 PM
just check this
PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
PARAMETERS : R2 RADIOBUTTON GROUP RG .
*-------------------------------------------
selection-screen begin of block b1 with frame.
parameters : a(10) type c modif id abc.
parameters : b(10) type c modif id abc.
selection-screen end of block b1.
selection-screen begin of block b2 with frame.
parameters : c(40) type c modif id def.
parameters : d(20) type c modif id def.
selection-screen end of block b2.
*-------------------------------------------
at selection-screen output.
IF R1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-name = '%B%_F006' or
screen-group1 = 'DEF'.
screen-active = '0'. "check this
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF R2 = 'X'.
LOOP AT SCREEN.
IF SCREEN-name = '%B%_F002' or
screen-group1 = 'ABC'.
screen-active = '1'. "check this
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.regards,
vijay
‎2006 Nov 24 12:07 PM
Hi vijay,
Thnx for ur code, it solved my problem, really am very thank full to u,
Bye.
BALU.
‎2006 Nov 24 12:03 PM
Hi Bala
If I have understood your requirement right, u want two different selection screens to appear on the same screen. their appearance is determined by a radio button. if this is the case then there is definitely one way of doing it.
Unfortunately code for this method cant be given coz its a small procedure by itself. so i am listing the steps involved in doing this -
<b>Note:</b> this requires some fundamental knowledge on Module pool
1) Create a normal screen , say screen 100.
2) Add three objects in the screen
- Two Radio buttons with same group , say R1 and R2
- A subscreen container which fills rest of the screen
3) Now define two selection screens(as per your requirement). this can be done using the following syntax -
"SELECTION-SCREEN BEGIN OF SCREEN scr AS SUBSCREEN."
in the above syntax u can give ur prefered screen numbers in place of 'scr'
4) Now you have two selection screens (say, with numbers 200 & 300)
5) In PBO and PAI of screen 100, write code to call the selection screen(s) to fill the sub screen area that you have added using screen painter. the code will be some thing similar to -
"CALL SUBSCREEN b INCLUDING prog dynnr "
Here u can dynamically feed the value of 'b' with either 200 or 300 as per your radio button selection.
By this method, u can alternate between selection screen on some user action.
Technically speaking, we are embedding a selection screen as subscreen inside a normal screen.
Hope this helps u in ur requirement.
Regards
Mukundhan