[Stackoverflow] [Progress OpenEdge ABL] Treatment of Date on a progress query (Find)

Status
Not open for further replies.
T

Tilan Chicha

Guest
i'm very debutant in progress (4GL) and i'm looking for building a fonction that will look for the most recent information in a table (thanks to a variable date) whith some conditons.
In my table (ecm_mstr ) there are information about weight, item_number and historical_number (ID). Some items are in several time in the table cause there are update about weight and its making a new line, not overwriting.

I was inspired by existing function but without log error or consol tu execut my code it is difficult t solve the problem. There are probably some structure/syntax problems.

I try this but i currently don't now about how sort this date..


FUNCTION GetPdsSFtest2 returns decimal (pArticle as char):
def var pLevel as char.
pLevel = substring(pArticle,7,2).
if pLevel = "PF" or pLevel = "NE" then do:
find first ecd_det no-lock where ecd_domain = global_domain
and ecd_part = pArticle no-error. *'Item_Number*
if available ecd_det then do:
find first ecm_mstr no-lock where ecm_domain = global_domain
and ecm_nbr = ecd_nbr no-error. *'historical_number
and treatment on the most recent date *'Searching for a 'sort' of my result to get the first one (so the most recent)*
if available ecm_mstr then return ecm_cmmt[01]. *'Return my find
else return 0.
end.
end
END FUNCTION.

Continue reading...
 
Status
Not open for further replies.
Top