Hello World !
I have following problem, i what to filter
a record with the date filter. So fare so good.
In C/AL:
i use TODAY (command), and now i what the record filtered
by my business period.
eg.
if we have the 13.03.00 then first Periode = 01.03.00..31.03.00
if we have then 15.04.00 then Output P2 (secound Period)
...
and now Filter the Record like this
Setfilter(date,'%1',01.03.00..31.03.00) Periode one
anyone have an idea how to realize automate
this problem ???
Best regards
Alex Schubert
ERP & Navision
Dolphin Communication Technologies GmbH
Otto-Hahnstr. 1 c
D-69190 Walldorf
DolphinCT.de
Comments
// periods starting before today
AP.setrange("Start Date", 0D, TODAY);
AP.FIND('+'); // latest period
PeriodStart := AP."Start Date"; // start date
AP.setrange("Start Date"); // clear filter
AP.NEXT(1); // next period
// last period ended the day before the next period starts
EndDate := CALCDATE("-1D", AP."Start Date");
To get the next period's dates, repeat the last group of statements