Read text sales order header VA03

Some time requirement to read text to header level in sap abap for this purpose we can write below
Code read text va03


************************************************************ Reading text in sap abap programming language *******************************************

DATA:
      tdname LIKE stxl-tdname,
     myline LIKE tline-tdline,
     ze13_line(200TYPE c,
     lv_value TYPE LENGTH 142.

DATABEGIN OF lines OCCURS 0.
        INCLUDE STRUCTURE tline.
DATA:END OF lines.

DATA:BEGIN OF myheader.
        INCLUDE STRUCTURE thead.
DATA:END OF myheader.



CALL FUNCTION 'READ_TEXT'
  EXPORTING
    client                  sy-mandt
    id                      '1001'     " id for text 
    language                sy-langu
    name                    '1300000001' "tdname " sales order Number 
    object                  'VBBK'
  IMPORTING
    header                  myheader
  TABLES
    lines                   lines " here fill the your text 
  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 lines.
    MOVE lines-tdline(132TO lv_value.
    EXIT.
  ENDLOOP.
ENDIF.

Comments

Popular posts from this blog

all user exit mv45afzz (implicit user exit )

How to Give Dropdown in alv report in sap abap programming Language

Long Text in input and output field in module pool