Long Text examples

EBAN (requisition long text)

BELEG (jv long text)

PMS (project & wbs long descriptions - any wbs name that is longer than 40 characters)

VBBP (billing items long text)


SAP stores comments (text fields) in a separate table. STXH is the text
"header" table (STXD SAPscript text file header). STXH-TDOBJECT =
'EBAN' will bring back all the requisition line item comment
headers. STXH-TDNAME='001000026000010' is the header record for
the comment for requisition 0010000260, line item 00010.

Use program ZCAFTXT to test long comment logic. It requires a row, ID &
table (STXH-TDNAME, STXH-TDID & STXH-TDOBJECT).

The following code is a function that will return a requisition line item
comment.


TABLES:  EBAN, THEAD.
DATA: BEGIN OF TLINETAB OCCURS 100.    "table to process comments
        INCLUDE STRUCTURE TLINE.
DATA: END OF TLINETAB.
DATA: TDNAME           LIKE THEAD-TDNAME.
START-OF-SELECTION.
  TDNAME = '001000026000010'.
  PERFORM GET_COMMENT USING TDNAME.
*---------------------------------------------------------------------*
*       FORM GET_COMMENT                                              *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
FORM GET_COMMENT USING CUR_REQLINE.
  CALL FUNCTION 'READ_TEXT'
       EXPORTING
            ID                      = 'B01          "get this info from STXH-TDID
            LANGUAGE                = SY-LANGU
            OBJECT                  = 'EBAN'
            NAME                    = CUR_REQLINE
       IMPORTING
            HEADER                  = THEAD
       TABLES
            LINES                   = TLINETAB
       EXCEPTIONS
            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.
    LOOP AT TLINETAB.
      WRITE / TLINETAB-TDLINE.
    ENDLOOP.
  ENDIF.

ENDFORM.

The following is what is returned from the above program:



99 b/w pages, 8.5"x11", perfectbound, reduce all pgs by
77% to fit 2-to-page, landscape/book format, 60 lb Eastern
opaque recycle paper. 4 page cover on 65 lb Hammermill
cool blue.


JV's Explanation Text

STXH holds the header data. The line item data is stored in a cluster table. READ_TEXT imports the data with the following command:

import tline to rt_lines
from database stxl(tx)
client rt_client
id stxl_id.

For the "correspondence" text associated with our JVs (explanation text), STXL_ID would contain:

STXL_ID-TDOBJECT = BELEG
STXL_ID-TDNAME = CUR 01018433992004
STXL_ID-TDID = 0001
STXL_ID-TDSPRAS = E


Billing Document Line Item long text (VBBP)

STXL_ID-TDOBJECT = VBBP
STXL_ID-TDNAME = 0090103342000010 (billing doc number & line item number)
STXL_ID-TDID = RB02
STXL_ID-TDSPRAS = E

billing items long text


Carolyn Fuller
fuller@mit.edu

Made with Macintosh .................... CAO Home Page