Hi,
Add differentiation term "Portfolio" in your differentialtion parameter and need to mark it mandatory while entring transaction in FTR_Create.
This will allow you to differentiate the securities on the basis of portfolio while looking for internal and external position.
Regards,
Rohit Bali