Hi Eng Swee,
I was correcting the file sent by a third party and it had the relationship problem as I stated. I was able to parse the file correctly and understood the rule. Thanks for your help. I have marked your answer as the correct one
Cheers.
Ravi.