Here is an issue some BizTalk R2 users have run into:
For 997 functional acknowledgements you receive from your trading partner, BizTalk R2 native EDI functionality swaps the GS02 (Sender’s Code) and GS03 (Receiver’s Code) fields.
This also happens with generated 997 technical acknowledgements which are batched using the R2 batching functionality.
We have a fix for this now out, KB 954557.
Only install this fix if you really need it. You may already have adapted you business logic to adjust to the swapped GS2/GS3 fields.
If you need this hotfix, please contact PSS for it.