jul 16 anders jeppesen integration Microsoft CRM 2011 PI / XI SAP SAP PI SAP XI Scribe unicode

Scribe Integration between Microsoft CRM 2011 and SAP XI or PI

The customer required 2-way integration between Microsoft CRM 2011 and SAP XI (During the project XI was upgraded to PI without impact on the Scribe solution).
In this case we have SAP as master data for the Accounts and Products, and CRM as calculation engine for the payout to their partners.
To have the same communication format we used IDOC (more info) delivered by the customer integration team.

To describe the method I will need to split it into 2 parts explaining each direction.

Direction: SAP to CRM
To make the deliver from the XI interface into the MSMQ’s you have to use a little web service the easiest is to install it directly on the Scribe box.  (Scribe is providing this in the sample data %INSTALLPATH%ScribeSamplesScriptsXMLBridgeToQueue.asp, I also have this in .NET but there is no performance different so just go for the ASP version)
If you have any issues delivering large XML files you mind have to adjust the file upload size on the IIS, on 6.0 I have not had any issues but on 7.0 I’ve have had a lot of issue – and they was mainly solved with the upload size.
To setup the .asp file you have to pay attention on line 6 and line 129:
Line 6: const QUEUE_NAME = “.Private$ScribeIn”, this is the queue where you want to deliver the messages, in some cases you have to deal with Unicode data and that is not supported by default so you will need to store them in another queue (I have made a “wrapper” around Scribe there makes it possible to use Unicode)
Line 129: CharSet = “ISO-8859-1″, this is the character definition, default is ISO, but I had to use UTF-8 so I just changed it to that nothing else was needed.
Now should the system be ready to support this flow:

Direction: CRM to SAP
To make the integration into SAP you still have to deal with XI / PI but you have 2 options.

Option 1: Use the webservice directly to XI / PI
I have not yet had a change to try this but I know my colleagues have made crm plugins talking directly with the web service, so I don’t see any big issues if .NET can do it then Scribe can do it as well.

Option 2: Post into the queues provided by XI / PI
In my case we are doing all the calculation with CRM plugins directly in CRM and then transfer the data into CRM.
So I have received an IDOC schema containing the XML schema, and then just pushing the data into it and deliver it with a HTTP POST into the XI / PI queues.
I have not done anything special other that installing the XML hotfix D4167, but if you have upgraded Scribe to version 7.0.2 it’s included.

It’s not rocket science working with Scribe / CRM / SAP integrations, but it takes some time to figure the method but with this I would expect you have a kick starter for the purpose.
Just to mention then because the method is in place then the data mapping and logic ownership of fields etc. it still as complicated as always, so remember to estimate extra time in the analyze part as it’s there where I see the most of the time is used, mainly because the mappings is redefined several times, if it’s possible then keep the people involved at a minimum.

This is the link to the PDF version: http://www.anjep.dk/WEB/Upload/Scribe_Integration_between_Microsoft_CRM_2011_and_SAP_XI_or_PI.pdf

Share on FacebookTweet about this on TwitterShare on LinkedInShare on Google+

3 comments on “Scribe Integration between Microsoft CRM 2011 and SAP XI or PI

Skriv et svar

Din e-mailadresse vil ikke blive offentliggjort. Krævede felter er markeret med *