Wednesday, September 10, 2014

Biztalk WCF SAP Exception "The parameter Program Id required for SAP Inbound Handler was not specified"

If you get this exception in the WCF SAP Receive Location

The Messaging Engine failed to add a receive location "Scandlines_IDoc_Handler" with URL "sap://CLIENT=007;LANG=EN;@a/SAP.SE.RV.ER/00?ListenerGwServ=sapgw00;ListenerGwHost=SAP.SE.RV.ER;ListenerProgramId=PROGRAMID;RfcSdkTrace=True;AbapDebug=False" to the adapter "WCF-Custom". Reason: "Microsoft.ServiceModel.Channels.Common.ConnectionException: The parameter Program Id required for SAP Inbound Handler was not specified.
   at Microsoft.Adapters.SAP.SAPInboundContract.StartListener(String[] listenerActions, TimeSpan timeout)

it might, of course, be because the Program ID was not specified. However, in our case, we had not created the right SAP Connection String. All paramter have to be joined with "&" character. So if you run into the same error, look carefully at the Connection string and also at the spelling of the parameters.