Skip to Content

Introduction

With the introduction of the SAP Webdispatcher 7.2 a significant improvement has been introduced, hence the ability to connect to multiple SAP and non-SAP systems with only one Webdispatcher.
When having this implemented, only one Webdispatcher has to be administrated and only one, or a limited number of ports, in the DMZ has be opened to access all systems.
Although this new feature is documented very well, it is still unknown at a significant group of people. Therefore I would like to bring this feature to the attention by writing a blog.

Classic setup

In the classic setup of the SAP Webdispatcher, each system needed to have its own Webdispatcher. Only in case of a dual stack (ABAP + Java) one Webdispatcher could be used for dispatching requests between an ABAP and a Java system.
Since NetWeaver 7.0 EHP1 SAP recommends installing systems using the single stack option. Only SAP PI and Mobile Infrastructure, dual stacks are still the recommended way.
Especially this “new” strategy of stack deployment requires more flexibility from components like a Webdispatcher.
For example: You want to provide access to an SRM Portal via the internet. In this case the Portal accesses ABAP webdynpro in the Portal. So both the Portal as the SRM ABAP back-end need to be accessed via the Webdispatcher in the DMZ.

Different scenario’s

Implementing the SAP Webdispatcher to server multiple systems is quite easy. In this example I will only focus on one way to achieve this, which is in my opinion the most easy and most convenient way to implement this functionality.
This scenario is called “Control Using Modification Rules”. For this scenario you need to have an alias of the Webdispatcher host name for each system. 
For all scenario’s please check the following documentation:
http://help.sap.com/saphelp_nwce72/helpdata/en/03/afe24bfeb7419b9172ffb6e7636926/frameset.htm

How to implement the new functionality

Install the Webdispatcher 7.2. For the installation of the Webdispatcher 7.2, download the Installation master and kernel DVD. Execute the installation following the installtion guide. You can also just download the Webdispatcher package from the support packages and patches area and install it via the bootstrap function. 

Landscape setup

In this example, I used the following components:
PIP – SAP PI 7.0 ABAP+Java
Message server http port: 8100
Hostname sappi.demo.com

CE2 – SAP CE7.2 Java only
Message server http port 8141
Hostname sapce.demo.com

WD2 – SAP Webdispatcher 7.2
Hostname webdisp.demo.com
ICM http port: 4444

After having the webdispatcher installed, you have to make the following modifications in the instance profile of the webdispatcher:

wdisp/system_0 = SID=PIP, MSHOST=sappi.demo.com, MSPORT=8100
wdisp/system_1 = SID=CE2, MSHOST=sapce.demo.com, MSPORT=8141
icm/HTTP/mod_0 = PREFIX=/,FILE=/sapmnt/WD2/profile/icm_filter.txt

Create the file icm_filter.txt with the following contents:
if %{HTTP_HOST} regimatch wd_sappi.demo.com*
SetHeader x-sap-webdisp-target-sid PIP [break]

if %{HTTP_HOST} regimatch wd_sapce.demo.com*
SetHeader x-sap-webdisp-target-sid CE2 [break]

Restart and test the result

After the changes to the instance profile have been made and the Webdispatcher has been restarted, we can test the result.
Logon to internet explorer using the alias host name of the system you would like to select:
http://wd_sappi.demo.com:4444 -> request goes to PIP
http://wd_sapce.demo.com:4444 -> request goes to CE2

In the Webdispatcher administration console a separate node has been added in the menu for each system. 

Result

By implementing this functionality, the number of Webdispatchers can be reduced significantly. Also the number of ports that have to be opened can be reduced to one or a couple.. 

To report this post you need to login first.

13 Comments

You must be Logged on to comment or reply to a post.

  1. Reghu Ram Thanumalayan
    Hello Mark,
                  Pretty useful information about the “Modification Rules” feature in the web dispatcher.

    I have a question though :)In your example, you have defined different hostnames for the PI, CE and Web Dispatcher instances. Then how does the request http://wd_sappi.demo.com:4444 getto the web dispatcher in the first place since wd_sappi.demo.com would be the PI host?

    Regards,
    Reghu

    (0) 
    1. M. Dijsselbloem Post author
      Hi Regu,

      The hostname wd_sappi.demo.com is an alias which is pointing to the host of the webdispatcher itself.
      So wd_sappi.demo.com is pointing to webdisp.demo.com.
      When the webdispatcher receives an URL from wd_sappi.demo.com it knows via the modification rule that the request should be forwarded to host sappi.demo.com

      Hope this clarifies your question!

      Kind regards,

      Mark

      (0) 
  2. Olivier CHRETIEN
    Hello Mark,

    Excellent and very useful Blog !
    Here is a question :
    If you want to use SSL on the web dispatcher, how can you manage 2 (or more)  DNS alias names with a single SSL server certificate ?

    Olivier

    (0) 
    1. M. Dijsselbloem Post author
      Hi Olivier,

      Thanks for your feed-back, I was wondering the same thing…

      Looks like it is not possible to perform SSL termination on the webdispatcher for multiple hosts aliases.
      In case you want to establish an https connection, you could use the protocol ROUTER in the webdispatcher profile, so end-to-end SSL is being used, and the SSL is being terminated on the back-end system.

      So:
      icm/server_port_0 = PROT=ROUTER,PORT=4444,TIMEOUT=600

      Instead of:
      icm/server_port_0 = PROT=HTTP,PORT=4444,TIMEOUT=600

      Kind regards,

      Mark

      (0) 
  3. Eduardo da Cunha Kaminski
    Hi Mark,

      Excellent blog!

      We configured the webdispatcher and the backend to work with end-to-end SSL, but the protocol is changed in icm/server_port_0 to ROUTER and rule on file icm_filter.txt is not applied to directly access the url via https.

      How do I apply the rule of icm_filter for http and https?

    tks.

    (0) 
  4. Thorsten Stracke
    Well thanks for this great weblog.

    i test it with 7.3 and it works in some cases, but i’ve an other problem.
    We use one Domainname and one port from outside of the company and add url präfix names to split this to different system, at the moment it points to an external its and this makes the work.
    But in the next time we’ll upgrade to ERP 6 so integrated its is necessary, and now the problem start.
    I search for a way to use only one domain, one port and address different systems with e.g. webgui.
    When i create Url Präfix in the config to split the system, then only one system can realy work, because i’ve to use SRCURL=/ or add /sap/ and the external alias. For one system it might ok, but the next system has an different external alias and also /sap/ to be able for the standard parts.

    Is there any way to set the first part static to set this as key and so all requests are send to a special target. This is possbile with servername and port, but not with the rest.. as i see at the moment.

    Best regards
    Thorsten

    (0) 
  5. Raghunandan Kanugo
    i really liked your blog.. its really informative.

    but i just wanted to know “what do you mean by installing webdispatcher,is it executing the “sapwebdisp -bootstrap” option”???
    and the second one is the you have given “WD2” what it exactly stands for ?? is it an SID…

    please kindly help me out, iam a fresher to sap basis,please answer me even the questions are silly… :(:(:(…
    thanks in advance..

    (0) 
    1. M. Dijsselbloem Post author
      Yes, with installing I mean sapwebdisp -bootstrap, or you can also perform the installation via sapinst.

      The WD2 is indeed the SID of the webdispatcher that I used.

      Kind regards,

      Mark

      (0) 
      1. Community User
        Thanks for your early response Mark…

        i installed through bootstrap option.. but dint find any option like dispatcher SID while installing.. please help me in this..
        & the parameter “icm/HTTP/mod_0 = PREFIX=/,FILE=/sapmnt/WD2/profile/icm_filter.txt
        ” what does it do,as i have done this in the webdisp.pfl file.. i have created icm_filter.txt and saved in the path of webdisp.pfl… but could’nt logon through (in your case) http://wd_sappi.demo.com:4444 -> request goes to PIP
        http://wd_sapce.demo.com:4444 -> request goes to CE2..

        Thanks in advance
        Vishaal

        (0) 
  6. Venkatesh Koukuntla
    Hi Mark,

    We are doing a similar activity here. Our Web dispatcher is using the same SID as an ABAP system and  we have ABAP only and Java only system to be configured in one web dispatcher. when we try to test the url for java it is directing to ABAP and saying no service found.We have configured the ms/http_port parameter to http port of ABAP ASCS instance.

    Any advise where we could go wrong?

    (0) 

Leave a Reply