Application Development and Automation 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: 
Read only

Report

Former Member
0 Likes
555

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?

1 ACCEPTED SOLUTION
Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
492

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.

5 REPLIES 5
Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
493

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.

Read only

Former Member
0 Likes
492

In the initilization write so-low = sy-datum,

so-high = sy-datum etc.

Read only

Former Member
0 Likes
492

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>

Read only

0 Likes
492

is there any other function module because the function module 'HR_JP_MONTH_BEGIN_END_DATE' doesnt exist in my system?

Read only

Former Member
0 Likes
492

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