South Africa's final game is against Fiji at 16h30 on Tuesday in the 11th place final, and they should be able to take some confidence into that match after playing great rugby at times on the second day of the competition.
Like they did earlier on Monday in their final pool match against Great Britain, the South Africans had a better start, with two tries early on giving them a 12-5 lead against Japan.
First Libbie Janse van Rensburg snuck over on the blind side of a ruck close to the line to put them in front, but Japan replied with a well-taken try by Wakaba Hara after some breakdown errors by the Bok Women to draw level at 5-5.
Nadine Roos then scored after she evaded some tackles and converted her own try to put South Africa 12-5 up at the break.
Japan scored four minutes into the second half, but missed the conversion and SA still had a 12-10 lead, but the Japanese finished stronger and secured turnover possession at a ruck before Marin Kajiki scored her second try with less than half a minute left on the clock.
The SA side had one more chance from the resulting restart, but the ball went into touch and that was that.
Earlier on Monday, South Africa failed to win their final pool match after suffering a close 26-17 defeat to Great Britain.
The Bok Women's Sevens team startled the much more experienced Britons by taking a 12-7 lead at the break, before falling away in the second half, allowing Team GB to take the lead and seal the win.
Janse van Rensburg opened the scoring in the opening minute after Team GB knocked on near their own line. Ayanda Malinga was quick to swoop and delivered a try-scoring offload.
Roos converted and was on the scoresheet herself four minutes later, this time from an angled run and a timely pass from Malinga. However, a mistake from the restart gave Team GB their first points, but at 12-7 at the break, South Africa looked strong.
Two early errors, both from the restart, handed GB the lead in the opening minute of the second half.
A yellow card to GB gave South Africa a change to pull it back again when Roos turned provider to Malinga, who scored her first try of the tournament, but Team GB struck back decisively though with two late tries by Jasmine Joyce.
Scorers:
South Africa 17 (12), Great Britain 26 (7)
SA - Tries: Libbie Janse van Rensburg, Nadine Roos, Ayanda Malinga. Conversion: Roos.
GB - Tries: Grace Compton, Isla Norman-Bell, Jasmine Joyce (2). Conversions: Norman-Bell (3).
South Africa 12 (12), Japan 15 (5)
SA - Tries: Nadine Roos, Libbie Janse van Rensburg. Conversion: Roos.
Japan - Tries: Marin Kajiki (2), Wakaba Hara.