[转]How to read long texts

Long texts - How to read them
In table STXH you can find the parameters for the function module in fields
TDOBJECT for parameter OBJECT
TDIS  for parameter ID
TDNAME  for parameter NAME
TDSPRAS  for parameter LANGUAGE

The NAME parameter is the key for the text, e.g. customer no + order number
REPORT ZHFRA_TEST .
*********************************************************
* Shows how get long texts as for example Sales Text.
*********************************************************
DATA: I_LINES LIKE TLINE OCCURS 0 WITH HEADER LINE.
DATA: W_HEADER LIKE  THEAD.

START-OF-SELECTION.
CALL FUNCTION 'READ_TEXT'
     EXPORTING
          ID                              = '0001'
          LANGUAGE             = 'E'
          NAME                       = '000000003515230010600000'
          OBJECT                   = 'MVKE'
    IMPORTING
         HEADER                    =  W_HEADER
    TABLES
         LINES                        = I_LINES
     EXCEPTIONS
          ID                              = 1
          LANGUAGE            = 2
          NAME                      = 3
          NOT_FOUND        = 4
          OBJECT                 = 5
          REFERENCE_CHECK                       = 6
          WRONG_ACCESS_TO_ARCHIVE = 7
          OTHERS                                              = 8.
END-OF-SELECTION.

* i_lines will have an entry for every text line
LOOP AT I_LINES.
  WRITE:/ I_LINES-TDLINE.
ENDLOOP.

posted @ 2009-06-30 12:44  永恒de影シ  阅读(241)  评论(0编辑  收藏  举报