Retrieve maximum values

Hello
I am trying to recover the maximum value of the flow for all the lines of the Net3 network, but it turns out that the flow of the pumps is not recovered (zero value). Has anyone stepped through the same problem? The code I use is the following:

    ENgetcount(EN_LINKCOUNT, nLineas)
    ENsettimeparam(EN_STATISTIC, EN_MAXIMUM)
    ENsolveH()
    ENsaveH()
    For L = 1 To nLineas
        ENgetlinknodes(L, indN1, indN2)
        ENgetlinkvalue(L, EN_FLOW, Qmax)
    Next L
    ENclose()

Thank you