Skip to Content
0
Former Member
Dec 04, 2008 at 07:10 AM

Regarding cl_ui_textedit=>set_text_as_r3table

32 Views

Hi my requirement is to dispaly the text in dynpro scren through custom container,

for that i have designed as below....the ting is i am not getting the text i am passing to the internal table text_tab_qus.

Please look in to the code below

DATA: custom_container_qus TYPE REF TO cl_gui_custom_container,
          editor_qus TYPE REF TO cl_gui_textedit.

DATA: line(256) TYPE c,
      text_tab_qus  LIKE STANDARD TABLE OF line,
      field LIKE line.


  CLEAR: text_tab_qus.
   
  READ TABLE it_zquiz_bank INTO wa_zquiz_bank INDEX p_tabix.

   APPEND  wa_zquiz_bank-zquetion TO text_tab_qus.

  PERFORM initialize_control.  

FORM initialize_control .
  IF editor_qus IS INITIAL.
    repid = sy-repid.
    CREATE OBJECT custom_container_qus
       EXPORTING
          container_name = 'CONTAINER_QUS'
       EXCEPTIONS
          cntl_error = 1
          cntl_system_error = 2
          create_error = 3
          lifetime_error = 4
          lifetime_dynpro_dynpro_link = 5.
    CREATE OBJECT editor_qus
    EXPORTING
       parent = custom_container_qus
       wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
       wordwrap_position = c_line_length
       wordwrap_to_linebreak_mode = cl_gui_textedit=>true
       style = 0
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    gui_type_not_supported = 5
    OTHERS = 6.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

    CALL METHOD editor_qus->set_statusbar_mode
      EXPORTING
        statusbar_mode         = 0
      EXCEPTIONS
        error_cntl_call_method = 1
        invalid_parameter      = 2
        OTHERS                 = 3.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

    CALL METHOD editor_qus->set_toolbar_mode
      EXPORTING
        toolbar_mode           = 0
      EXCEPTIONS
        error_cntl_call_method = 1
        invalid_parameter      = 2
        OTHERS                 = 3.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

 CALL METHOD editor_qus->set_readonly_mode
      EXPORTING
        readonly_mode          = cl_gui_textedit=>true
      EXCEPTIONS
        error_cntl_call_method = 1
        invalid_parameter      = 2
        OTHERS                 = 3.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
CALL METHOD editor_qus->set_text_as_r3table
  EXPORTING
    TABLE           = text_tab_qus
  EXCEPTIONS
    ERROR_DP        = 1
    ERROR_DP_CREATE = 2
    others          = 3
        .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

    CALL METHOD cl_gui_cfw=>flush.

  ENDIF.                "editor is initial


Edited by: sugunav on Dec 4, 2008 1:11 PM