‎2011 Apr 28 3:42 PM
Hi,
I have a checkbox and parameter field and by default checkbox is unchecked.when I check the checkbox and press f4 on the field within the at selection-screen on value request event i want to capture the checkbox value .Is it possible because even though the checkbox is checked it is coming as initial and I am not adding any user-command to checkbox
Thanks
Bala Duvvuri
‎2011 Apr 28 4:02 PM
nevermind.
I think you have to use user command .
Edited by: Sampath Kumar on Apr 28, 2011 9:02 AM
Edited by: Sampath Kumar on Apr 28, 2011 9:04 AM
‎2011 Apr 28 4:13 PM
define your checkbox as follow:
parameters: p_check as CHECKBOX USER-COMMAND abcd.
and you're ok
‎2011 Apr 28 4:20 PM
Hi Bala,
If you don't want to use user-command syntax and still want to capture whether check box value, make use of screen-request
value to determine whether check box is checked or not. Try this code and see for yourself as how screen-request is being set to '1' when checked and to '0' when unchecked.
REPORT y_vm_test.
PARAMETERS: p_check AS CHECKBOX,
p_user TYPE char10.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_user.
PERFORM get_user_data.
&----
*& Form get_user_data
&----
text
----
--> p1 text
<-- p2 text
----
FORM get_user_data .
LOOP AT SCREEN.
BREAK-POINT.
Check SCREEN-REQUEST value here when screen-name = 'p_check'
ENDLOOP.
ENDFORM. " get_user_data
‎2011 Apr 29 10:43 AM
Vivek,
screen-request is always showing 1 if checkbox is checked or unchecked.
Thanks
Bala Duvvuri
‎2011 Apr 29 11:30 AM
Hi,
Please share the code used for declaration and for checking.
This would be helpful for us to understand.
Regards,
Meera
‎2011 May 01 2:01 PM
Meera,
this is my code
PARAMETERS: p_check1 AS CHECKBOX.
AT SELECTION-SCREEN ON VALUE REQUEST FOR p_file.
if p_local eq 'X'.
else.
endif.
Thanks
Bala Duvvuri
‎2011 May 02 11:27 AM
Hi Bala,
PARAMETERS: p_check1 AS CHECKBOX.
AT SELECTION-SCREEN ON VALUE REQUEST FOR p_file.
if p_local eq 'X' needs to be changed to p_check1.
else.
endif.
You have declared p_check1 as the parameter but you are checking p_local variable.
Please change the check against p_check1.
Regards,
Meera
‎2011 May 02 11:51 AM
No more a requirement and I dont think we can capture checkbox value at selection-screen on value request without using user command
Thanks
Bala Duvvuri
‎2011 May 02 12:04 PM
Hi Bala,
Please check whether p_file value request getting triggered before the check box selection through debugging.
If it is getting triggered before check box selection, you cant able to capture in on value request.
Regards,
Meera
‎2011 Apr 30 1:42 PM
Hi Bala ,
You can do this in the following ways:
PARAMETERS: p_check1 AS CHECKBOX.( By default the check box is not checked).
Now if you from the program you call the selection screen , you can collect the value of p_check1 in any other variable say check1 and then check whether
if check1 = 'X'
/*Write your code here
endif.
For the value request you have to use AT SELECTION-SCREEN ON VALUE REQUEST FOR...
Regards
Kavindra