Skip to Content
0
Former Member
Dec 23, 2008 at 12:48 AM

READ_TEXT to get all HEADER_TEXT text.

10 Views

Hi all,

I am working on READ_TEXT function call to get the HEADER_TEXT.

The requirement needs me to get the whole text in HEADER_TEXT.

Let's say the HEADER_TEXT in VF03 is

*blank line*
Contact at customer:
myahsam wong

How could I program to get all the 3 lines text to be displayed in the form?

GV_HEADER_NOTE is my global variable to display in form.

Below are my code:

    call function 'READ_TEXT'
         exporting
              id                      = '0001'
              language                = 'D'
              name                    = lf_txt_name
              object                  = 'VBBK'
         tables
              lines                   = lt_lines
         exceptions
              id                      = 0
              language                = 0
              name                    = 0
              not_found               = 0
              object                  = 0
              reference_check         = 0
              wrong_access_to_archive = 0
              others                  = 0.
  endif.

  check not lt_lines[] is initial.
  
  LOOP at lt_lines.
    read table lt_lines into gv_header_note index 1.
  
    str_len = strlen( gv_header_note ).
    len = str_len - 2.
    IF len > 0.
      gv_header_note = gv_header_note+2(len).
    ENDIF.

Thanks in advance.