Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Language Environment →  Language Settings →  Text Environment Language and Text Environment 

Setting the Text Environment

This example demonstrates how to set the text environment explicitly.

Other versions: 7.31 | 7.40 | 7.54

Source Code

    DATA text_tab TYPE HASHED TABLE OF string
                       WITH UNIQUE KEY table_line.

    text_tab = VALUE #(
      ( `Cudar Vilmos`  )
      ( `Csernus G�bor` ) ).

    SET LOCALE LANGUAGE 'E'.
    SORT text_tab AS TEXT.
    cl_demo_output=>write( text_tab ).

    SET LOCALE LANGUAGE 'H'.
    SORT text_tab AS TEXT.
    cl_demo_output=>write( text_tab ).

    SET LOCALE LANGUAGE ' '.
    cl_demo_output=>display( ).

Description

This example shows the effect of the locale of the text environment on sort functions. In Hungarian text environments, "Cs" and "Cu" are sorted differently than in English environments.