Show TOC

Object documentationPage Directive Locate this document in the navigation structure

 

This directive is used to specify the script language. ABAP and JavaScript are currently supported.

Syntax Syntax

  1. <%@ page language=("ABAP" | "JAVASCRIPT") %>
    
End of the code.
otrTrim

From SAP Web AS 6.20 Support Package 7, the attribute otrTrim is also available for the page directive.

Syntax Syntax

  1. <%@ page language=("ABAP" | "JAVASCRIPT") otrTrim=("TRUE“ | "FALSE“) %>
    
End of the code.

This attribute is a boolean value, that is, it can have the values TRUE and FALSE. The default value is FALSE. If it is set to TRUE, all OTR texts on a page are condensed by removing all blank characters from the start and end of a string.

An example of switched on attribute (otrTrim=true):

Syntax Syntax

  1. <%@page language="abap" otrTrim="true" %>
    <%
      DATA: s TYPE STRING VALUE 'test'.
    %>
    [<otr> test line </otr>]<br>
    [<otr> before <%= s%> middle <%= s%> end. </otr>]<br>
    [<%= otr(sbsp_test/it00_otr_1) %>]
    
End of the code.

The output generated using this coding then looks as follows:

[test line]

[before test middle test end.]

[This is a test for an alias text]

Example of the case when otrTrim is switched off (otrTrim=false):

Syntax Syntax

  1. <%@page language="abap" otrTrim="false" %>
    <%
      DATA: s TYPE STRING VALUE 'test'. %>
    [<otr> test line </otr>]<br>
    [<otr> before <%= s%> middle <%= s%> end. </otr>]<br>
    [<%= otr(sbsp_test/it00_otr_1) %>] 
End of the code.

The output generated using this coding then looks as follows:

[test line]

[ before test middle test end. ]

[This is a test for an alias text]