‎2008 May 21 2:25 AM
HI all,
In my selection screen , there are 2 radio button, when i click the 1st button, 2 parameters will be displayed and when i click the 2nd button, 3 checkbox will be displayed. And when I validate the select parameters I am getting some problem.
my code:
AT SELECTION-SCREEN OUTPUT.
Selection screen for dynamic changes
PERFORM dynamic_selection_screen.
AT SELECTION-SCREEN.
Validate the selection-screen
perform validate_select_screen.
-
FORM dynamic_selection_screen .
IF r_kpi = 'X'.
PERFORM make_invisible_fields USING 'CH2'.
ELSEIF r_date = 'X'.
PERFORM make_invisible_fields USING 'CH1'.
ENDIF.
ENDFORM.
-
FORM validate_select_screen .
IF r_kpi = 'X'.
IF p_month IS INITIAL AND p_year IS INITIAL.
MESSAGE e001(zbw).
ENDIF.
ENDIF.
IF r_date = 'X'.
IF ch_untpp IS INITIAL
AND ch_A IS INITIAL
AND ch_B IS INITIAL
MESSAGE e004(zbw).
ENDIF.
-
In my selection screen,
when i click r_kpi, p_month and p_year gets displayed (all proper error messages r displayed)
but when I click r_date, I am getting Message e004 but ch_A and ch_B are not displayed.
kindly help.
points will be rewarded
thanks in advance.
‎2008 May 21 2:58 AM
‎2008 May 21 2:29 AM
‎2008 May 21 2:33 AM
REPORT zreport.
INCLUDE z_top.
INCLUDE z_form.
AT SELECTION-SCREEN OUTPUT.
Selection screen for dynamic changes
PERFORM dynamic_selection_screen.
AT SELECTION-SCREEN.
Validate the selection-screen
perform validate_select_screen.
INITIALIZATION.
Get the Program name
v_repid = sy-repid.
*Defining the fieldcatalog to be used for the Summary ALV report
PERFORM build_fieldcatlog.
PERFORM event_call.
PERFORM populate_event.
PERFORM build_listheader USING it_listheader.
START-OF-SELECTION.
Set the GUI status
SET PF-STATUS 'A1'.
Get the date based on the selection screen
PERFORM initialise_data.
Calculate the trips
PERFORM process_trips.
-
&----
*& Include ZKPI_KPI8_REPORT_FORM
&----
&----
*& Form dynamic_selection_screen
&----
FORM dynamic_selection_screen .
IF r_kpi = 'X'.
PERFORM make_invisible_fields USING 'CH2'.
ELSEIF r_date = 'X'.
PERFORM make_invisible_fields USING 'CH1'.
ENDIF.
ENDFORM. " dynamic_selection_screen
&----
*& Form make_invisible_fields
&----
FORM make_invisible_fields USING p_group TYPE screen-group1.
LOOP AT SCREEN.
IF screen-group1 = p_group.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDFORM. "make_invisible_fields
&----
*& Form validate_select_screen
&----
FORM validate_select_screen .
IF r_kpi = 'X'.
IF p_month IS INITIAL AND p_year IS INITIAL.
MESSAGE e001(zbw).
ENDIF.
IF p_month IS INITIAL.
MESSAGE e002(zbw).
ENDIF.
IF p_year IS INITIAL.
MESSAGE e003(zbw).
ENDIF.
ENDIF.
IF r_date = 'X'.
IF s_rdate IS INITIAL.
MESSAGE e004(zbw).
ENDIF.
IF ch_untpp IS INITIAL
AND ch_untpt IS INITIAL
AND ch_bltpp IS INITIAL
AND ch_bltpt IS INITIAL
AND ch_unfto IS INITIAL
AND ch_blfto IS INITIAL.
MESSAGE e005(zbw).
ENDIF.
ENDIF.
ENDFORM.
also let me know if u require more information
‎2008 May 21 2:38 AM
Can you paste selection screen defination also?
Regards,
Atish
‎2008 May 21 2:41 AM
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: r_kpi RADIOBUTTON GROUP grp1 USER-COMMAND radio DEFAULT 'X',
r_date RADIOBUTTON GROUP grp1 .
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-002 .
PARAMETERS: p_month TYPE month MODIF ID ch1,
p_year(4) TYPE n MODIF ID ch1.
SELECTION-SCREEN: END OF BLOCK b2.
SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE text-003 .
SELECT-OPTIONS s_rdate FOR sy-datum MODIF ID ch2 .
PARAMETERS: ch_a AS CHECKBOX MODIF ID ch2,
ch_b AS CHECKBOX MODIF ID ch2,
SELECTION-SCREEN: END OF BLOCK b3.
let me know for more information
thanks
‎2008 May 21 2:51 AM
Hi Jayasree,
Hi Jayasree you have to reactive the screen fields once you deactivate that.
Hence inside your loop at screen.
Add an else part which will make screen-active = 1 for rest of things.
Hope this helps you.
Thanks,
Arun
‎2008 May 21 2:54 AM
even then it is not working.
FORM make_invisible_fields USING p_group TYPE screen-group1.
LOOP AT SCREEN.
IF screen-group1 = p_group.
screen-active = '0'.
MODIFY SCREEN.
else.
screen-active = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDFORM.
‎2008 May 21 3:03 AM
Hi Jayasree,
Can you put a break-point in loop at screen and check what it does in case of your check box.
You can check the value of screen-active for you check box.
Can you tell me that value?
Also check values for screen-INVISIBLE.
Thanks,
Arun
‎2008 May 21 3:08 AM
NOW IT IS OK.
I have entered as Warning messages and change 0 and 1.
thanks Atish and Arun for your support.
points will be reewarded
‎2008 May 21 2:30 AM
Hi Jayasree,
Thats's because when are using a error message, it will not allow you to proceed further in case of any error.
Probably use Warning message instead of error message it will allow you to display the fields.
Hope this helps you.
Thanks,
Arun
‎2008 May 21 2:38 AM
even when i tried with Warning message, it is not working. when i click Date radiobutton, it is not working. the checkbox is not getting displayed. only the messages is displayed.
help.
thanks
‎2008 May 21 2:58 AM