title: Setting SELECT-OPTIONS manually?
body: <p>I have a program that, among other things, retrieves data from table <code>RESB</code> based on the <code>bdter</code> field, a DATS type. On the selection screen the user either specifies a range or a standard range (start of month - today) is used.</p>
  <p>However, if I try to re-use the select-option I created for date in those cases where it isn't filled (the user entered no date range), my changes to this work area don't seem to be recognized when I use it in my select statement.</p>
  <p>Relevant code segments follow. After some testing I've concluded that:</p>
  <ul>
  <li><p>if <code>s_bdter</code> is not modified by the user and subsequently set in code, no records are filtered</p>
  </li>
  <li><p>if <code>s_bdter</code> is modified by the user, records are correctly filtered</p>
  </li>
  <li><p>if <code>s_bdter</code> is modified by the user and subsequently modified in code, records are correctly filtered</p>
  <pre><code> SELECT-OPTIONS: s_bdter FOR ls_itab-bdter MODIF ID sbd.
  
   START-OF-SELECTION.
   &quot; Set the interval.
   s_bdter-sign = 'I'.
   s_bdter-option = 'BT'.
   s_bdter-low = lc_bdter_start.
   s_bdter-high = sy-datum + 30.
  
   &quot; This select doesn't filter on bdter unless the selection parameter was set by the user.
   SELECT r~aufnr p~psphi
       FROM resb AS r
       INNER JOIN afpo AS o ON o~aufnr = r~aufnr
       INNER JOIN prps AS p ON p~pspnr = o~projn
       INTO TABLE lt_resb_ss
       WHERE r~bdter IN s_bdter.
  </code></pre>
  </li>
  </ul>
  <p>Is this known and documented behaviour? I resolved it by creating my own <code>RANGE</code> table, is this what you're always supposed to do? Is there then no way to re-use unset select-options to prevent code duplication?</p>