2006 May 04 10:14 PM
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
2006 May 04 11: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
2006 May 04 10: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 thisll 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
2006 May 04 10:42 PM
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..
2006 May 04 11: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
2006 May 04 11:35 PM
2006 May 05 3:34 AM