Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Populate value in selection screen after entering sel screen values

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

5 REPLIES 5

former_member181966
Active Contributor
0 Kudos

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

0 Kudos

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..

Former Member
0 Kudos

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

0 Kudos

thanks for code.

0 Kudos

Glad to help. Good luck with it.

Rob