Trump and Putin smiled and stood next to each other for the traditional group photograph. Then they parted to sit at different parts of the table.
The White House said earlier that no formal meeting was planned because of scheduling conflicts on both sides, though it was possible they would bump into each other.
"In terms of a scheduled, formal meeting, there's not one on the calendar and we don't anticipate that there will be one," White House press secretary Sarah Sanders told reporters minutes before landing in Danang.
The main meeting of leaders from APEC countries is on Saturday in the Vietnamese resort city of Danang. Trump is on the fourth leg of a 12-day tour of Asia.
The U.S. dealmaker-in-chief appeared to strike a rich vein in China.