Show TOC

Background documentationInterface IF_BSP_RUNTIME Locate this document in the navigation structure

 

The interface IF_BSP_RUNTIME gives you access to information contained in the current runtime environment of a BSP application. It gives you access to the most important objects and information in the form of attributes.

Note Note

Accessibility is integrated in the BSP runtime.

End of the note.
Inheritance Hierarchy/Interface Composition
Implementing Class

CL_BSP_RUNTIME

Attributes

Attribute Name

Declaration Type

Description

application_name

instance attribute

Name of BSP Application

application_namespace

instance attribute

Namespace of BSP application

application_theme

instance attribute

Theme of BSP application

application_url

instance attribute

URL prefix of the BSP application

ddic_utils

Static attribute

Dictionary services

keep_context

Static attribute

Stateful/stateless BSP application (0/1)

page_name

instance attribute

Name of BSP

page_url

instance attribute

URL prefix of BSP

runtime_url

Static attribute

URL prefix of the BSP runtime

server

Static attribute

HTTP server

session_manager

Static attribute

Workplace Session Manager

client_info

Static attribute

Device properties for the current request

session_id

Static attribute

BSP session ID

This attribute uniquely labels the user session. This means that the backend is completely independent. In other words, the value of this attribute is set independently of the context at the server.

The value of this attribute does not change:

  • If you set keep_context from 0 to 1 and

  • If you already have a browser open and you open a new one (using   File   New   Window  )

The value of this parameter changes when you close your browser and open a new one.

Methods
Methode construct_bsp_url

Signature

Syntax Syntax

  1. class-method construct_bsp_url
      importing 
        in_protocol         type string    default 'http'
        in_host             type string    optional
        in_port             type string    optional
        in_application_ns   type string    optional
        in_application      type string
        in_page             type string    optional
        in_parameters       type tihttpnvp optional
        in_suppress_rewrite type I       default 0
      exporting
        out_protocol        type string
        out_host            type string
        out_port            type string
        out_local_url       type string
        out_abs_url         type string
      .
    
End of the source code.

Description

This method builds a server-specific, absolute URL for a BSP application or BSP.

You can use the parameter in_protocol to control whether a HTTP- or HTTPS URL should be generated.

Caution Caution

This method can be expensive at runtime, you are recommended not to call it unnecessarily often. At runtime, instead of using this static method, you can use the instance attribute runtime_url, application_url, or page_url as an alternative.

End of the caution.

Parameters

in_protocol

Requested protocol (HTTP or HTTPS)

in_host

Requested host

in_port

Requested port number

in_application_ns

Namespace of the BSP application (if not 'sap')

in_application

Name of BSP Application

in_page

Name of BSP

in_parameters

Table with name/value pairs that are to be integrated in the URL as query-string parameters

in_suppress_rewrite

0: Allow URL rewriting of the BSP runtime

1: Suppress URL rewriting of the BSP runtime

Return Values/Exceptions

out_protocol

Actual protocol (HTTP or HTTPS), which can differ from in_protocol if not supported by the server

out_host

Domain name of the application server

out_port

Port number for protocol on the application server

out_local_url

URL relative to current application server

out_abs_url

Absolute URL, that is, including protocol, application server name, port number, and so on.

Methode get_otr_text

Signature

Syntax Syntax

  1. method get_otr_text 
      importing
        alias type string
      returning 
        text  type string
      .
    
End of the source code.

Description

This method returns the OTR text in the current language (sy-langu) for the alias specified.

If there is no such alias, an empty string is returned.

If there is no text for the alias in the current language, the secondary (or fallback) language is used.

Parameters

alias

OTR alias including name space (case-insensitive)

Return Values/Exceptions

text

OTR text for alias in the current language or empty string if no alias exists

Methode with_accessibility

Signature

Syntax Syntax

  1. method with_accessibility 
      returning 
        access  type boolean
      .
    
End of the source code.

Description

You determine the accessibility using this method.

Note that this does not make any statement about the accessibility of the application itself.

Parameters

-

Return Values/Exceptions

access

This return value states whether accessibility is active or not.