Wednesday, June 10, 2009

how to get the first day and last day SAP

Most of the time when we need the first day and the last day of a given month we always run to get a function. why use a function when its so easy to code it

*get first and last date of month and year
CONCATENATE s_bdatj-low s_mnr-low '01' INTO gv_date1.

gv_month = s_mnr-low .
gv_month = gv_month + 01.

CONCATENATE s_bdatj-low gv_month '01' INTO gv_date2.

gv_date2 = gv_date2 - 1.

No comments:

Google