Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Regarding cl_gui_textedit

Hi Experts,

I am using the class cl_gui_textedit to get a text window thereby I can get a multiline input field.

My problem is I don't want the first row ( which contains the options 'load local file' ,'save as local file' options) and last rows (which displays the line number and column number) .Is there any means?

Thanks & regards,

Soumya.

Tags:
Former Member replied

try this code

IF init is initial.
    init = 'X'.
*    CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT',
*                   editor    EXPORTING parent = container.


CREATE OBJECT CONTAINER
  EXPORTING
*    PARENT                      =
    CONTAINER_NAME              = 'TEXTEDIT'
*    STYLE                       =
*    LIFETIME                    = lifetime_default
*    REPID                       =
*    DYNNR                       =
*    NO_AUTODEF_PROGID_DYNNR     =
*  EXCEPTIONS
*    CNTL_ERROR                  = 1
*    CNTL_SYSTEM_ERROR           = 2
*    CREATE_ERROR                = 3
*    LIFETIME_ERROR              = 4
*    LIFETIME_DYNPRO_DYNPRO_LINK = 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.


CREATE OBJECT EDITOR
  EXPORTING
*    MAX_NUMBER_CHARS       =
*    STYLE                  = 0
*    WORDWRAP_MODE          = 0
*    WORDWRAP_POSITION      = -1
*    WORDWRAP_TO_LINEBREAK_MODE = FALSE
*    FILEDROP_MODE          = DROPFILE_EVENT_OFF
    PARENT                 = container
*    LIFETIME               =
*    NAME                   =
*  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.

<b>CALL METHOD EDITOR->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.</b>
<b>CALL METHOD EDITOR->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.</b>
  ENDIF.
  CALL METHOD editor->set_text_as_stream EXPORTING text = text_tab.

In your PBO

regards

shiba dutta

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question