Function Returns the label for an attribute
Example mylabel =
s10fieldlabel( "kunnr" ).
Format data:
  myattrname type string,
  mymaxlen type i,
  mylabel type string.

mylabel =
  s10fieldlabel(
    exporting
      attrname = myattrname
      maxlen = mymaxlen ).
Parameters
Name Type Description
attrname string
Attribute name
maxlen i
Maximum label width
label string
Field label
Description The method s10fieldlabel() is automatically called by the S10 Framework if the classes "label" and "output" are specified in HTML for a column heading. Through s10fieldlabel(), the default label from the SAP Data Dictionary is read and displayed. Example:

HTML
<
span class="output label"
name="pstlz"> </span><br>
<span class="output" name="pstlz"> </span>

Optionally, you can also work with the suffix "@label", which is then generally effective for class "output" even without the class "label".

HTML
<
span class="output"
name="pstlz@label"> </span>
<span class="output" name="pstlz"> </span>

In the SAP Data Dictionary the field label is stored in three lengths; s10fieldlabel() always returns the longest label. By specifying a maximum length in brackets after @label, you can select a shorter field label instead. Example:

HTML
<
span class="output label"
name="pstlz@label(10)"> </span><br>
<span class="output" name="pstlz"> </span>

For class attributes without reference to the Data Dictionary, or if you want to have a name that differs from the Data Dictionary, you can specify the field label directly in HTML. In this case, do not specify the class "output" and omit the name= attribute. Example:

HTML
<
span class="label"
>ZIP code</span><br>
<span class="output" name="pstlz"> </span>


 

Components S10 Framework