10-03-2008 2:49 PM
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.
10-03-2008 2:53 PM
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
10-03-2008 2:53 PM
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
10-03-2008 3:21 PM
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.
10-03-2008 3:23 PM
Hi ,
Try to calculate the number of months from the date . so that based on that calculate the years for 16.5.
Regards,
Bharani