|
|
PS模块利用READ_TEXT取长文本例子。
DATA: TXT002 TYPE TLINE-TDLINE,"特殊情况说明
DATA: TEXT6_HEADER LIKE THEAD,
TEXT6_LINES LIKE TLINE OCCURS 0 WITH HEADER LINE.
*特殊情况说明
text6_header-tdobject = 'PMS'.
text6_header-tdname(3) = 'ZPD'.
text6_header-tdname+3 = I_PRIDATA-PSPNR.
text6_header-tdid = 'LTXT'.
text6_header-tdspras = sy-langu.
text6_header-tdfuser = sy-uname.
text6_header-tdfdate = sy-datum.
text6_header-tdftime = sy-uzeit.
text6_header-tdlinesize = '072'.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = text6_header-tdid
language = text6_header-tdspras
name = text6_header-tdname
object = text6_header-tdobject
IMPORTING
header = text6_header
TABLES
lines = text6_lines
EXCEPTIONS
not_found = 1.
IF sy-subrc = 0.
LOOP AT text6_lines.
I_PRIDATA-TXT002 = text6_lines-TDline.
ENDLOOP.
ENDIF. |
|