Hello Sirisha,
This issue occurs due to a bug in the DS versions 4.2 SP05 onward (not sure if this is resolved in any higher version). This can be resolved by releasing the version of Segment in source system. Collect it normally as a transport request and move to all environments. This should resolve the issue.
To release segment, please ask your ISU/ECC team to release segment version by following below steps:
How to release a segment version of an iDoc?
Moreover, you actually do not require any patch upgrade to fix this issue for DS4.2 SP05. Not sure of higher versions though.
And interestingly any segments that are unreleased any consumed by SAP XI/PI do not throw this error at all!
Let me know how you go with this.
Cheers
Vishwa