2008 Jan 29 8:40 AM
hi experts,
i have one problem.there are two radiobuttons lined up with select-options field..my requirement is when i click on to one radiobutton the other select-option field becomes inactive n vice versa..one field is for plant n otther one is for customer..plz help me out.
regards,
raman
2008 Jan 29 8:43 AM
Hi
same requirmrnet
see this one
select radiobutton and click on enter button
&----
*& Report ZNNR_REPORT
*&
&----
*&
*&
&----
REPORT ZNNR_REPORT NO STANDARD PAGE HEADING MESSAGE-ID ZNNR LINE-SIZE 100 LINE-COUNT 65(4).
******DATA DECLARATIONS**********
DATA : BEGIN OF IT_PLANT OCCURS 0,
MATNR LIKE MARA-MATNR,
WERKS LIKE MARC-WERKS,
PSTAT LIKE MARC-PSTAT,
EKGRP LIKE MARC-EKGRP,
END OF IT_PLANT.
DATA : BEGIN OF IT_PONO OCCURS 0,
EBELN LIKE EKKO-EBELN,
EBELP LIKE EKPO-EBELP,
MATNR LIKE EKPO-MATNR,
WERKS LIKE EKPO-WERKS,
LGORT LIKE EKPO-LGORT,
END OF IT_PONO.
TABLES EKKO.
********END OF DATA DECLARATIONS*********
********SELECTION SCREEN DESIGN ***********
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1.
SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-004.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R1 RADIOBUTTON GROUP G1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(20) TEXT-002 FOR FIELD R1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R2 RADIOBUTTON GROUP G1.
SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
******END OF SELECTION SCREEN DESIGN****************
*********INITIALIZATION OF SELECTION SCREEN ELEMENTS.*****
INITIALIZATION.
P_WERKS = '1000'.
S_EBELN-LOW = '4500016926'.
S_EBELN-OPTION = 'EQ'.
S_EBELN-SIGN = 'I'.
APPEND S_EBELN.
CLEAR S_EBELN.
************END OF INITIALIZATION***********************
***********SCREEN MODIFICATIONS*******************
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF R1 EQ 'X' AND SCREEN-GROUP1 EQ 'S2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
IF R2 EQ 'X' AND SCREEN-GROUP1 EQ 'S1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
********END OF SCREEN MODIFICATIONS*****************
***************SCREEN VALIDATIONS *****************
at selection-screen.
SELECT SINGLE *
FROM EKKO
INTO EKKO
WHERE EBELN IN S_EBELN.
IF SY-SUBRC <> 0.
SET CURSOR FIELD 'S_EBELN-LOW'.
MESSAGE E999 WITH TEXT-005.
ENDIF.
********end of screen validation*****************
START-OF-SELECTION.
*set pf-status '100'.
IF R1 EQ 'X'.
SELECT MATNR
WERKS
PSTAT
EKGRP
FROM MARC
INTO TABLE IT_PLANT
WHERE WERKS = P_WERKS.
LOOP AT IT_PLANT.
WRITE : SY-VLINE , 2 IT_PLANT-MATNR COLOR COL_KEY,
21 SY-VLINE , 22 IT_PLANT-WERKS COLOR COL_KEY,
27 SY-VLINE ,28 IT_PLANT-PSTAT COLOR COL_NORMAL,
43 SY-VLINE ,44 IT_PLANT-EKGRP COLOR COL_NORMAL.
ENDLOOP.
ENDIF.
IF R2 EQ 'X'.
SELECT EBELN EBELP MATNR WERKS LGORT
FROM EKPO
INTO TABLE IT_PONO
WHERE EBELN IN S_EBELN.
LOOP AT IT_PONO.
WRITE : SY-VLINE , 2 IT_PONO-EBELN COLOR COL_KEY,
12 SY-VLINE , 13 IT_PONO-EBELP COLOR COL_KEY,
18 SY-VLINE , 19 IT_PONO-MATNR COLOR COL_NORMAL,
37 SY-VLINE , 38 IT_PONO-WERKS COLOR COL_NORMAL,
44 SY-VLINE , 45 IT_PONO-LGORT COLOR COL_NORMAL, 49 SY-VLINE..
ENDLOOP.
ENDIF.
TOP-OF-PAGE.
IF R1 EQ 'X'.
*ULINE AT /1(48).
WRITE : SY-VLINE ,2 'MATERIAL NUMBER',
21 SY-VLINE , 22 'PLANT',
27 SY-VLINE , 28 'STATUS',
43 SY-VLINE , 44 'GRUP', 48 SY-VLINE.
ULINE AT /1(48).
ENDIF.
IF R2 EQ 'X'.
WRITE : SY-VLINE , 2 'PO NUMBER',
12 SY-VLINE, 13 'ITEM',
18 SY-VLINE,19 'MATERIAL NUMBER',
37 SY-VLINE, 38 'PLANT',
44 SY-VLINE, 45 'GRUP',
49 SY-VLINE.
ULINE AT /1(50).
ENDIF.
END-OF-PAGE.
ULINE AT /1(50).
WRITE :/10 'PAGE NUMBER', SY-PAGNO.
2008 Jan 29 8:46 AM
hi,
declare like this:
parameters: rb1 radiobutton group g1.
rb2 radiobutton group g1.
at selection screen.
if rb1 = 'X'.
write:/
else
write:/
endif.
2008 Jan 29 8:46 AM
Check the following code :
*----
AT SELECTION-SCREEN OUTPUT
*----
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_sess = 'X'.
IF screen-group1 = 'CTU'.
screen-active = 0.
ENDIF.
ELSEIF p_ctu = 'X'.
IF screen-group1 = 'SES'.
screen-active = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
2008 Jan 29 8:48 AM
raman,
Do the the code like below.
PARAMETERS: p_file1 TYPE c RADIOBUTTON GROUP a DEFAULT 'X'
USER-COMMAND uc01,
p_date TYPE c RADIOBUTTON GROUP a.
PARAMETERS: p_pres TYPE c RADIOBUTTON GROUP b MODIF ID 001,
p_appl TYPE c RADIOBUTTON GROUP b MODIF ID 001.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 EQ '001'.
IF p_file1 EQ 'X'.
screen-active = '1'.
ELSE.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Don't forget to reward if useful...
2008 Jan 29 8:50 AM
See the following ex:
tables: mara.
SELECTION-SCREEN: BEGIN OF block b1.
PARAMETERS: r_fir RADIOBUTTON GROUP rd1 USER-COMMAND rd1 default 'X',
r_sec RADIOBUTTON GROUP rd1.
SELECT-OPTIONS: s_matnr for mara-matnr modif id MD1,
s_matkl for mara-matkl modif id MD2.
SELECTION-SCREEN: END OF block b1.
at selection-screen output.
loop at screen.
if r_fir = 'X'.
if screen-group1 = 'MD1'.
screen-active = 1.
elseif screen-group1 = 'MD2'.
screen-active = 0.
endif.
modify screen.
elseif r_sec = 'X'.
if screen-group1 = 'MD1'.
screen-active = 0.
elseif screen-group1 = 'MD2'.
screen-active = 1.
endif.
modify screen.
endif.
endloop.
2008 Jan 29 8:52 AM
hi Raman,
pls. have a look at the following sample, acc. to your requirement:
TABLES : kna1, marc.
PARAMETERS: p_1 TYPE c RADIOBUTTON GROUP a DEFAULT 'X'
USER-COMMAND uc01.
SELECT-OPTIONS : s_werks FOR marc-werks MODIF ID 001.
PARAMETERS: p_2 TYPE c RADIOBUTTON GROUP a.
SELECT-OPTIONS : s_kunnr FOR kna1-kunnr MODIF ID 002.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 EQ '001'.
IF p_1 EQ 'X'.
screen-active = '1'.
ELSE.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
IF screen-group1 EQ '002'.
IF p_2 EQ 'X'.
screen-active = '1'.
ELSE.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
hope this helps
ec