Skip to Content
0
Former Member
May 16, 2006 at 11:46 AM

How to default date values in Selection Screen

2844 Views

Hi everyone,

I would like to display the 1st day of the previous month into the I_GSTRP-LOW field and the last day of the current month into the I_GSTRP-HIGH field.

For example, this in the 5th month of the year (May), therefore, in the selection screen it should appear like this:

Basic Date: <u>01.04.2006</u> to <u>31.05.2006</u>

How do i do it?

*&---------------------------------------------------------------------*
*& SELECTION-SCREEN                                                    *
*&---------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS:
  I_AUFNR FOR AFIH-AUFNR,                           "ORDER NUMBER
  I_GSTRP FOR AFKO-GSTRP,                           "BASIC DATE
  I_BUDAT FOR AUFM-BUDAT,                           "POSTING DATE
  I_IWERK FOR AFIH-IWERK DEFAULT '6010' OBLIGATORY, "PLANNING PLANT
  I_ARBPL FOR CRHD-ARBPL,                           "WORK CENTER
  I_ERNAM FOR AUFK-ERNAM,                           "CREATED BY
  I_MATNR FOR RESB-MATNR,                           "MATERIAL
  I_KTEXT FOR AUFK-KTEXT.                           "EQUIPMENT

SELECTION-SCREEN END OF BLOCK 1.