2006 Jul 05 1:52 PM
Hi all,
I have a selection screen with 2 radio buttons & 2 text boxes. If I click the first radio button, the 2nd text box shud be in display mode & if I click the 2nd radio button, the 1st text box shud be in display mode.
How to do it?
Thanks in advance.
SELECTION-SCREEN BEGIN OF BLOCK MODE WITH FRAME TITLE title.
parameters : s_pr radiobutton group g1,
s_po radiobutton group g1.
select-options : s_prnum for eban-banfn.
select-options : s_ponum for eban-ebeln.
SELECTION-SCREEN END OF BLOCK MODE.
Pls look into the code above.
G.Vijay
2006 Jul 05 1:57 PM
Hi vijaykumar,
1. simple.
2. your code only,
just copy paste.
3. It will work as u require.
4.
report abc.
TABLES : EBAN.
SELECTION-SCREEN BEGIN OF BLOCK MODE WITH FRAME TITLE title.
parameters : s_pr radiobutton group g1 <b>USER-COMMAND RAD DEFAULT 'X'</b>,
s_po radiobutton group g1.
select-options : s_prnum for eban-banfn <b>MODIF ID M1</b>.
select-options : s_ponum for eban-ebeln <b>MODIF ID M2</b>.
SELECTION-SCREEN END OF BLOCK MODE.
*----
<b>at selection-screen output.</b>
LOOP AT SCREEN.
IF S_PR = 'X' AND SCREEN-GROUP1 = 'M2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
IF S_PO = 'X' AND SCREEN-GROUP1 = 'M1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
regards,
amit m.
Hi all,
I have a selection screen with 2 radio buttons & 2 text boxes. If I click the first radio button, the 2nd text box shud be in display mode & if I click the 2nd radio button, the 1st text box shud be in display mode.
How to do it?
Thanks in advance.
SELECTION-SCREEN BEGIN OF BLOCK MODE WITH FRAME TITLE title.
parameters : s_pr radiobutton group g1,
s_po radiobutton group g1.
select-options : s_prnum for eban-banfn.
select-options : s_ponum for eban-ebeln.
SELECTION-SCREEN END OF BLOCK MODE.
Pls look into the code above.
G.Vijay
2006 Jul 05 1:57 PM
Hi vijaykumar,
1. simple.
2. your code only,
just copy paste.
3. It will work as u require.
4.
report abc.
TABLES : EBAN.
SELECTION-SCREEN BEGIN OF BLOCK MODE WITH FRAME TITLE title.
parameters : s_pr radiobutton group g1 <b>USER-COMMAND RAD DEFAULT 'X'</b>,
s_po radiobutton group g1.
select-options : s_prnum for eban-banfn <b>MODIF ID M1</b>.
select-options : s_ponum for eban-ebeln <b>MODIF ID M2</b>.
SELECTION-SCREEN END OF BLOCK MODE.
*----
<b>at selection-screen output.</b>
LOOP AT SCREEN.
IF S_PR = 'X' AND SCREEN-GROUP1 = 'M2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
IF S_PO = 'X' AND SCREEN-GROUP1 = 'M1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
regards,
amit m.
2006 Jul 05 1:57 PM
Hi,
try this code. This works.
TABLES: mara,ekko.
SELECTION-SCREEN begin of line .
PARAMETERS: rad1 RADIOBUTTON GROUP grp1.
SELECT-OPTIONS: date FOR mara-matnr MODIF ID mo1.
SELECTION-SCREEN end of line .
SELECTION-SCREEN begin of line .
PARAMETERS: rad2 RADIOBUTTON GROUP grp1.
SELECT-OPTIONS: date1 FOR mara-matnr MODIF ID mo1.
SELECTION-SCREEN end of line .
AT SELECTION-SCREEN OUTPUT.
IF rad2 = 'X'.
LOOP
AT SCREEN. IF screen-name = 'DATE-LOW' OR screen-name =
'DATE-HIGH'. screen-input = 0. MODIFY SCREEN. ENDIF.
ENDLOOP. ENDIF.
IF rad1 = 'X'.
LOOP
AT SCREEN. IF screen-name = 'DATE1-LOW' OR screen-name =
'DATE1-HIGH'. screen-input = 0. MODIFY SCREEN. ENDIF.
ENDLOOP. ENDIF.
mark if you find this helpful.
Regards,
Sumit.
2006 Jul 05 1:59 PM
You need to attach a user command to the radio button and a MODIF ID to the texts that you want to change.
See these threads
For sample code see here
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba70535c111d1829f0000e829fbfe/frameset.htm
Regards,
Ravi
Note :Please mark all the helpful answers
2006 Jul 05 2:02 PM
hi vijay,
at selection-screen.
if s_pr = 'X'.
screen-fieldname = 's_ponum'.
screen-input = 1.
elseif s_po = 'X'.
screen-fieldname = 's_prnum'.
screen-input = 1.
endif.
modify screen.
endloop.
Message was edited by: Priya
2006 Jul 05 2:07 PM
This should solve your problem
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : rb_pr RADIOBUTTON GROUP g1 DEFAULT 'X'
USER-COMMAND ucomm, "For Presentation
rb_pr RADIOBUTTON GROUP g1. "For Application
SELECT-OPTIONS: s_prnum for eban-banfn MODIF ID rb1, "Input File
s_ponum for eban-ebeln MODIF ID rb2. "Input File
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF rb_pc = 'X' AND screen-group1 = 'RB2'.
screen-input = '0'.
MODIFY SCREEN.
ELSEIF rb_srv = 'X' AND screen-group1 = 'RB1'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
2006 Jul 05 2:09 PM
Copy paste this code and change the parameters to suit ur code requiremenst.
REPORT z_52341_test.
tables: mara, marc.
SELECTION-SCREEN BEGIN OF BLOCK MODE WITH FRAME TITLE title.
parameters : s_pr radiobutton group g1 default 'X' user-command ck modif id g1 ,
s_po radiobutton group g1 modif id g1.
select-options : s_prnum for mara-matnr.
select-options : s_ponum for marc-matnr.
SELECTION-SCREEN END OF BLOCK MODE.
at selection-screen output.
loop at screen.
if screen-name = 'S_PRNUM-HIGH' or screen-name = 'S_PRNUM-LOW'.
if s_po = 'X'.
screen-input = 0.
screen-output = 1.
modify screen.
else.
screen-input = 1.
screen-output = 0.
modify screen.
endif.
endif.
if screen-name = 'S_PONUM-HIGH' or screen-name = 'S_PONUM-LOW'.
if s_pr = 'X'.
screen-input = 0.
screen-output = 1.
modify screen.
else.
screen-input = 1.
screen-output = 0.
modify screen.
endif.
endif.
endloop.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |