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

Problem with Calclating the date

Former Member
0 Likes
434

Hi All,

i want to Fetch the all PERNR(s) from pa0001 infotype, here the condition is ...

how to all pernrs from the pa0001 who are 16.5 years old by the current date, comparing month and year of Date of birth Field of that PERNR, (comparing to current date).

Thanks in Advance.

sudeer.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
392

days = 16.5 * 365.

date1 = sy-datum - days. " date which is 16.5 yrs before today's date

select * from pa0002 into table xyz where gbdat <= date1 and endda = '99991231'.

Edited by: Amit Gupta on Oct 3, 2008 3:54 PM

3 REPLIES 3
Read only

Former Member
0 Likes
393

days = 16.5 * 365.

date1 = sy-datum - days. " date which is 16.5 yrs before today's date

select * from pa0002 into table xyz where gbdat <= date1 and endda = '99991231'.

Edited by: Amit Gupta on Oct 3, 2008 3:54 PM

Read only

0 Likes
392

Hi Gupta,

thank u very much for ur replay....as u told is right..

but in my requirement i want to compare only with Month and Year of the D.O.B Field with current date.

here i want to get all perners who having 16.5years by comparing with Month and Year.

any clue pls....

Thanks & Advance,

sudeer.

Read only

0 Likes
392

Hi ,

Try to calculate the number of months from the date . so that based on that calculate the years for 16.5.

Regards,

Bharani