‎2006 Dec 05 5:38 AM
I've select option in which I want first date of the current month in LOW of select option and Last date of current month in HIGH of select month.
How can i achieve that?
‎2006 Dec 05 5:44 AM
Hi,
U can achieve this by using the variant ,
create the variant and then u go in to the selections S, in the variant and then u go to dynamic date caluculations,
there u can able to see many options for date..
Or u can assign it manually in the <b>Initialization</b> event.
Taking the values of the select-options low and high values...
Cheers,
Simha.
‎2006 Dec 05 5:44 AM
Hi,
U can achieve this by using the variant ,
create the variant and then u go in to the selections S, in the variant and then u go to dynamic date caluculations,
there u can able to see many options for date..
Or u can assign it manually in the <b>Initialization</b> event.
Taking the values of the select-options low and high values...
Cheers,
Simha.
‎2006 Dec 05 5:52 AM
In the initilization write so-low = sy-datum,
so-high = sy-datum etc.
‎2006 Dec 05 6:00 AM
U can use Fm HR_JP_MONTH_BEGIN_END_DATE to get first and last day of the month and then you can use initialization event to set these values for select options.
Try below code:
SELECT-OPTIONS: s_date FOR sy-datum.
DATA: s_date_low TYPE d, s_date_high TYPE d.
INITIALIZATION.
CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
EXPORTING
iv_date = sy-datum
IMPORTING
ev_month_begin_date = s_date_low
ev_month_end_date = s_date_high.
s_date-low = s_date_low.
s_date-high = s_date_high.
APPEND s_date.
I hope it helps.
Best Regards,
Vibha
<b>*Please mark all the helpful answers</b>
‎2006 Dec 05 9:32 AM
is there any other function module because the function module 'HR_JP_MONTH_BEGIN_END_DATE' doesnt exist in my system?
‎2006 Dec 05 6:17 AM
Hello,
First of all use the FM , 'HR_JP_MONTH_BEGIN_END_DATE' t get the begining and ending dates of a month and then initalize the HIGH and LOW option of the SELECT-OPTIONS , like this
INITIALIZATION.
s_var-low = .. " begining date
s_var-high = .. " ending date
where S_VAR is the select-options variable declared.
Regards,
Shehryar Dahar