So before a P40, you are supposed to maneuver to your burn attitude either manually or via V49.
You do not enter any RPY values into the N18 that comes up when you call P40. P40 will generate the burn attitude which, if you are at the correct roll prior, should match the pad burn attitude.