Firstly let’s understand what is trap. Trap is a bend in the pipe where the waste goes out of the toilet. It retains some water after flushing causing a seal and preventing sewer gases from entering the building. There are 2 types of trap S-Trap & P-trap.

When asked to a Plumber, what type of trap is best for wall mounted and floor mounted commode/toilet, this is what he shared…

Usually the traps are inbuilt and provided by the builder. These traps are concealed. Usually the builder decides the trap on
(1) what type of toilet will be installed and
(2) the space availability.

For a wall mounted toilet/commode P-Trap pipe needs to be fitted and for floor mounted S-trap pipe is fitted.

P-trap pipe is designed to outlet through the wall whereas S-trap is designed to outlet through the floor. Therefore S-trap pipe is not suitable for wall mounted toilets.

Most builders provide with P-trap wall mounted toilets these days.
But if there’s S-trap pipe fitted by the builder and a home owner wants wall mounted toilet, than the fitting needs to be changed. This can be done by any plumber. For changing the trap type, an additional line if taken from outside the building and the trap fitting is changed. But for this, society and builder permission is must. Not many builders do object for fitting and additional line on outside building wall. But there are few big builders who do not grant permission as they do not want to hamper the look of the building. In this case the line is fitted from inside (concealed). But here there can be choke-up problems. To avoid choking problems in society, builder usually doesn’t object on outside additional line.