Entering content frame

Background documentation Programming Interface Locate the document in its SAP Library structure

A simple programming interface is provided to use configuration data from Table HTTPURLLOC. Two functions have been added to interface Structure linkIF_HTTP_SERVER (implemented in class CL_HTTP_SERVER).

GET_LOCATION_EXCEPTION

Parameter

Type

Kind of Typing

Reference Type

PROTOCOL

Importing

Type

CSEQUENCE

APPLICATION

Importing

Type

CSEQUENCE

FOR_DOMAIN

Importing

Type

CSEQUENCE

SERVER

Importing

Type Ref To

IF_HTTP_SERVER

HOST

Exporting

Type

STRING

PORT

Exporting

Type

STRING

OUT_PROTOCOL

Exporting

Type

STRING

 

Method GET_LOCATION is a wrapper function for GET_LOCATION_EXCEPTION. It first calls the exception coding. If no value is returned, it uses the standard AS-ABAP name and the standard port configuration for the requested data.

 

Parameters

·        PROTOCOL

Protocol for which the data is needed. It can be HTTP (standard value) or HTTPS.
This parameter is optional.
If the parameter is not specified and if the server object is available, the query is performed on the protocol to be used.

·        APPLICATION

Application name for which the URL is to be generated. This name is matched against the pattern in HTTPURLLOC-APPLICATN.
This parameter is optional
It is only needed if different host and port data have been configured depending on the application. For BSP runtime the string /BSP/<namespace>/<application> is always used.

·        FOR_DOMAIN

This parameter is matched against the pattern in  HTTPURLLOC-FOR_DOMAIN.
This parameter is optional.
We recommend you do not enter a value for this parameter.

·        SERVER

Server is a reference to the server object that is available if the application is running in the context of an inbound HTTP request. This means that the matching algorithm can extract the host header from the request and use it as an extra criterion for matching against the HTTPURLLOC-HOST field.
This parameter is optional. Nevertheless we recommend you always enter a value in this field.

·        HOST

Host is the returned host name that is to be used for generating the fully-specified URL. When an input is matched, this enters the value of HTTPURLLOC-HOST, otherwise the parameter keeps its initial value.

·        PORT

Port is like the value of HTTPURLLOC-PORT.

·        OUT_PROTOCOL

This parameter matches the requested importing protocol field if this is specified. If however the fully-specified URL is not needed to switch the protocol, but it is needed to load specific resources, we recommend that you do not set the importing protocol parameter. Instead enter the server object. The server object is used to determine which protocol is currently being used and then this information is used elsewhere.  The algorithm is also for cases when the browser is communicating via HTTPS with a reverse proxy server and when HTTP is being used for the AS-ABAP.

Note

Note that these methods are integrated in a very deep layer. It cannot be guaranteed that they can be called every time and from all different frameworks.  For BSP method CONSTRUCT_BSP_URL has been extended to implement this programming interface.

 

Leaving content frame