In practice, if you want to do it yourself online, you have to use the “multi-city ticket” option, i.e. instead of looking for a return ticket and then somehow adding stopovers, you would search for a trip with four legs: Jakarta-San Francisco, San Francisco-Los Angeles, Los Angeles-Narita, and finally Narita-Jakarta. Multi-city searches are not available everywhere but the functionality does exist, e.g. on [Kayak](http://www.kayak.com/) and, in this case, [United](https://www.united.com/) (‘multiple destinations’). Unfortunately I was not able to find it on ANA's website. Behind the scenes, your ticket might really be return ticket with two transit point/stop-overs or some other combination of fares but the multi-city option should hopefully be able to find the cheapest solution. Because small changes can make a huge difference to the available fares and total price, finding a good price often requires a bit of work.