Add 1200 to it:
1200 + AUTONUMBER(COMPANY & TRN_NO) as %_KEY_SALES_FACT
Resident XX ;
Something that you have to keep in mind is that autonumber is not guaranteed to hand out the same number across different reloads, only during the same reload. Meaning that you can't count on it to always generate the exact same number for the same company&trn_no combination. You can get different numbers the next day when your document is reloaded again to refresh the data.