‎2009 May 29 7:39 AM
Hi All
There are 3 blocks on Sel-screen.
Before that I want 1 more screen which has 3 RB's & depanding on RB's these blocks will be displayed.
I have to display all 3blocks depanding on RB but some fields are diff in diff blocks.
Any sample code for that?
Regards.
‎2009 May 29 7:52 AM
hI
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE text-015.
Selection-screen Begin of line.
PARAMETERS: P_DSPF Radiobutton Group R1 USER-COMMAND Action.
selection-screen comment 4(15) text-013 for field P_dspf .
PARAMETERS: P_Edspf Radiobutton Group R1 .
selection-screen comment 24(15) text-014 for field P_EDSPF .
PARAMETERS: T_Run Radiobutton Group R1 .
selection-screen comment 41(25) text-012 for field T_run .
SELECTION-screen end of line.
SELECTION-SCREEN END OF BLOCK B3 .
*Block to select the file for display or extracted
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
selection-screen Begin of line.
PARAMETER: Master TYPE C Radiobutton Group ABC .
"user-commamd filetype.
selection-screen comment 4(15) text-002 for field master .
PARAMETER: Newhire TYPE C Radiobutton Group ABC.
selection-screen comment 24(12) text-003 for field Newhire .
PARAMETER: Term TYPE C Radiobutton Group ABC.
selection-screen comment 43(15) text-007 for field Term .
PARAMETER: Rehire TYPE C Radiobutton Group ABC.
selection-screen comment 66(15) text-004 for field Rehire .
selection-screen end of line.
AT SELECTION -SCREEN OUTPUT .
PERFORM MODIFY_SCREEN .
PLEASE FIND THE FORM BELOW FOR MODIFY_SCREEN.
FORM MODIFY_SCREEN .
Loop at Screen .
IF T_run = ' ' and Screen-NAME = 'P_PATH' .
SCREEN-input = 0 .
Modify Screen .
ENDIF.
if screen-name = 'PNPTIMR1'
or screen-name = 'PNPTIMR2'
or screen-name = 'PNPTIMR3'
or screen-name = 'PNPTIMR4'
or screen-name = 'PNPTIMR5'.
screen-active = 0.
modify screen.
endif.
ENDLOOP.
ENDFORM.
‎2009 May 29 7:43 AM
assign user command to ur RBs.
give modif id to those fields in the other blocks.
in at selection screen output event.
check the RB values
according to that activate or deactivate the checking the modif ids.
‎2009 May 29 7:44 AM
Dear Nikhil,
Use Loop at screen on At selection-screen output event.
There control your blocks by putting condition.
Feel free to ask if any doudbts..
Regards,
Vijay
‎2009 May 29 7:50 AM
Thanks for replies.
Actually I know there is use of User-command & modif-id's but bit confused in using them in this condition.
Regards.
‎2009 May 29 7:48 AM
Hi
Try with Loop at acreen.
Sample given below.
LOOP AT SCREEN.
CHECK screen-group1 = 'CHG'.
screen-required = '0'.
screen-output = '1'.
screen-input = '0'.
MODIFY SCREEN.
ENDLOOP.
Regards
Ramesh Sundaram
‎2009 May 29 7:52 AM
hI
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE text-015.
Selection-screen Begin of line.
PARAMETERS: P_DSPF Radiobutton Group R1 USER-COMMAND Action.
selection-screen comment 4(15) text-013 for field P_dspf .
PARAMETERS: P_Edspf Radiobutton Group R1 .
selection-screen comment 24(15) text-014 for field P_EDSPF .
PARAMETERS: T_Run Radiobutton Group R1 .
selection-screen comment 41(25) text-012 for field T_run .
SELECTION-screen end of line.
SELECTION-SCREEN END OF BLOCK B3 .
*Block to select the file for display or extracted
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
selection-screen Begin of line.
PARAMETER: Master TYPE C Radiobutton Group ABC .
"user-commamd filetype.
selection-screen comment 4(15) text-002 for field master .
PARAMETER: Newhire TYPE C Radiobutton Group ABC.
selection-screen comment 24(12) text-003 for field Newhire .
PARAMETER: Term TYPE C Radiobutton Group ABC.
selection-screen comment 43(15) text-007 for field Term .
PARAMETER: Rehire TYPE C Radiobutton Group ABC.
selection-screen comment 66(15) text-004 for field Rehire .
selection-screen end of line.
AT SELECTION -SCREEN OUTPUT .
PERFORM MODIFY_SCREEN .
PLEASE FIND THE FORM BELOW FOR MODIFY_SCREEN.
FORM MODIFY_SCREEN .
Loop at Screen .
IF T_run = ' ' and Screen-NAME = 'P_PATH' .
SCREEN-input = 0 .
Modify Screen .
ENDIF.
if screen-name = 'PNPTIMR1'
or screen-name = 'PNPTIMR2'
or screen-name = 'PNPTIMR3'
or screen-name = 'PNPTIMR4'
or screen-name = 'PNPTIMR5'.
screen-active = 0.
modify screen.
endif.
ENDLOOP.
ENDFORM.
‎2009 May 29 8:02 AM
selection-SCREEN begin of block b1 with frame.
PARAMETERS : rd1 RADIOBUTTON GROUP r DEFAULT 'X' USER-COMMAND u1 MODIF ID m,
rd2 RADIOBUTTON GROUP r MODIF ID m,
rd3 RADIOBUTTON GROUP r MODIF ID m.
SELECTION-SCREEN end of block b1.
selection-SCREEN begin of block b2 with frame.
PARAMETERS p1 type i MODIF ID m1.
SELECTION-SCREEN end of block b2.
selection-SCREEN begin of block b3 with frame.
PARAMETERS p2 type i MODIF ID m2.
SELECTION-SCREEN end of block b3.
selection-SCREEN begin of block b4 with frame.
PARAMETERS p3 type i MODIF ID m3.
SELECTION-SCREEN end of block b4.
at SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
if rd1 = 'X'.
if screen-group1 = 'M1' or screen-group1 = 'M'.
screen-active = 1.
else.
screen-active = 0.
endif.
elseif rd2 = 'X'.
if screen-group1 = 'M2' or screen-group1 = 'M'.
screen-active = 1.
else.
screen-active = 0.
endif.
elseif rd3 = 'X'.
if screen-group1 = 'M3' or screen-group1 = 'M'.
screen-active = 1.
else.
screen-active = 0.
endif.
endif.
MODIFY SCREEN.
ENDLOOP.
‎2009 May 29 8:04 AM
Hi,
when you are declaring the radiobutton you have to declare like this:
PARAMETERS: R_but Group R1 USER-COMMAND UR
At selection-screen on output.
loop at screen
give the conditions
modify screen.
endscreen.
regards,
Munibabu.K
‎2009 May 29 9:06 AM
hi,
try this
PARAMETERS : r1 RADIOBUTTON GROUP rg1 MODIF ID rad,
r2 RADIOBUTTON GROUP rg1 MODIF ID rad,
r3 RADIOBUTTON GROUP rg1 MODIF ID rad.
SELECT-OPTIONS: p_matnr FOR mara-matnr MODIF ID mat,
p_werks FOR marc-werks MODIF ID plt,
p_lifnr FOR lfa1-lifnr MODIF ID ven.
AT SELECTION-SCREEN OUTPUT.
IF r1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 <> 'MAT' AND screen-group1 <> 'RAD'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF r2 = 'X'.
LOOP AT SCREEN .
IF screen-group1 <> 'PLT' AND screen-group1 <> 'RAD'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF r3 = 'X'.
LOOP AT SCREEN.
IF screen-group1 <> 'VEN'AND screen-group1 <> 'RAD'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
hope this solves your issue.
‎2009 May 29 11:11 AM
Hi Nikhil,
Try with the below code.
TABLES pa0001.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
PARAMETERS: p_rad1 RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND rusr,
p_rad2 RADIOBUTTON GROUP rad1,
p_rad3 RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK blk1.
SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME.
PARAMETERS: p_pernr TYPE pa0001-pernr MODIF ID abc.
SELECTION-SCREEN END OF BLOCK blk2.
SELECTION-SCREEN BEGIN OF BLOCK blk3 WITH FRAME.
PARAMETERS: p_werks TYPE pa0001-werks MODIF ID def.
SELECTION-SCREEN END OF BLOCK blk3.
SELECTION-SCREEN BEGIN OF BLOCK blk4 WITH FRAME.
PARAMETERS: p_btrtl TYPE pa0001-btrtl MODIF ID ghi.
SELECTION-SCREEN END OF BLOCK blk4.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_rad1 = 'X'.
IF screen-group1 = 'ABC'.
screen-active = 1.
ENDIF.
IF screen-group1 = 'DEF' OR
screen-group1 = 'GHI'.
screen-active = 0.
ENDIF.
ELSEIF p_rad2 = 'X'.
IF screen-group1 = 'DEF'.
screen-active = 1.
ENDIF.
IF screen-group1 = 'ABC' OR
screen-group1 = 'GHI'.
screen-active = 0.
ENDIF.
ELSEIF p_rad3 = 'X'.
IF screen-group1 = 'GHI'.
screen-active = 1.
ENDIF.
IF screen-group1 = 'ABC' OR
screen-group1 = 'DEF'.
screen-active = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Regards,
Kumar Bandanadham.
‎2009 May 30 5:35 AM
Thanks all for replies
One thing more is it possible that when I click 1 of 3 RB's, all of 3 will be hidden.
(Means it looks like that next screen came).
Regards.