thelister You just have to book your ticket with different flight numbers on HAN-BKK and BKK-DOH so you will have to exit the HAN-BKK airplane in BKK and nothing force you to fly the next leg.
If you have checked luggage, book an overnight/long connection in BKK and ask them to short check your luggage to BKK from HAN.