Variante 1 (einzelner Feldwert)
DATA: lv_text TYPE text255.
DATA: lv_found TYPE flag_x.
DATA: it_identifier TYPE txid_t_text_identifier_result.
TRY.
DATA(o_text) = NEW cl_text_identifier( ).
* Text für EBAN-STATU zu Feldwert 'B' holen
o_text->read_text( EXPORTING
tabname = 'EBAN' " Tabelle
fieldname = 'STATU' " Feld
fieldvalue = 'B' " Feldwert
IMPORTING
text = lv_text
text_for_value_read = lv_found
text_identifier_results = it_identifier ).
IF lv_found = abap_true.
* gefundenen Text ausgeben
WRITE: / lv_text.
LOOP AT it_identifier ASSIGNING FIELD-SYMBOL(<i>).
WRITE: / <i>-tabname, <i>-fieldname, <i>-fieldvalue, <i>-text.
ENDLOOP.
ENDIF.
CATCH cx_root INTO DATA(e_txt).
WRITE: / e_txt->get_text( ).
ENDTRY.
Variante 2 (Datensatz)
PARAMETERS: p_banf TYPE eban-banfn OBLIGATORY.
START-OF-SELECTION.
* Datensatz holen
DATA: lv_eban TYPE eban.
SELECT SINGLE * FROM eban INTO lv_eban WHERE banfn EQ p_banf.
IF sy-subrc = 0.
DATA: lv_text TYPE text255.
DATA: lv_found TYPE flag_x.
DATA: it_identifier TYPE txid_t_text_identifier_result.
TRY.
* Datensatz: Text zu Feld 'STATU' holen
DATA(o_text) = NEW cl_text_identifier( ).
o_text->read_text( EXPORTING
tabname = 'EBAN' " Tabelle
fieldname = 'STATU' " Feld
record = lv_eban " Struktur mit Wert für EBAN-STATU
record_specified = abap_true
IMPORTING
text = lv_text
text_for_value_read = lv_found
text_identifier_results = it_identifier ).
IF lv_found = abap_true.
* gefundenen Text ausgeben
WRITE: / lv_text.
LOOP AT it_identifier ASSIGNING FIELD-SYMBOL(<i>).
WRITE: / <i>-tabname, <i>-fieldname, <i>-fieldvalue, <i>-text.
ENDLOOP.
ENDIF.
CATCH cx_root INTO DATA(e_txt).
WRITE: / e_txt->get_text( ).
ENDTRY.
ENDIF.