Skip to Content
0
Former Member
Jun 04, 2010 at 06:51 PM

Initialize select-option-low when radio button selected.

68 Views

Hello all,

In the "AT SELECTION-SCREEN OUTPUT" event I am initializing both a parameter and a select-option-low field based on the value of a radio-button. In the debugger I can see that both of these fields are set to their initial value. But the select-option-low field retains the value, rather than resetting to its initial state.

The following code displays the problem. Is anyone aware of a way to correct this problem?

Thanks

Bruce

tables: bkpf.
*
PARAMETERS: p_lstrun RADIOBUTTON GROUP bydt USER-COMMAND xyz
                                            DEFAULT 'X'.
PARAMETERS: p_yr_prd RADIOBUTTON GROUP bydt .

PARAMETERS:     p_gjahr TYPE bkpf-gjahr                MODIF ID abc.
SELECT-OPTIONS: S_MONAT FOR  bkpf-monat  NO INTERVALS  MODIF ID abc.

PARAMETERS: p_updzlr AS CHECKBOX
                     DEFAULT 'X'  MODIF ID sel
                     USER-COMMAND ucom .
*
***************************
AT SELECTION-SCREEN OUTPUT.
***************************
*
  IF p_yr_prd = 'X'.            " Select by screen Year/period
*
    p_updzlr = ' '.             " uncheck "update ZLSTRUN table"
*
    LOOP AT SCREEN.
      IF screen-group1 = 'SEL'.
*
        screen-input     = 0.          " prevent input
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
*
  ELSEIF p_lstrun = 'X'.            " Select by ZLSTRUN table"
*
    p_gjahr     = ' '.
    S_MONAT-low = ' '.

    LOOP AT SCREEN.
      IF screen-group1 = 'ABC'.
*
        screen-input     = 0.          " prevent input
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
*
    LOOP AT SCREEN.
      IF screen-group1 = 'SEL'.
*
        screen-input     = 1.          " allow input
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
*
  ENDIF.  " p_yr_prd = 'X'.