From reading your post, I am assuming you want to get AAdvantage miles.
Is this a ticket purchased from a travel agent/consolidator? (since it is in "M" class)
I don't think it is possible to "upgrade" from M class to H class at the airport as the M class fare is likely to be one of those "contract" fares offered by a consolidator (making it difficult to calculate fare difference etc.)
The only way to "upgrade" from M class to H class would be to ask your travel agent to do an "upsell" (expect to pay a few hundred dollars more [my estimate] eacy way). However, not all contracts allow an "upsell" to occur. In most cases, the only way an "upsell" to H class would occur would be if if M class is fully booked, and there is no K class available (to "upsell" to) for the flight you want.
The following is a very old text file (from a few years back) from my TA AND IS ONLY AN EXAMPLE (this is for fares originating in Canada).
Code:
APPLICATION ..ONEWAY NET SURCHARGE CANNOT BE DISCOUNTED..
FOR CX FLIGHTS ONLY.
FOR ALL CX CANADA NET SALES AGREEMENT TICKETS SOLD
AND ISSUED IN CANADA. IF THE REQUIRED BOOKING
CLASS IS NOT AVAIL. ON THE DESIRED CX FLT SECTOR
PRIOR TO DEPARTURE FROM CANADA YOU MAY CONFIRM AND
TICKET ANOTHER SUBCLASS IN ECONOMY BY COLLECTING
THE APPLICABLE ONE-WAY NET SURCHARGE AS FOLLOWS..
MAY NOT BE DISCOUNTED OR SOLD AFTER DEPARTURE FROM CANADA.
--------------------------------------------------------------|?
CHANGES
IF YOU HAVE UPSOLD YOU CLIENT AND REQUIRED BOOKING
CLASS BECOMES CONFIRMED YOU MAY...
PRIOR TO DEPARTURE REISSUE TKT AND REFUND THE SURCHARGE
AMOUNT. NO OTHER CHANGES TO DATE/ROUTING PERMITT
AFTER DEPARTURE NO CHANGES PERMITTED. NO REISSUE AND THE
SURCHARGE BECOMES NON-REFUNDABLE EVEN IF REQUIRED CLASS
BECOMES AVAILABLE.
---------------------------------------------------------------
-
FOR CX LONG HAUL SECTORS BETWEEN HKG AND YVR ,YYZ
LAX,SFO,SYD,MEL,BNE,CNS,PER,AKL,BOM,CMB AND DXB. |
---------------------------------------------------------
PER AGREEMENT CX UPSELL CLASS AND OW SURCHARGE
BOOKING CLASS L M K H B Y
---------------------------------------------------------
L - 50 100 250 500 600
---------------------------------------------------------
M - - 50 200 450 550
---------------------------------------------------------
K - - - 150 400 500
---------------------------------------------------------
H - - - - 250 350
--------------------------------------------------------- |
B - - - - - 100
---------------------------------------------------------
Y - - - - - -
---------------------------------------------------------
PLEASE REFER TO INDIVIDUAL SALES AGREEMENTS FOR SPECIFIED
BOOKING CLASS.