Is it possible to set the HEX file name by preprocessor commands?
The hex file name is defined in the Project properties - so define your macro(s) based on that.
You can use the Key Sequences to extract this information: http://www.keil.com/support/man/docs/uv3/uv3_ut_keysequence.htm
In our code we need to chnage the HEX file name based on the Macro, so is it possible to set the HEX file name based on the Macro condition
No.