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

date

Former Member
0 Likes
1,058

hi to all experts,

i have two field at selection-screen.

1. year

2. month

and i want to given by default current year and current month.

how can i do.

thanks in advance and reward also

regard : deep

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,039

Hi

Year = sy-datum+0(4).

month = sy-datum+4(2).

Satya.

8 REPLIES 8
Read only

Former Member
0 Likes
1,040

Hi

Year = sy-datum+0(4).

month = sy-datum+4(2).

Satya.

Read only

varma_narayana
Active Contributor
0 Likes
1,039

Hi ..

this is the code....

Parameters: p_year(4) type n,

p_month(2) type n.

INITIALIZATION.

P_YEAR = SY-DATUM(4).

P_MONTH = SY-DATUM+4(2).

<b>REWARD IF HELPFUL</b>

Read only

Former Member
0 Likes
1,039

HI,

parameters:year(4) default sy-datum,

month(2) default sy-datum+4(2).

rgds,

bharat.

Read only

Former Member
0 Likes
1,039

HI Deep,

Use the event On Initialisation, in this block assign sy-datum0(4) to the year field in the selection screen and sy-datum4(2) to the month field in the selection screen.

Thanks..

Preetham S

Read only

Former Member
0 Likes
1,039

Hi,

just give like this in selection-screen,

parameters: p_year type i default '2007',

p_month type i default '10'.

Reward points if helpful.

Regards,

Vimal

Read only

Former Member
0 Likes
1,039

HI

PARAMETERS : YEAR(4) TYPE 1

PARAMETERS : MONTH(2) TYPE 1

INITIALIZATION.

YEAR = SY-DATUM+0(4).

MONTH = SY-DATUM+4(2).

REWARD IF USEFULL

Read only

Former Member
0 Likes
1,039

Parameters: p_year(4) type n,

p_month(2) type n.

INITIALIZATION.

P_YEAR = SY-DATUM(4).

P_MONTH = SY-DATUM+4(2).

this code is going to work and it works fine too.please close the threat if satisfied with answer

Read only

Former Member
0 Likes
1,039

hi,

to populate the selection screen u have to separate th year and month

here is some example which is helpfull.

check it out.

DOB = '05.03.1983'.

write 😕 'DATE OF BIRTH :',DOB.

write 😕 'YEAR OF BIRTH IS :', DOB+6(4).

write 😕 'MONTH OF BIRTH IS :', DOB+3(2).

write 😕 'DAY OF BIRTH IS :', DOB+0(2).

regards

ramesh.