text를 읽어와서 textedit에 뿌려주는 코딩인데요.. 맨아래 set_selection_indexes 메서드의 기능에 대해서 알고 싶습니다.


 


그럼 수고요.


 


  DATA : l_lines  TYPE tline.
  SELECT SINGLE * FROM stxh INTO stxh
            WHERE tdobject = g_header-tdobject
              AND tdname   = g_header-tdname
              AND tdid     = g_header-tdid
              AND tdspras  = sy-langu.
  IF sy-subrc NE 0.
    EXIT.
  ENDIF.


  CALL FUNCTION 'READ_TEXT'
    EXPORTING
      client   = sy-mandt
      id       = g_header-tdid
      language = sy-langu
      name     = g_header-tdname
      object   = g_header-tdobject
    IMPORTING
      header   = g_header
    TABLES
      lines    = g_lines.


*
  LOOP AT g_lines INTO l_lines.


    l_lines-tdformat = '*'.
    REPLACE '*' WITH '' INTO l_lines-tdline.
    MODIFY g_lines FROM l_lines.
  ENDLOOP.


  IF NOT g_lines[] IS INITIAL.


    CALL FUNCTION 'CONVERT_ITF_TO_STREAM_TEXT'
      TABLES
        itf_text    = g_lines
        text_stream = text_table.
*
  CALL METHOD editor->set_selected_text_as_R3TABLE
      EXPORTING
        TABLE = text_table.



*    CALL METHOD editor->set_selected_text_as_stream
*      EXPORTING
*        selected_text = text_table.


    CALL METHOD editor->set_selection_indexes
      EXPORTING
        from_index = 1
        to_index   = 1.

ENDIF.