Skip to Content
avatar image
Former Member

Populate value in selection screen after entering sel screen values

any one pls tell me how to populate the date field value

after entering sel screen values like period.

if user enter period values based on that i have to calculate start date and back to display the value in same selection screen before continuing pgm.

Thanks

Kumar

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    May 04, 2006 at 10:07 PM

    Try something like:

    PARAMETERS:    s_yr  LIKE t009b-bdatj OBLIGATORY,
                   s_per LIKE t009b-poper OBLIGATORY,
                   s_dat LIKE sy-datum.
    
    AT SELECTION-SCREEN OUTPUT.
    
      IF NOT s_per  IS INITIAL AND
         NOT s_yr   IS INITIAL.
        CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
          EXPORTING
            i_gjahr              = s_yr
    *   I_MONMIT             = 00
            i_periv              = 'UT'
            i_poper              = s_per
         IMPORTING
           e_date               = s_dat
         EXCEPTIONS
           input_false          = 1
           t009_notfound        = 2
           t009b_notfound       = 3
           OTHERS               = 4.
      ENDIF.

    I changed the year to s_yr rather than a hardcoded value.

    Rob

    Message was edited by: Rob Burbank

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 04, 2006 at 09:36 PM

    On this event, change the value and pass back to field !!

    at selection-screen.

    data-low = sy-datum - 30.

    date-high = sy-datum + 30.

    Hope this’ll give you idea!!

    <b>P.S award the points.!!! DOn`t forget :)!!!!</b>

    Good luck

    Thanks

    Saquib Khan

    "Knowledge comes but wisdom lingers!!"

    "Some are wise and some are otherwise"

    Message was edited by: Saquib Khan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      it should display the values in sel screen before he execute? and also after he enter the values in first field?

      hope u understand my req..