09-15-2008 1:42 PM
Hi ,
in my programe a part of code is :-
selection-screen : begin of block b0 with frame title text-000.
selection-screen: skip 1.
parameters: s_box1 radiobutton group g1 user-command u1 default 'X',
s_box2 radiobutton group g1.
selection-screen : end of block b0 .
....
......
selection-screen : begin of block b2 with frame title text-002.
select-options : s_vend for bseg-lifnr modif id m1 .
selection-screen : end of block b2 .
selection-screen : begin of block b3 with frame title text-003.
select-options : s_budat for bkpf-budat modif id m2 .
selection-screen : end of block b3 .
at selection-screen output.
if s_box1 = 'X'.
loop at screen.
if screen-group1 = 'M2'.
screen-active = '0'.
modify screen.
elseif screen-group1 = 'M1' .
screen-active = '1'.
modify screen.
endif.
endloop.
elseif s_box2 = 'X'.
loop at screen.
if screen-group1 = 'M2' .
screen-active = '1'.
modify screen.
elseif screen-group1 = 'M1'.
screen-active = '0'.
modify screen.
endif.
endloop.
endif.
while executing this one...
while clicking S_BOX2 from S_BOX1 , S_VEND is changing to S_BUDAT but if I click again S_BOX1 this program goes to infinite loop.
Please help me to correct this problem.
Thankx in adv.
Biswajit
N.B:- This is a test code. no coding convention is followed.
09-15-2008 1:47 PM
I just copied your code and Tested it is working fine with out any problem.
REPORT zscreen_test_.
TABLES:bseg,bkpf.
SELECTION-SCREEN : BEGIN OF BLOCK b0 WITH FRAME TITLE text-000.
SELECTION-SCREEN: SKIP 1.
PARAMETERS: s_box1 RADIOBUTTON GROUP g1 USER-COMMAND u1 DEFAULT 'X',
s_box2 RADIOBUTTON GROUP g1.
SELECTION-SCREEN : END OF BLOCK b0 .
SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECT-OPTIONS : s_vend FOR bseg-lifnr MODIF ID m1 .
SELECTION-SCREEN : END OF BLOCK b2 .
SELECTION-SCREEN : BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
SELECT-OPTIONS : s_budat FOR bkpf-budat MODIF ID m2 .
SELECTION-SCREEN : END OF BLOCK b3 .
AT SELECTION-SCREEN OUTPUT.
IF s_box1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'M2'.
screen-active = '0'.
MODIFY SCREEN.
ELSEIF screen-group1 = 'M1' .
screen-active = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF s_box2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'M2' .
screen-active = '1'.
MODIFY SCREEN.
ELSEIF screen-group1 = 'M1'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
"If you have any code next to this place that under appropriate
"events.
09-15-2008 1:47 PM
I just copied your code and Tested it is working fine with out any problem.
REPORT zscreen_test_.
TABLES:bseg,bkpf.
SELECTION-SCREEN : BEGIN OF BLOCK b0 WITH FRAME TITLE text-000.
SELECTION-SCREEN: SKIP 1.
PARAMETERS: s_box1 RADIOBUTTON GROUP g1 USER-COMMAND u1 DEFAULT 'X',
s_box2 RADIOBUTTON GROUP g1.
SELECTION-SCREEN : END OF BLOCK b0 .
SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECT-OPTIONS : s_vend FOR bseg-lifnr MODIF ID m1 .
SELECTION-SCREEN : END OF BLOCK b2 .
SELECTION-SCREEN : BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
SELECT-OPTIONS : s_budat FOR bkpf-budat MODIF ID m2 .
SELECTION-SCREEN : END OF BLOCK b3 .
AT SELECTION-SCREEN OUTPUT.
IF s_box1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'M2'.
screen-active = '0'.
MODIFY SCREEN.
ELSEIF screen-group1 = 'M1' .
screen-active = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF s_box2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'M2' .
screen-active = '1'.
MODIFY SCREEN.
ELSEIF screen-group1 = 'M1'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
"If you have any code next to this place that under appropriate
"events.
09-16-2008 9:33 AM
I take the liberty now of closing this thread for you because it is being watched.... (not by "Big Brother", but rather more like a "mob"...
@ Biswajit:
-Please do not cross-post ( see [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] ).
- Please follow up on all your questions (one post only per question please!).
- Your other post went down in a flame of "abuse reports"...
Cheers,
Julius