Some said at PVG the officer would need your boarding pass when you go through immigration on arrival (which I found it weird).
Passed through PVG immigration 20 times. I have never been asked for the inbound boarding pass.
However, you need to write down the flight number and port of embarkation on the arrival card. If you lie and they catch you, you are in some trouble.