none
Configure URI for SAP Adapter from BizTalk Adapter Pack 2.0 in ReceiveLocation or SendPort does not work with sap router string RRS feed

  • Question

  • When using the WCF-SAP Adapter of the BizTalk Adapter Pack V.2.0 we can not use the “Configure…” button in the ReceiveLocation or SendPort of “BizTalk Server Administration Console” for configuring the SAP connection parameters when we use a SapRouterString for Connection to SAP, because it generates a wrong URI.
    It generates e.g.
    sap://CLIENT=800;LANG=DE;@A//H/saprouter/H/sapserver/00?RfcSdkTrace=False&AbapDebug=False
    but it should generate:
    sap://CLIENT=800;LANG=DE;@A/%2FH%2Fsaprouter%2FH%2Fsapverver/00?RfcSdkTrace=False&AbapDebug=False
    Reason:  Slashes / are reserved characters and should be replaces by %2F when used in a connection property.

    A similar dialog works correct, when creating schemas for SAP in Visual Studio 2005 with this adapter. On a BizTalk Project you can “Add Generated Items…” then choose “Consume Adapter Service” and select the “sapBinding” afterwards. The “configure…” button in this dialog generates a valid URI.

    Is there a workaround and when will this be fixed?

    Thursday, October 15, 2009 12:04 PM

Answers

  • You can use the saprfc.ini file

    QUOTING RESPONSE FROM A CUSTOMER WHO HAD A SIMILAR PROBLEM-->

    My scenario:

    a) two SAP Servers, one local and one based in a remote company accessed through a SAP Router (c.f. internet and proxy servers) - both needed BizTalk to be a RFC server.

     

    Starting out:

    - 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 (local).

     

    This *didn't* work for SAP Server2(remote) - trust me, it's a square peg in a round hole.

     

    Using SAPRFC.INI 
     

    1) 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

    2) Set the Receive Location to use the saprfc.ini - e.g. sap://client=110;lang=en;@D/SAPSERVER?LISTENERDEST=BTS_INBOUND&RfcTraceSdk=true

     

    Sample SAPRFC.INI - for local SAP connection


    DEST=SAPSERVER
    TYPE=A
    ASHOST=DEVAPP1

    GWHOST=DEVDB1

    GWSERV=sapgw00
    SYSNR=00
    RFC_TRACE=0
    ABAP_DEBUG=0
    USE_SAPGUI=0

     

    DEST=BTS_INBOUND
    TYPE=R

    GWHOST=DEVDB1

    GWSERV=sapgw00

    PROGID=BizTalkDev_Inbound  (<-- this is allocated from SAP)
    SYSNR=00
    RFC_TRACE=0
    ABAP_DEBUG=0
    USE_SAPGUI=0


    3) Connecting to a SAP Server via a SAP Router String - sample saprfc.ini

    e.g. router string -/H/devapp1/S/3299/H/acmesaprouter.acme/S/3299/H/sapdb01.acme

     

    DEST=ACMESAP
    TYPE=A
    ASHOST=/H/devapp1/S/3299/H/acmesaprouter.acme/S/3299/H/sapdb01.acme
    GWHOST/H/devapp1/S/3299/H/acmesaprouter.acme/S/3299/H/sapdb01.acme

    GWSERV=sapgw00
    SYSNR=00
    RFC_TRACE=0
    ABAP_DEBUG=0

    DEST=ACMESAP_INBOUND
    TYPE=R
    GWSERV=sapgw00
    GWHOST=/H/devapp1/S/3299/H/acmesaprouter.acme/S/3299/H/sapdb01.acme

    PROGID=BizTalkDev2_Inbound
    SYSNR=00
    RFC_TRACE=0
    ABAP_DEBUG=0


    -

    hope this helps
    Thursday, October 15, 2009 2:38 PM

All replies

  • You can use the saprfc.ini file

    QUOTING RESPONSE FROM A CUSTOMER WHO HAD A SIMILAR PROBLEM-->

    My scenario:

    a) two SAP Servers, one local and one based in a remote company accessed through a SAP Router (c.f. internet and proxy servers) - both needed BizTalk to be a RFC server.

     

    Starting out:

    - 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 (local).

     

    This *didn't* work for SAP Server2(remote) - trust me, it's a square peg in a round hole.

     

    Using SAPRFC.INI 
     

    1) 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

    2) Set the Receive Location to use the saprfc.ini - e.g. sap://client=110;lang=en;@D/SAPSERVER?LISTENERDEST=BTS_INBOUND&RfcTraceSdk=true

     

    Sample SAPRFC.INI - for local SAP connection


    DEST=SAPSERVER
    TYPE=A
    ASHOST=DEVAPP1

    GWHOST=DEVDB1

    GWSERV=sapgw00
    SYSNR=00
    RFC_TRACE=0
    ABAP_DEBUG=0
    USE_SAPGUI=0

     

    DEST=BTS_INBOUND
    TYPE=R

    GWHOST=DEVDB1

    GWSERV=sapgw00

    PROGID=BizTalkDev_Inbound  (<-- this is allocated from SAP)
    SYSNR=00
    RFC_TRACE=0
    ABAP_DEBUG=0
    USE_SAPGUI=0


    3) Connecting to a SAP Server via a SAP Router String - sample saprfc.ini

    e.g. router string -/H/devapp1/S/3299/H/acmesaprouter.acme/S/3299/H/sapdb01.acme

     

    DEST=ACMESAP
    TYPE=A
    ASHOST=/H/devapp1/S/3299/H/acmesaprouter.acme/S/3299/H/sapdb01.acme
    GWHOST/H/devapp1/S/3299/H/acmesaprouter.acme/S/3299/H/sapdb01.acme

    GWSERV=sapgw00
    SYSNR=00
    RFC_TRACE=0
    ABAP_DEBUG=0

    DEST=ACMESAP_INBOUND
    TYPE=R
    GWSERV=sapgw00
    GWHOST=/H/devapp1/S/3299/H/acmesaprouter.acme/S/3299/H/sapdb01.acme

    PROGID=BizTalkDev2_Inbound
    SYSNR=00
    RFC_TRACE=0
    ABAP_DEBUG=0


    -

    hope this helps
    Thursday, October 15, 2009 2:38 PM
  • Thank you very much for that explanation and workaround.

    I think that it will be easier than to explain our customers, which use a saprouter string, that they should not use the "Configure..." button and modify the URI in the previous dialog.

    Is this bug known by microsoft. Do you know when it will be fixed.
    Or should I use a ticket and post it to microsoft?
    Wednesday, October 21, 2009 7:40 AM
  • I have reported this issue to microsoft. I will see, what they will say.
    Tuesday, November 10, 2009 3:23 PM
  • hxbergen - I don't think it's a 'bug' as such, the saprfc.ini file allows you to enter more details than what the URI allows.

    The saprfc.ini file is something that the SAP Client dlls use, not the BAP 2.0

    I tend to use the ini file for simple deployments and environment changes.
    (I also wrote that workaround :-)

    Cheers,

    Mick.

    Mick Badran - http://blogs.breezetraining.com.au/mickb
    Tuesday, November 24, 2009 5:19 AM
  • It is definitely a bug, but also a workaround exists from you. Thanks for that.
    As I wrote, in Visual Studio it works correct.
    Tuesday, November 24, 2009 10:00 AM
  • Microsoft will fix this issue in the next version which will be available in 2010.
    For now the solution with SAPRFC.INI is the workaround.

     

    Wednesday, November 25, 2009 9:49 AM