UA will upgrade using miles on international flights if the economy ticket is in Y (full),
B or H (discounted economy); PremEx is correct regarding domestic. AA will upgrade on international regardless of ticket code so
if you are using AA, buy the least costly ticket. Both have "capacity control" on the number of upgrades available, particularly from Y,B,or H to C; C to F is rarely a problem except on LH when it is rarely available during peak travel times. AA seems more open with int'l upgrades than UA. In more than 50 AA flights to Europe, I cannot recall any time that I wanted to urgrade with miles and was unable to do so; with UA, it is
often necessary to offer them several dates or ask them when the upgrade is available. That's not so friendly in the friendly skies but I decided to jump ship from AA after their last strike stranded me and now I must keep all my mileage with my new house guest, UA. It's not such a big deal for me because I am a lifetime AAGold - and that's no big deal, believe me - but maybe next year I'll head for the AA Platinum gate again.