cancel
Showing results for 
Search instead for 
Did you mean: 

Change port number generated by CONSTRUCT_WD_URL

Former Member
0 Kudos

We are using load balancing and have 2 ports, one of which is open, and other is not (due to security settings).

When our application hits the port that is not open, we are not able to open the application.

Eg: two ports - 100 and 200.

100 is open, 200 is not.

So when WD (due to load balancing) runs on port 200, the CONSTRUCT_WD_URL returns port as 200. The application does not load.

We cannot change the call to the CONSTRUCT_WD_URL method, as it is a standard application that is having it.

What can we do to avoid this issue?

Thanks in adv.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Aishi,

Please check this.. same related

Cheers,

Kris.

Former Member
0 Kudos

Thanks Kissnas. But ours is already HTTPS, port 443 specified. Still sometimes diff port is picked up based on which instance it went to while running.

What might be going wrong?

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Aishi,

This goes beyond my expertise. I used that table in a reverse proxy configuration where you have to change the port number, and/or specify the proxy host for URL generation in batch, but never to switch from a host to another.

But it seems strange that the hostname in the header points to a specific server. I thought you would have a hostname that represents the server group, and that the load balancing would translate this hostname to the IP adress of a member of the server group (server selection depending on the load).

I would advise as next step to find someone to review your load balancing configuration.

Regards,

Xavier.

saravanan_narayanan
Active Contributor
0 Kudos

Hello Aishi,

if your load balancing server name, port and protocal are fixed "abc.xyz.com.sg:200", then you can pass the same values to the CL_WD_UTILITIES=>CONSTRUCT_WD_URL method and this method will construct the URL based on the passed in Server, port and protocol details.

if the server name is not constant, then we need to wait to experts to answer this.

BR, Saravanan

Former Member
0 Kudos

Thanks Saravanan. I am aware of it.

But as I said earlier, some of the standard programs are also calling this method. I cannot change those.

In my customized program, i can alter the call and make it work.

But standard I cannot do so.

How to change those URL? I thought earlier post seemed to be SAP way to do so. But as I said, hit another problem of host header.

former_member199125
Active Contributor
0 Kudos

Hi Aisha,

As you said 200 is not open due to security settings, so application with port 200 is wont work.

For every standard application we cant keep on change the code, so its better to use open ports only. Anyhow if you got a solution please post it back.

Regards

Srinivas

Former Member
0 Kudos

I think solution is what Xavier already mentioned. HTTPURLLOC is meant for handling exception cases only.

But I put the code snippet that gets triggered. Due to the check on host header, we are not able to change the URL. So was wondering if there is a workaround for it.

We cannot open the other port due to network restrictions.

Former Member
0 Kudos

Hello,

Have a look at [HTTPURLLOC table|http://help.sap.com/saphelp_nw70/helpdata/en/42/d547ab30b6473ce10000000a114e5d/frameset.htm] if you want to overwrite the default logic. It lets you specify the URL / port / protocol to be used. This is also needed for the architectures with a reverse proxy.

Former Member
0 Kudos

Thanks Xavier. You brought me very close to the answer.

Now only one trouble is there.

I can maintain entries in the table, and it will take host and port from here.

Port is okay.

But for load balancing, sometimes my host is like this:

abc1234.xyz.com.sg

My actual host which is doing load balancing is : abc.xyz.com.sg

So if incoming URL is like this: abc1234.xyz.com.sg:100, I want it to change to abc.xyz.com.sg:200.

All seems well, but there is this line of code: '

LOOP AT httpurlloc ASSIGNING <httpurlloc>.

  • If specified, match string against (possible wildcard '*' in) table.

CHECK application IS INITIAL OR <httpurlloc>-applicatn IS INITIAL OR application CP <httpurlloc>-applicatn.

CHECK for_domain IS INITIAL OR <httpurlloc>-for_domain IS INITIAL OR for_domain CP <httpurlloc>-for_domain.

CHECK host_header IS INITIAL OR host_header CP <httpurlloc>-host.

The last line gives host header as abc1234.xyz.com.sg. So if I maintain my host as abc.xyz.com.sg, it does not go ahead.

I cannot maintain abc1234.xyz.com.sg. Now I am stuck.

Can advise how to go about it?

Thanks in adv.

Former Member
0 Kudos

Any clues to work around this, Xavier, or other experts? Thanks.