Pages

Showing posts with label Text in Module pool. Show all posts
Showing posts with label Text in Module pool. Show all posts

Tuesday, July 10, 2012

Display Text in Module pool screen

  DATAobj_cont1 TYPE REF TO cl_gui_custom_container,
        obj_cont2 TYPE REF TO cl_gui_custom_container,
        obj_cont3 TYPE REF TO cl_gui_custom_container,
        obj_cont4 TYPE REF TO cl_gui_custom_container,
        obj_cont5 TYPE REF TO cl_gui_custom_container,
        obj_editor1 TYPE REF TO cl_gui_textedit,
        obj_editor2 TYPE REF TO cl_gui_textedit,
        obj_editor3 TYPE REF TO cl_gui_textedit,
        obj_editor4 TYPE REF TO cl_gui_textedit,
        obj_editor5 TYPE REF TO cl_gui_textedit.




MODULE fill_text_ycsmg OUTPUT.

  IF obj_editor1 IS NOT BOUND.
    CREATE OBJECT obj_cont1
      EXPORTING
        container_name 'LINK_CONT'.
    CREATE OBJECT obj_editor1
      EXPORTING
        parent obj_cont1.

    CALL METHOD obj_editor1->set_selected_textstream
      EXPORTING
        selected_text                 'To facilitate manual movements of components within the multilevel structures (Material BOM) of the product. Instead of several-step process with usage of standard transactions such as CS02 or CEWB.'
*       enable_editing_protected_text = false
      EXCEPTIONS
        error_cntl_call_method        1
        not_supported_by_gui          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 obj_editor1->set_toolbar_mode
      EXPORTING
        toolbar_mode 0.
    CALL METHOD obj_editor1->set_readonly_mode
      EXPORTING
        readonly_mode 1.
    CALL METHOD obj_editor1->set_statusbar_mode
      EXPORTING
        statusbar_mode 0.

  ENDIF.

ENDMODULE.    





**************************
  CASE sy-ucomm.
    WHEN 'LINK'.
      CALL TRANSACTION 'YCSMG'."Link Transfer WB
    WHEN 'YCAPPH'."Allocation of S-Note comp
      CALL TRANSACTION 'YCAPPH'.
    WHEN 'YCASNH'."Manage of S-Note Comp
      CALL TRANSACTION 'YCASNH'.
    WHEN 'REPLACE'.
      SUBMIT yrep_kola_modify_linkid VIA SELECTION-SCREEN AND RETURN.
    WHEN 'UNREPLACE'.
      SUBMIT yrep_kola_modify_link_undo VIA SELECTION-SCREEN AND RETURN.
    WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
      LEAVE TO SCREEN 0.
  ENDCASE.