BizTalk WCF SAP Adapter Gotchas – Orders05 IDOC Schema inconsistency

BizTalk 2006 R2 WCF LOB Adapter for SAP generates IDOC Schemas inconsistent with the segment name like E1EDP01008 / E2EDP01008 and E1(2)EDP19002. But when you receive a Orders05 IDOC from SAP these segment names will be E1EDP01006 and E1EDP19001.

After two days of poking around in the maps, schemas and pipelines, I got to the conclusion that the generated schema needs to be modified to reflect the actual segment names.

here is the workaround for this kind of issue.

1. open the Consume Adapter service wizard generated schema file, in this case, open Orders05_XXX_XXX_Schema.xsd file in notepad

2. search for E2EDP01008 and replace with E2EDP01006

3. similarly for E1EDP19002 and replace with E1EDP19002.

4. Test a sample Orders05 IDOC document from SAP with the new modified schema by using the “Validate Instance” option in VS 2005 for the Orders05_XXX_XXX_Schema2.xsd file.

5. Also, do not forget to cross check all the segments, data sent by SAP with the BizTalk generated XML IDOC file.

5. If it succeeds, Build and deploy the schemas and use it in other projects (pipelines and maps etc).

Note: the dreaded error like “no document schema can interpret the remaining stream of data in the input file. use a Trailer schema as buffer for that in your pipeline flat file disassembler. This is explained in this blog.

Hope this saves you some time…

This entry was posted in BizTalk. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s