I thought I’d share a few interesting SAP tales.
I’ve been working on a project lately of integrating with not 1 SAP Server, but 2
and the 2nd one is across the seas accessible via a SAP Router (which
is similar to Proxy Servers for the internet). I’ve got to thank Rohit Singh (MS)
and his team for some great feedback, as well as Scotty and Kent Weare whom were helping
me to nut out where half these settings go.
Specifically I needed BTS to be a ’remote RFC server’ for the two SAP Servers.
What does a Router string look like I hear you ask – “/H/devapp1/S/3300/H/acmesaprouter.acme/S/3300/H/sapdb01.acme”. Something
like that, and the user’s type this into the SAP Client UI to connectmy chances of
being able to ’stick’ this somewhere in the BizTalk world was diminishing.
So I had to get my BizTalk box to talk through the ’SAP Router’ out with the right
credentials to another SAP Server 1200KMs away”good luck” little adapter I thought.
(“good luck” Mick I though too)
Here’s the low down:
- Use a saprfc.ini file – scarce documentation, but do able.
- Set a RFC_INI System Environment variable.
- Turn on Rfc Tracing
- Get on well with the SAP teams.
- Get on well with the SAP teamsoh I mentioned that one already.
Here’s how you do it – after you’ve installed and setup the prereqs for the SAP Adapter
(don’t forget to add the SAP Adapter property schema to BizTalk)
– I jumped in and used the ‘Consume Service Adapter’ Wizard to work out connection
details and look at the IDOCs schemas.
The problem is – as time goes by, you want to see debugging and other details to tweak
as trying to establish a connection. The Receive Location (WCF-Custom, sapBinding)
SAP URI get’s horribly long.
I was happy to put up with this when I got the first connection to the SAP Server1
This *didn’t* work for SAP Server2(remote) – trust me, it’s a square peg in a round
Using SAPRFC.INI :(generally the MS Docs will get you started, but
I found they had incomplete settings so I had to go elsewhere – a Siebel->SAP 2001
document served the purpose)
Create a System Environment Variable called RFC_INI and point
it to where you want your saprfc.ini file to live.
e.g. SET RFC_INI=d:\BizTalk_Dev\SAP\saprfc.ini
(the MS documentation doesn’t say *exactly* where to put the saprfc.ini –
I tried it in the bts folder, windir…many places)
- Set the Receive Location to use the saprfc.ini – e.g. sap://client=110;lang=en;@D/SAPSERVER?LISTENERDEST=BTS_INBOUND&RfcTraceSdk=true
- Using the SAPRFC.INI file
Sample SAPRFC.INI – for local SAP connection
PROGID=BizTalkDev_Inbound (<– this is allocated from SAP)
Connecting to a SAP Server via a SAP Router String – sample
e.g. router string -/H/devapp1/S/3300/H/acmesaprouter.acme/S/3300/H/sapdb01.acme
ListenerURI (BTS Receive Location) = sap://client=110;lang=en;@D/ACMESAP?LISTENERDEST=ACMESAP_INBOUND&RfcTraceSdk=true
HTH folks and saves you guys some time – 🙂