08-24-2007 7:10 AM
Hi all,
I want to have the following functionality,
First i want to display only 5 check boxes .
Suppose i click on one checkbox it will show me three parameters.
suppose i click on second it will show me the respective parameters.
I want to handle event on the checkbox.
Thank you.
08-24-2007 7:23 AM
Hi..
Check the Following program using Radiobuttons and Accordingly convert the Same using Checkboxes.
REPORT ZSEL_RADIO1 .
TABLES SSCRFIELDS .
DATA : VCOMM TYPE SSCRFIELDS-UCOMM.
PARAMETERS: P_CH1 AS CHECKBOX USER-COMMAND CB1.
PARAMETERS: P_CH2 AS CHECKBOX USER-COMMAND CB2.
PARAMETERS: P_FIELD1 TYPE I MODIF ID ABC.
PARAMETERS: P_FIELD2 TYPE I MODIF ID ABC.
AT SELECTION-SCREEN.
VCOMM = SSCRFIELDS-UCOMM.
AT SELECTION-SCREEN OUTPUT.
CASE VCOMM.
WHEN 'CB1'.
IF CH1 = ' '.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
SCREEN-INVISIBLE = 0.
SCREEN-ACTIVE = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF CH1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
SCREEN-INVISIBLE = 0.
SCREEN-ACTIVE = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
WHEN 'CB2'.
ENDCASE.
<b>Reward if Helpful</b>
08-24-2007 7:14 AM
Hi,
to see the functionality of the check box event
goto tcode abapdocu.
select ABAP User Dialogs ->Screens ->Processing Screens ->Checkboxes and radio buttons .
<b>reward if helpful</b>
rgds,
bharat.
08-24-2007 7:14 AM
Do you mean if we have 5 parameter and you click one one check box,those respective parameters shud get enabled and othrs disabled?
08-24-2007 7:16 AM
08-24-2007 7:23 AM
Hi Pathak
use at selection-screen output event.
at selection-screen output.
if c1 = 'X'.
LOOP AT SCREEN.
CASE SCREEN-NAME.
WHEN 'P1'.
SCREEN-ACTIVE = '0'. 'HERE I AM DISABLING FIRST PARAMETER (P1 IS A PARAMETER NAME)
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
if c2 = 'X'.
LOOP AT SCREEN.
CASE SCREEN-NAME.
WHEN 'P2'.
SCREEN-ACTIVE = '0'.'HERE I AM DISABLING SECOND PARAMETER
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
reward points to all helpful answers
kiran.M
08-24-2007 7:15 AM
This is not possible with checkboxes alone.
You have to use button to get action of the related checkbox. For each checkbox, provide one button.And at the event of button, you can write the required code.
<i><b>Reward if helpful.</b></i>
08-24-2007 7:17 AM
hi dear,
first declare the check box and define function code for the check box as given below:
PARAMETERS: p_alvrep as checkbox default ' ' user-command check.
when you tick the check box it ll tigger at selection-screen output.
loop at screen.
if screen-name = 'S_REGION-LOW'.
if p_alvrep = 'X'.
screen-ACTIVE = 0.
refresh S_REGION.
else.
screen-ACTIVE = 1.
endif.
modify screen.
endif.
it helpful reward the points.
08-24-2007 7:23 AM
Hi..
Check the Following program using Radiobuttons and Accordingly convert the Same using Checkboxes.
REPORT ZSEL_RADIO1 .
TABLES SSCRFIELDS .
DATA : VCOMM TYPE SSCRFIELDS-UCOMM.
PARAMETERS: P_CH1 AS CHECKBOX USER-COMMAND CB1.
PARAMETERS: P_CH2 AS CHECKBOX USER-COMMAND CB2.
PARAMETERS: P_FIELD1 TYPE I MODIF ID ABC.
PARAMETERS: P_FIELD2 TYPE I MODIF ID ABC.
AT SELECTION-SCREEN.
VCOMM = SSCRFIELDS-UCOMM.
AT SELECTION-SCREEN OUTPUT.
CASE VCOMM.
WHEN 'CB1'.
IF CH1 = ' '.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
SCREEN-INVISIBLE = 0.
SCREEN-ACTIVE = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF CH1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
SCREEN-INVISIBLE = 0.
SCREEN-ACTIVE = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
WHEN 'CB2'.
ENDCASE.
<b>Reward if Helpful</b>