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-Tokyo, and finally Tokyo-Jakarta.
Multi-city searches are not available everywhere but the functionality does exist, e.g. on Kayak and, in this case, United (‘multiple destinations’). Unfortunately I was not able to find it on ANA's website. You can also use ITA's Matrix to look for a good connection and than go to a traditional brick-and-mortar travel agent to book it.
Incidentally, it's also possible to book something like Jakarta-San Francisco and Los Angeles-Jakarta on one ticket (it's called an “open jaw” ticket) and then add a stop-over in Japan orand take care of transportation between San Francisco and Los Angeles yourself (flying with another airline, renting a car, taking the bus or the train…). Since San Francisco and Los Angeles are reasonably close to each other, it could be a good alternative in this case.
Behind the scenes, your ticket might have additional transit points, be a return ticket with two stop-overs, an open jaw combined with a one-way ticket 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.