Show TOC

Function documentationGET_FIELD_LABEL Locate this document in the navigation structure

 

Method GET_FIELD_LABEL of service object (RUNTIME->DDIC_UTILS) returns the Label for an elementary data object with dictionary reference. The longest of the

Field Labels are returned to the relevant data element as label.

Features

Parameters and Exceptions

Importing Parameter:

DATA_OBJECT_REF

Reference to a data object

LANGU

Language (optional) with default SYST-LANGU

Returning Parameter:

LABEL

Field Label

Exceptions:

CX_BSP_SERVICES_PARAM

CX_BSP_SERVICES_NOTFOUND

Example

Page Attribute

Attribute

Auto

Type

Reference Type

Description

carrid_title

TYPE

STRING

Short Text

carrid_label

TYPE

STRING

Label

carrid_value

TYPE

STRING

Value

Event OnInitialization

Syntax Syntax

  1. * declaration
    
    data: dataref type ref to data.
    
    data: flightstruct type sflight.
    
    
    
    * get label for connid
    
    * get data reference from variable
    
    get reference of flightstruct-connid into dataref.
    
    
    
    try.
    
        connid_label = runtime->ddic_utils->get_field_label(
    
                      data_object_ref = dataref langu = langu_select ).
    
    catch cx_bsp_services into l_ex_services.
    
    *   catch exception into message object
    
        errortext = l_ex_services->get_text( ).
    
        call method page->messages->add_message
    
             exporting condition = 'CONNID_LABEL'
    
                       message = errortext
    
                       severity = CL_BSP_MESSAGES=>CO_SEVERITY_ERROR.
    
        connid_label = 'CONNID_LABEL'.
    
    endtry.
    
    * get label for carrid
    
    * fill data reference
    
    get reference of flightstruct-carrid into dataref.
    
    
    
    try.
    
        carrid_label = runtime->ddic_utils->get_field_label(
    
                       data_object_ref = dataref langu = langu_select ).
    
    catch cx_bsp_services into l_ex_services.
    
    *   catch exception into message object
    
        errortext = l_ex_services->get_text( ).
    
        call method page->messages->add_message
    
             exporting condition = 'CARRID_LABEL'
    
                       message = errortext
    
                       severity = CL_BSP_MESSAGES=>CO_SEVERITY_ERROR.
    
        carrid_label = 'CARRID_LABEL'.
    
    endtry.
    
End of the source code.
Layout

Syntax Syntax

  1. <%-- text input with label and quickinfo --%>
    
    <span title=" <%=carrid_title%> "> <%=carrid_label%> </span>&nbsp; 
    
    <input type=text name="carrid_select" value="carrid_label">
    
    <%-- table with labels and quickinfo as column header --%>
    
    <table class="bspTbvStd" cellpadding = "4">
    
       <tr class="bspTbvHdrStd">
    
    <th><span title=" <%=carrid_title%> "> <%=carrid_label%></span></th>
    <th><span title=" <%=connid_title%> "> <%=connid_label%></span></th>
    
    </tr>
    
    </table>
    	
End of the source code.