Sebastien,
You could also check to see if there is an active order ui, if the UI returns "???" no active order exists or has been discontinued.
INIT,MAP,LOCAL,order1,TO,get_order.ui.10007418.1
INIT,IF,,fs_1,NE,"???", THEN
One caveat is if you have more then one of the same order, you will need to make it sequential...
INIT,MAP,LOCAL,order1,TO,get_order.ui.10007418.1
INIT,MAP,LOCAL,order2,TO,get_order.ui.10007418.2
INIT,MAP,LOCAL,order3,TO,get_order.ui.10007418.3
And the biggest caveat is that orders that are "ONCE" cant bee seen using this method.
Hope this helps!
Michael