2007 Aug 06 10:01 AM
Hi,
I have 2 parameter options and 2 buttons - activate and deactivate. When user clicks on activate, it gets activated. If the user clicks on deactivate immediately, nothing happens. But if he clicks on the execute button and clicks on deactivate, it gets deactivated.
How to make it both activate and deactivate without clicking the execute button?
thanks and regards,
bindazme
Hi,
I have 2 parameter options and 2 buttons - activate and deactivate. When user clicks on activate, it gets activated. If the user clicks on deactivate immediately, nothing happens. But if he clicks on the execute button and clicks on deactivate, it gets deactivated.
How to make it both activate and deactivate without clicking the execute button?
thanks and regards,
bindazme
2007 Aug 06 10:03 AM
give the addition user-command to the radio button
PARAMETERS : w_par1 RADIOBUTTON GROUP aa USER-COMMAND aa.
PARAMETERS : w_par2 RADIOBUTTON GROUP aa.And do the activation deactivation in the event
AT SELECTION-SCREEN OUTPUT. " At selection screen output eventRegards
Gopi
2007 Aug 06 10:05 AM
Hi,
Give the addition user-command to those PARAMTERS.
And add AT USER-COMMAND event block to your code.
There check sy-ucomm for the user command.
Regards,
Sesh
2007 Aug 06 10:06 AM
Hi,
Where does these parameters and buttons present?. on selection-screen or any custom screen?
If they are present in selection screen by adding user command to the buttons u can handle this.
Regards,
Sankar
2007 Aug 06 10:07 AM
try this
REPORT Z_DYNAMIC_SEL_SCREEN.
tables: eban.
SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE title.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER:rad1 RADIOBUTTON GROUP rad USER-COMMAND frad1 DEFAULT 'X',
rad2 RADIOBUTTON GROUP rad .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETER: mtr AS CHECKBOX MODIF ID g3 USER-COMMAND chk1,
p_matnr TYPE eban-matnr MODIF ID g1,
sloc AS CHECKBOX MODIF ID g3 USER-COMMAND chk2.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
SELECT-OPTIONS: matnr1 FOR eban-matnr MODIF ID g2.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN PUSHBUTTON /20(10) name USER-COMMAND UCOM.
SELECTION-SCREEN END OF SCREEN 100.
name = 'FETCH'.
title = 'Test Report'.
CALL SELECTION-SCREEN '100'.
TYPE-POOLS slis.
AT SELECTION-SCREEN OUTPUT.
IF rad1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G1' OR screen-group1 = 'G4'.
screen-active = '1'.
screen-input = 0.
ELSEIF screen-group1 = 'G2'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF rad2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G1' OR screen-group1 = 'G4' OR screen-group1 = 'G3' OR screen-group1 = 'G5'.
screen-active = '0'.
ELSEIF screen-group1 = 'G2'.
screen-active = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF mtr = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G1'.
screen-input = 1 .
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF sloc = ' '.
LOOP AT SCREEN.
IF screen-group1 = 'G1'.
screen-input = 0 .
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
clear sy-ucomm.
* iflag = 1.
2007 Aug 06 10:40 AM
Hi
When I added USER-COMMAND to the parameters i get the error user-command ended unexpectedly. The parameters code uses listbox..
parameter : s_matnr like qmat-matnr as listbox visible length 20.
parameter : s_werks like qmat-werks as listbox visible length 20.
parameters: p_insty like qmat-art.
The activation and deactivation takes place using call transaction. Now i am getting the message 'No changes made' when i click on activate and deactivate continously.
regards,
bindazme
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |