‎2007 Aug 06 6:22 PM
Hi,
I have declared the parameters as
parameters: p_insty like qmat-art user-command chg.
but gives me an error qmat-art does not have length 1. How to specify size along with user-command
Regards,
bindazme
‎2007 Aug 06 6:25 PM
hi,
you cannot mention " user-command" along with parameters(can use Modif id).
But u can use the "user-command " along with radio-button.
Revert back if any issues,
Reward if helpful.
Regards,
Naveen
‎2007 Aug 06 6:26 PM
Hi ,
Why you are using user-command with a parameter.
Whats your exact requirement.
Using usere command with a parameter makes no sence.
It is used mainly with radiobuttons, checkbokes ets
Regards,
Vivek
‎2007 Aug 06 6:41 PM
Hi,
I have 2 parameter options and 2 buttons - activate and deactivate. I was told to use user-command to to make it both activate and deactivate without clicking the execute button on top left. The buttons work. But every time i have to click on the execute button.
Regards,
bindazme
‎2007 Aug 06 6:59 PM
Do you mean something like this?
report zrich_0001.
parameters: p_fld1 radiobutton group grp1 user-command chg default 'X',
p_fld2 radiobutton group grp1.
selection-screen pushbutton /1(20) pb1 user-command act.
selection-screen pushbutton /1(20) pb2 user-command dea.
at selection-screen output.
pb1 = 'Activate'.
pb2 = 'Deactivate'.
loop at screen.
if screen-name = 'PB1'
and p_fld2 = 'X'.
screen-active = '0'.
endif.
if screen-name = 'PB2'
and p_fld1 = 'X'.
screen-active = '0'.
endif.
modify screen.
endloop.
Regards,
Rich Heilman
‎2007 Aug 06 7:01 PM
Or making inactive?
report zrich_0001.
parameters: p_fld1 radiobutton group grp1 user-command chg default 'X',
p_fld2 radiobutton group grp1.
selection-screen pushbutton /1(20) pb1 user-command act.
selection-screen pushbutton /1(20) pb2 user-command dea.
at selection-screen output.
pb1 = 'Activate'.
pb2 = 'Deactivate'.
loop at screen.
if screen-name = 'PB1'
and p_fld2 = 'X'.
screen-input = '0'. "<-- Not read for input
endif.
if screen-name = 'PB2'
and p_fld1 = 'X'.
screen-input = '0'. "<-- Not read for input
endif.
modify screen.
endloop.
Regards,
Rich Heilman
‎2007 Aug 06 7:07 PM
I think I have misunderstood your question. Try this sample coding. Here I am forcing the "Execute" of the selection-screen based on the user clicking the buttons on the screen.
report zrich_0001.
tables: sscrfields.
selection-screen pushbutton /1(20) pb1 user-command act.
selection-screen pushbutton /1(20) pb2 user-command dea.
at selection-screen output.
pb1 = 'Activate'.
pb2 = 'Deactivate'.
at selection-screen.
case sy-ucomm.
when 'ACT' or 'DEA'.
sscrfields-ucomm = 'ONLI'.
endcase.
start-of-selection.
write:/ 'START-of-SELECTION has been fired'.
Regards,
Rich Heilman
‎2007 Aug 06 6:31 PM
Hi,
User command will only work with parameter as checkbox
parameters: p_insty type c as checkbox user-command CHG.
aRs