ABAP read_text 使用 快速开始
PERFORM frm_read_text USING 'B01' lv_name 'EBANH' CHANGING ls_ZMMS001d-txz01.
FORM frm_read_text USING fid fname fobject CHANGING c_text.
DATA:lv_str TYPE string.
DATA : lv_tdname LIKE thead-tdname.
DATA: lt_tline TYPE TABLE OF tline.
DATA: ls_tline TYPE tline.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = fid " 文本ID的值
language = sy-langu " 语言的值 1表示中文
name = fname " 文本名的值
object = fobject " 文本对象的值
TABLES
lines = lt_tline
EXCEPTIONS
" EXCEPTIONS必须写,否则表头文本为空时程序将dump
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
ELSE.
LOOP AT lt_tline INTO ls_tline.
CONCATENATE lv_str ls_tline-tdline INTO lv_str.
ENDLOOP.
ENDIF.
c_text = lv_str.
ENDFORM.