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

default date!!

Former Member
0 Likes
600

Hi

i have to default 2 dates on selection screen (first one should be fiest day of the year and second date should be last day of the year based on the current date)...

any help will b appreciated!!

regards

Gunjan

2 REPLIES 2
Read only

former_member186741
Active Contributor
0 Likes
529

initialization.

concatenate sy-datum(4) '0101' into p_first.concatenate sy-datum(4) '1231' into p_last.

Read only

Former Member
0 Likes
529

Initialization.

lv_first_day = sy-datum.

lv_first_day+4(2) = '01'.

lv_first_day+6(2) = '01'.

lv_last_day = lv_first_day.

lv_last_day+4(2) = '12'.

lv_last_day+6(2) = '31'.

Selection-screen.

parameters: p_date type dats default lv_first_day to lv_last_day.

Hope it helps. Let me know if you have any further queries.

Don't forget to mark helpful answers!

Gaurav Parmar.