‎2006 Jun 29 12:39 PM
Hi,
I need to make a range for the end of the month date only and I use the low range only because in the table that I make the select have all the days and I only need the last day of the month, so, I use the LOW range only like this:
end_month-sign = 'I'.
end_month-option = 'EQ'.
end_month-low = last_day.
APPEND end_month.
Is this code correct? because first I call a function that give the last day of the month and then I create the range and then I make the select like this:
SELECT bukrs day_a racct prctr per_day average agregate
accumulate average_sap
FROM zavg_bal_table APPENDING TABLE t_zavg
WHERE bukrs IN p_bukrs
AND day_a IN end_month
AND prctr IN profit.
Thanks for the help!
‎2006 Jun 29 12:42 PM
Hi Carlos,
Perfect code (Assuming you have defined end_month as a range with reference to the day_a filed in table zavg_table.
Regards.
John.
‎2006 Jun 29 12:42 PM
Hi Carlos,
Perfect code (Assuming you have defined end_month as a range with reference to the day_a filed in table zavg_table.
Regards.
John.
‎2006 Jun 29 12:43 PM
‎2006 Jun 29 12:44 PM
Hi carlos,
1. range for the end of the month <b>date</b> only
2. since this is range for DATE,
3. we have to give LOW AND HIGH BOTH,
otherwise it may not give the desired results.
(in your case, it will give for ONE Date only)
4.
end_month-sign = 'I'.
end_month-option = 'BT'.
end_month-low = FIRST_day.
end_month-low = last_day.
APPEND end_month.
5. U can consturct the first date
from the last day,
by using concatenate '01' concept.
regards,
amit m.
‎2006 Jun 29 12:45 PM
‎2006 Jun 29 12:46 PM