Mon Site SAP Accueil Forum ABAP Weblog Liens ABAPs Livres Humour A propos...

* Macro to prefill select option
DEFINE ADD_SELECTION_VALUE.
  &2-SIGN = 'I'.
  &2-OPTION = 'EQ'.
  &2-LOW = &1.
  APPEND &2.
  CLEAR &2.
END-OF-DEFINITION.

* Macro to prefill select option
DEFINE ADD_SELECTION_RANGE.
  &3-SIGN = 'I'.
  &3-OPTION = 'BT'.
  &3-LOW = &1.
  &3-HIGH = &2.
  APPEND &3.
  CLEAR &3.
END-OF-DEFINITION.

* Macro to get the 1st day of month
DEFINE TO_1ST_DAY.
  &1+6(2) = '01'.
END-OF-DEFINITION.

* Macro to get the last day of month
DEFINE TO_LAST_DAY.
  &1+6(2) = '01'.
  &1 = &1 + 31.
  &1+6(2) = '01'.
  &1 = &1 - 1.
END-OF-DEFINITION.