Vijay,
What you will find is that pig traps and it's associated pipework represent the interface between pipeline engineering and design and piping design. These two similar (on the surface at least), design schools, in reality don't work well together on many occasions. Pipeline engineers are quite happy to allow the pipe and trap to move a few mm (15 is the most I can recall) and relieve hundreds of tonnes of force that would otherwise build up if the pig trap or pipeline was "anchored". Piping designers on the other hand like to work with fixed limits and movements and often try and anchor this strange incoming pipe to give them a fixed point to work away from.
The best solution is to allow the trap to slide as BI says and allow such flexibility in the associated piping, normally by having a significant straight length at 90 degrees to the pipeline on simple sliding supports.
However you will find some with two sliding anchors, some with the far end sliding only and some with a huge anchor block buried in front of the trap...
Oh and there's no rule of thumb for this.
My motto: Learn something new every day
Also: There's usually a good reason why everyone does it that way