可以在表STXH查询id、name、object、spras等资料
效果:
代码:
*&---------------------------------------------------------------------* *& Report ZPPRTEST *&---------------------------------------------------------------------* *& *&---------------------------------------------------------------------* REPORT ZPPRTEST. DATA: l_aufnr TYPE aufnr VALUE '20035644', l_name TYPE tdobname, lt_lines LIKE TABLE OF tline, l_text TYPE string. "前置补0 l_aufnr = |{ l_aufnr ALPHA = IN }|. CONCATENATE sy-mandt l_aufnr INTO l_name. CALL FUNCTION 'READ_TEXT' EXPORTING id = 'KOPF' language = sy-langu name = l_name object = 'AUFK' TABLES lines = lt_lines[] EXCEPTIONS id = 1 language = 2 name = 3 not_found = 4 object = 5 reference_check = 6 wrong_access_to_archive = 7 OTHERS = 8. LOOP AT lt_lines INTO DATA(ls_line). CONCATENATE l_text ls_line-tdline INTO l_text. ENDLOOP. WRITE: l_text.