What type of fare are you trying to use? If it's First, Business, Full Fare Economy, or the highest Economy Excursion (B*EX) fare, then they are all mileage based, so it shouldn't be a problem. If it's a lower fare, then it's a routing based fare, and Shanghai isn't on the routing to Bangkok, your point of turnaround. But it should also price by breaking the fare in Bangkok, and using a Y fare BKK-HKG-SHA on any carrier, then the UA fare back home. It prices fine in Sabre.