2020 Apr 28 3:33 PM
Hi all,
I have a report with several radio buttons which are disabled dynamically based on the number of records in a internal table. The first radio button is always enabled (default). Now I want to click on the first radio button and execute a action (f.e. show popup). But when I click on the radio button nothing happens. When I have two or more radiobuttons (in the same group) and I click on the second then the action is fired. Now when I click on the first the action is also fired.
Is there a possibility to fire a event when the first radio button is already selected (at first run) and you click on it (without switching)?
REPORT zstb_bijzondere_bepalingen.
DEFINE radio_but1.
PARAMETERS:&1 RADIOBUTTON GROUP gr1 USER-COMMAND click DEFAULT 'X'.
END-OF-DEFINITION.
DEFINE radio_but2.
PARAMETERS:&1 RADIOBUTTON GROUP gr1.
END-OF-DEFINITION.
radio_but1:new.
radio_but2:r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15.
radio_but2:r16,r17,r18,r19,r20,r21,r22,r23,r24,r25,r26,r27,r28,r29,r30.
DATA: rad TYPE char3.
DATA: sy_index TYPE char2.
INITIALIZATION.
count = 30.
AT SELECTION-SCREEN OUTPUT.
sy-tfill = count. "THIS IS THE NUMBER OF RADIO BUTTONS THAT WILL BE CREATED
sy_index = 1.
LOOP AT SCREEN.
CONCATENATE 'R' sy_index INTO rad.
IF screen-name = rad.
IF sy_index GT count.
screen-active = '0'.
MODIFY SCREEN.
sy_index = sy_index + 1.
CONTINUE.
ENDIF.
sy_index = sy_index + 1.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN ON RADIOBUTTON GROUP gr1.
*AT SELECTION-SCREEN.
IF sy-ucomm = 'CLICK'.
CASE 'X'.
WHEN new.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
text_question = 'do you want to continue 2'.
WHEN OTHERS.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
text_question = 'do you want to continue'.
ENDCASE.
ENDIF.
Hi all,
I have a report with several radio buttons which are disabled dynamically based on the number of records in a internal table. The first radio button is always enabled (default). Now I want to click on the first radio button and execute a action (f.e. show popup). But when I click on the radio button nothing happens. When I have two or more radiobuttons (in the same group) and I click on the second then the action is fired. Now when I click on the first the action is also fired.
Is there a possibility to fire a event when the first radio button is already selected (at first run) and you click on it (without switching)?
REPORT zstb_bijzondere_bepalingen.
DEFINE radio_but1.
PARAMETERS:&1 RADIOBUTTON GROUP gr1 USER-COMMAND click DEFAULT 'X'.
END-OF-DEFINITION.
DEFINE radio_but2.
PARAMETERS:&1 RADIOBUTTON GROUP gr1.
END-OF-DEFINITION.
radio_but1:new.
radio_but2:r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15.
radio_but2:r16,r17,r18,r19,r20,r21,r22,r23,r24,r25,r26,r27,r28,r29,r30.
DATA: rad TYPE char3.
DATA: sy_index TYPE char2.
INITIALIZATION.
count = 30.
AT SELECTION-SCREEN OUTPUT.
sy-tfill = count. "THIS IS THE NUMBER OF RADIO BUTTONS THAT WILL BE CREATED
sy_index = 1.
LOOP AT SCREEN.
CONCATENATE 'R' sy_index INTO rad.
IF screen-name = rad.
IF sy_index GT count.
screen-active = '0'.
MODIFY SCREEN.
sy_index = sy_index + 1.
CONTINUE.
ENDIF.
sy_index = sy_index + 1.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN ON RADIOBUTTON GROUP gr1.
*AT SELECTION-SCREEN.
IF sy-ucomm = 'CLICK'.
CASE 'X'.
WHEN new.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
text_question = 'do you want to continue 2'.
WHEN OTHERS.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
text_question = 'do you want to continue'.
ENDCASE.
ENDIF.
2020 Apr 28 3:44 PM
Maybe you could replace your radiobutton by parameters and simulate the radiobutton functionality. And with parameters you could set all to blank.
2020 Apr 28 6:00 PM
I don't really get your suggested solution. Do you have a example?
2020 Apr 29 6:10 AM
2020 Apr 28 4:43 PM
2020 Apr 28 5:52 PM
2020 Apr 28 10:23 PM
You could do one of two things pretty easy:
2020 May 13 4:46 PM
michael.kusters2, please follow up on your open question.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |