Text Editor check syntax

Hi, currently I have a text editor. I need to check the abap syntax that users key inside the text editor. how can I do that?
please provide codes.
thanks. will reward points if useful.

Get all the code in the text editor into an internal table, then use statement
SYNTAX-CHECK FOR itab MESSAGE mess LINE lin WORD wrd
                 [PROGRAM prog] [DIRECTORY ENTRY dir]
                 [WITH CURRENT SWITCHSTATES]
                 [error_handling].
See example program below:
DATA: itab TYPE STANDARD TABLE OF string,
      mess TYPE string,
      lin  TYPE i,
      wrd  TYPE string,
      dir  TYPE trdir.
APPEND 'PROGRAM test.'                  TO itab.
APPEND 'DATA dat TYPE d.'               TO itab.
APPEND 'DATA len TYPE i.'               TO itab.
APPEND 'DESCRIBE FIELD dat LENGTH len.' TO itab.
SELECT SINGLE *
       FROM trdir
       INTO dir
       WHERE name = sy-repid.
dir-uccheck = ' '.
SYNTAX-CHECK FOR itab MESSAGE mess LINE lin WORD wrd
             DIRECTORY ENTRY dir.
IF sy-subrc = 4.
  MESSAGE mess TYPE 'I'.
ENDIF.
dir-uccheck = 'X'.
SYNTAX-CHECK FOR itab MESSAGE mess LINE lin WORD wrd
             DIRECTORY ENTRY dir.
IF sy-subrc = 4.
  MESSAGE mess TYPE 'I'.
ENDIF.
Hope this helps,
Cheers,
Sougata.

Similar Messages

  • Text Editor & ABAP Syntax Check

    Hi all,
    I've included a text editor box into my project to allow the user to key in ABAP codes. i got the codes of a sample program but i'm not sure how it works. can anyone kind enough to explain to me how to add buttons or assign functions to the buttons?
    secondly, because i allow free-text for the user to key in ABAP codes, is there a function to check the syntax of the codes entered by the user?
    i'll reward handsomely for any help rendered and it will be better if you could include sample codes as well(:
    thanks!!! (:
    SAMPLE CODE FOR TEXT EDITOR:
    IF CODE_EDITOR IS INITIAL.
        CREATE OBJECT CODE_EDITOR_CONTAINER
           EXPORTING
             CONTAINER_NAME = 'GEN_CODE'
           EXCEPTIONS
             CNTL_ERROR = 1
             CNTL_SYSTEM_ERROR = 2
             CREATE_ERROR = 3
             LIFETIME_ERROR = 4
             LIFETIME_DYNPRO_DYNPRO_LINK = 5.
        CREATE OBJECT CODE_EDITOR
          EXPORTING
            PARENT = CODE_EDITOR_CONTAINER
            WORDWRAP_MODE =
            CL_GUI_TEXTEDIT=>WORDWRAP_OFF
              CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
            CL_GUI_TEXTEDIT=>WORDWRAP_AT_WINDOWBORDER
            WORDWRAP_POSITION = G_EDITOR_LENGTH
            WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.
    ENDIF.
    Edited by: Leslie Koh on Jan 18, 2008 4:28 AM

    Hi Leslie
    There is a abap key word which may help your purpose to do the syntax check. Please check the key work "SYNTAX-CHECK FOR itab " to be more in details,
    Basic form :
    SYNTAX-CHECK FOR itab ...MESSAGE f ...LINE g ...WORD h.
    Extras:
    1. ... PROGRAM f1
    2. ... INCLUDE f2
    3. ... OFFSET  f3
    4. ... TRACE-TABLE itab1
    5. ... DIRECTORY ENTRY f4
    6. ... REPLACING f5
    7. ... FRAME ENTRY f6
    8. ... MESSAGE-ID f7
    9. ... ID id TABLE itab2
    10.... SHORTDUMP-ID f8
    11.... FILTER f9
    This syntax will help you to check the syntax errors of ABAP program passed as internal table. You can get the entries keyed in by user in editor control through class method CL_GUI_TEXTEDIT->GET_TEXT_AS_R3TABLE in your PAI.
    Hope this helps !
    Kind Regards
    Ranganath

  • Macintosh Java text Editors

    I have been looking for a good macintosh Java text editor for my newphew. His high school is primary macintosh (Mac OS X) workstation based, therefore in order to code/learn Java, he understands that he can use a simple text editor.
    Is there a good text editor for the macintosh? Maybe a comparison is BBEdit for web site development, something with that power.
    Or is there a better simple editor in the terminal he can use?
    Thank you for reading this post.

    You can use TextEdit in plain text mode, or you can go to http://developer.apple.com/ and get Apple's free Project Builder IDE of OS X10.2, which works OK most the time as a text editor with syntax highlighting, but I've found tends to fall over when you try to debug; I've just ordered OS X 10.3 which comes with XCode, which looks prettier, and may even work.
    For the one or two class examples I post here, I use project builder as a text editor, and compile from the terminal. For larger projects, I use project builder but have to be disciplined about saving regularly.
    I've also used J (http://sourceforge.net/projects/armedbear-j/), though mainly under linux on a slow laptop, which is quite fast and lightweight, and being Java portable. I will go try it on the Mac forthwith.
    Pete

  • Emendo text editor

    Emendo is a simple Gtk+3 text editor with syntax highlighting written in Vala.
    Changelog and screenshots here
    Homepage:
    https://bitbucket.org/simargl/emendo
    AUR:
    https://aur.archlinux.org/packages/emendo
    AUR package changed, so it will always use latest hg source,
    bitbucket repository merged with https://bitbucket.org/simargl/alphaos
    https://bbs.archlinux.org/viewtopic.php?id=173563
    Last edited by simargl (2013-11-28 11:35:35)

    * 2.0.3 *
    - Added Preferences dialog
    - use ColorSelectionDialog instead of ColorChooserDialog
    for comparison
    http://valadoc.org/#!api=gtk+-3.0/Gtk.C … tionDialog
    http://valadoc.org/#!api=gtk+-3.0/Gtk.C … oserDialog
    If you had Emendo already installed, before starting new version remove configuration directory $HOME/.config/emendo.
    Last edited by simargl (2013-10-26 15:33:01)

  • Text editor syntax check

    Is it possible to do a syntax check on my text editor when the save button is clicked?
    I saw posts of syntax check but they seemed to only check syntax on programs and not text in text editor. If it is possible to do so with text editor, codes examples and explanation is appreciated

    well friend there is nothin like checking syntax in text editor because whatever wrong syntax u gonna write will be treated as text apart from code.
    so there is no separate checking for them but yesthere are some simple things that can b checked for example u must have seen in old editor of script that left side has got only some fixed values like /: , =, * , and paragraph format but here also if u choose  invalid paragraph format then also ur default paragraph will work and no syntax error occurs.
    plz reward if helpful,
    keep rockin
    vivek

  • Problem with adding text to a syntax document

    Hello,
    I am trying to write an editor with syntax highlighting option.
    The syntax document works fine but on a slow computer
    after loading a huge document it is impossible to write fluently.
    I think the method highlightKeyword() is not the problem because it highlights still only one line.
    The problem seems to be the rootElement.Has anybody an idea how to make the rootElement faster
    working?
    I also tried to use threads (such as http://ostermiller.org/syntax/editor.html) for inserting text, but then the document is highlighted very slowly.
    Can anybody help me?
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    public class SyntaxTest extends DefaultStyledDocument
         Element rootElement;
         String wordSeparators = ",:;.()[]{}+-/*%=<>!&|~^@? ";
         Vector keywords = new Vector();;
         SimpleAttributeSet keyword;
         public SyntaxTest()
              rootElement= this.getDefaultRootElement();
              keyword = new SimpleAttributeSet();
              StyleConstants.setForeground(keyword, Color.blue);
              keywords.add( "abstract" );
              keywords.add( "boolean" );
              keywords.add( "break" );
              keywords.add( "byte" );
              keywords.add( "case" );
              keywords.add( "catch" );
              keywords.add( "char" );
              keywords.add( "class" );
              keywords.add( "continue" );
              keywords.add( "default" );
              keywords.add( "do" );
              keywords.add( "double" );
              keywords.add( "else" );
              keywords.add( "extends" );
              keywords.add( "false" );
              keywords.add( "final" );
              keywords.add( "finally" );
              keywords.add( "float" );
              keywords.add( "for" );
              keywords.add( "if" );
              keywords.add( "implements" );
              keywords.add( "import" );
              keywords.add( "instanceof" );
              keywords.add( "int" );
              keywords.add( "interface" );
              keywords.add( "long" );
              keywords.add( "native" );
              keywords.add( "new" );
              keywords.add( "null" );
              keywords.add( "package" );
              keywords.add( "private" );
              keywords.add( "protected" );
              keywords.add( "public" );      
              keywords.add( "return" );
              keywords.add( "short" );
              keywords.add( "static" );
              keywords.add( "super" );
              keywords.add( "switch" );
              keywords.add( "synchronized" );
              keywords.add( "this" );
              keywords.add( "throw" );
              keywords.add( "throws" );
              keywords.add( "true" );
              keywords.add( "try" );
              keywords.add( "void" );
              keywords.add( "volatile" );
              keywords.add( "while" );
         public void insertString(int offset, String str, AttributeSet a) throws BadLocationException
              super.insertString(offset, str, a);
              int startOfLine = rootElement.getElement(rootElement.getElementIndex(offset)).getStartOffset();
              int endOfLine = rootElement.getElement(rootElement.getElementIndex(offset+str.length())).getEndOffset() -1;
              //highlight the changed line
              highlightKeyword(this.getText(0,this.getLength()), startOfLine, endOfLine);
         public void remove(int offset, int length) throws BadLocationException
              super.remove(offset, length);
              int startOfLine = rootElement.getElement(rootElement.getElementIndex(offset)).getStartOffset();
              int endOfLine = rootElement.getElement(rootElement.getElementIndex(offset+length)).getEndOffset() -1;
              //highlight the changed line
              highlightKeyword(this.getText(0,this.getLength()), startOfLine, endOfLine);
         public void highlightKeyword(String content,int startOffset, int endOffset)
              char character;
              int tokenEnd;
              while (startOffset < endOffset)
                   tokenEnd = startOffset;
                   //find next wordSeparator
                   while(tokenEnd < endOffset)
                   character = content.charAt(tokenEnd);
                        if(wordSeparators.indexOf(character) > -1)
                             break;
                        else
                             tokenEnd++;                    
                   //check for keyword
         String token = content.substring(startOffset,tokenEnd).trim();
                        if(keywords.contains(token))
                   this.setCharacterAttributes(startOffset, token.length(), keyword, true);
         startOffset = tokenEnd+1;
         public static void main(String[] args)
              JFrame f = new JFrame();
              JTextPane pane = new JTextPane(new SyntaxTest());
              JScrollPane scrollPane = new JScrollPane(pane);
              f.setContentPane(scrollPane);
              f.setSize(600,400);
              f.setVisible(true);

    I don't think the root element is the problem. Syntax highlighting is just plain slow for a large file. Here is an example, you can use for comparison purposes, that does [url http://www.discoverteenergy.com/files/SyntaxDocument.java]syntax highlighting. It is very slow when loading large files into the text pane, but works reasonably when modifying the contents of the text pane.

  • Sandy - a simple text editor

    sandy - a simple text editor
    Sandy is a X11 text editor with an easy-to-read, hackable C source. It uses GTK+ and GtkSourceView for convenience and is akin to surf, only it is a text editor, not a web browser. Sandy tries to maximize screen estate, minimize the SLOC used and not get in your way too much. It can somehow be controlled via XProperties and all preferences and keybindings are to be chosen at compile time. Two example configs are provided with the source.
    Features
    - Basic editing, saving, etc.
    - One document per instance
    - Embeddable (e.g. can use http://tools.suckless.org/tabbed for tabs)
    - Regex search, go to line functionalities
    - Pipe selection through arbitrary command
    - Pipe selection through predefined command(s)
    - Syntax highlighting
    - Line numbers, current line highlightnig
    - Simple autoindenting
    - Multi-level undo
    - Configurable at compile-time
    Dependencies
    - GtkSourceView2
    - Gtk+2
    - (probably) xorg-utils to get xprop to set XProperties
    - one method to grab user input: either zenity or dmenu in the pre-defined config files
    Screenshot
    http://sandyeditor.sf.net/sandy_editor.jpeg
    Homepage
    http://sandyeditor.sf.net/
    Download
    http://sourceforge.net/projects/sandyed … z/download
    AUR
    http://aur.archlinux.org/packages.php?ID=36084
    Comments, bug reports and patches welcome.
    Last edited by rafunchi (2010-04-13 23:24:26)

    Procyon wrote:
    It would be nice to be able to do something like this:
    1 abc
    2 dec
    3 abd
    4 edc
    5 {CURSOR}ad
    ^R, sed command: 1,3s/^/%%%/
    1 %%%abc
    2 %%%dec
    3 %%%abd
    4 edc
    5 {CURSOR}ad
    So you can edit and continue where you left off.
    The problem with implementing this behavior is 'sed' is an external command here. The full text is filtered through sed and put back in the buffer, not just lines 1 to 3. You can't just preserve the insert position as the text coming from the pipe might be completely different from your original. Same for searching the current line.
    You *could* remember your line+char position and move the cursor back there, but this would be highly unreliable and move the cursor to a third position in the buffer if your 's' command changes the number of lines (e.g. try s/:/\n/g in a password file)
    Also, a couple of tests with vim prove that it does not behave consistently in this regard, despite :s being an internal command there.
    if you really want to add '%%%' at the beginning of the line quite often, I suggest you define a binding or action for:
    t_editable, t_pipelines, { .v = (char *)"sed \'s/^/%%%/\'" }
    Then select the lines you want to target lousily (you don't need to select full lines) and launche the binding/action. It does move the cursor, but seems fairly quick.
    Procyon wrote:Maybe you can check for "/^s/" in the command to make it work on this current line, just like vim's :s///
    I made a wee change in the hg tip code. Now sandy "listens" to three properties regarding pipes:
    - _SANDY_PIPE: Pipes the selected text, or nothing by default as per f_pipe. This is used by the ^I binding in the default config.
    - _SANDY_PIPEALL: Pipes the selected text, or the full file if nothing is selected as per f_pipeall. This is used by the ^P binding in the default config.
    - _SANDY_PIPELINES: Pipes the selected text, extending the selection to full lines and matching the current line if there is no selection as per f_pipelines. This is used by the ^R binding in the default config. This means now sed is applied to full lines if there is a selection and to the current line if there is not.
    Thanks for your feedback. I hope this helps.

  • Displaying text editor

    Hello Experts,
    I have a pushbutton on a screen and clicking on that would display a text editor along with long text of that pushbutton.I dont know how to create container etc, so I am not able to make out how to solve this problem.Can anyone please help?

    hi priya,
    if your reqiurement says that i need to display text editor and save it to the internal table  then use
    the following code.
    TYPES: BEGIN OF ty_text,
             text(74)  ,
            END OF ty_text.
    DATA:
          t_terms  TYPE STANDARD TABLE OF ty_text with header line.
    EDITOR-CALL FOR t_terms.
    loop at t_terms.
    write t_terms-text.
    endloop.
    enter a valid text
    and press save .
    the data will be reflected back in your table.
    check for EDITOR-CALL syntax for other opeartions like display and giving your own title.

  • How to customize the Rich Text Editor task flow in the doc lib?

    Dear Experts in WCP forum,
    You know that webcenter portal has a feature is called customizing task flow.. so we have client request to customize the Rich Text Editor task flow of the Document library. Such as disable the Format, Font, Size drop down menu of the richtext editor UI.   But after I open the editHTML.jsff of the oracle.webcenter.doclib. the code is like this:
                        <f:facet name="richtext">
                               <af:panelGroupLayout layout="scroll" id="rtepng2">
                                  <rte:editor id="rte" value="#{pageFlowScope.rte.HTMLTextArea}" converter="#{pageFlowScope.rte.HTMLConverter}"/>
                                  <!-- keep region wrapped in the facet to be stretched-->
                                  <af:region value="#{bindings.linksResourcePicker.regionModel}" id="lpr"/>
                               </af:panelGroupLayout>
                            </f:facet>
    So likes that editor in fact is from <rte:editor tag.. my question is how to dig into this <rte:editor  to find its jsff code?  And change the menu inside to do the cusomization for them?
    Is that possible?
    A million thanks here in advance!
    wayne

    Based on the Tag TLD reference the editor tag has the following attributes:
    <tag>
        <description>An ADF Wrapper to use the CKeditor&gt;</description>
        <name>editor</name>
        <tag-class>oracle.webcenter.doclib.rte.internal.taglib.RteEditorTag</tag-class>
        <body-content>JSP</body-content>
        <attribute>
          <description>&lt;html&gt;the identifier for the component.  The identifier
    must follow a subset of the syntax allowed in HTML:
    &lt;ul&gt;
    &lt;li&gt;Must not be a zero-length String.&lt;/li&gt;
    &lt;li&gt;First character must be an ASCII letter (A-Za-z) or an underscore ('_').&lt;/li&gt;
    &lt;li&gt;Subsequent characters must be an ASCII letter or digit (A-Za-z0-9), an underscore ('_'), or a dash ('-').&lt;/li&gt;
    &lt;/ul&gt;&lt;/html&gt;</description>
          <name>id</name>
          <rtexprvalue>false</rtexprvalue>
        </attribute>
        <attribute>
          <description>The initial value of this component.</description>
          <name>value</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <deferred-value>
            <type>java.lang.String</type>
          </deferred-value>
        </attribute>
        <attribute>
          <description>a converter object</description>
          <name>converter</name>
          <deferred-value>
            <type>javax.faces.convert.Converter</type>
          </deferred-value>
        </attribute>
        <attribute>
          <description>
            this is a pass through to get/set the CKEditor ToolbarSet property
          </description>
          <name>toolbarSet</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <deferred-value>
            <type>java.lang.String</type>
          </deferred-value>
        </attribute>
        <attribute>
          <description>
            this is a pass through to get/set the CKEditor height property
          </description>
          <name>height</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <deferred-value>
            <type>java.lang.String</type>
          </deferred-value>
        </attribute>
        <attribute>
          <description>
            this is a pass through to get/set the CKEditor width property
          </description>
          <name>width</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <deferred-value>
            <type>java.lang.String</type>
          </deferred-value>
        </attribute>
      </tag>
    Which means that if you want to change the toolbar you have to check what is the type of toolbars the CKEditor uses, I can tell you that there are two defaults: Basic and Full and I believe the tag uses a custom toolbar called WC by default.
    So if you want to change the toolbar to only show basic, change the toolbarSet property to Basic to make the final result looks like <rte:editor id="rte" value="#{pageFlowScope.rte.HTMLTextArea}" converter="#{pageFlowScope.rte.HTMLConverter}" toolbarSet="Basic" />
    This is not tested, this is only a few insights I got reading about CKEditor

  • Text Editor -options

    Hi,
    I have been using text editor control.
    In this when we click load file button...an open prompt window appears..
    there we will be finding Files of type... dropdown..containing values like text(.txt) file and All file types..
    Is there any way to restrict this dropdown to single value..i mean to .txt file..should only be viewed omitting
    All files option in dropdown..
    i am using CL_GUI_TEXTEDIT..control...
    Is there any option to do it...
    Please Help me out.
    Thanks & Regards,
    Sandy.

    Hi Sandy,
    I don't think there is any method for this. As the dialog box opened is depending on your OS.
    But, you can cross check the uploaded file for  " .txt " using CP (contains pattern) function of string.
      DATA: xl type string.
      xl = '*.txt'.
      IF not P_FILE CP xl.  "P_FILE is name of file you will get.
    "Error"
    ENDIF.
    Sachin

  • Options - Text Editor - C/C++ missing intellisense entry. Intellisense not working

    Options -> Text Editor -> C/C++ missing intellisense entry.  Intellisense not working.    Solutions to turn options for the editor off and on are not working.  The intellisense entry is present for other languages,
    such as C#, but not C/C++.
    By not working, I mean the intellisense right click menu items are grayed out, and intellisense files are not produced.

    Hi JerroldBrody,
    Thank you for posting in MSDN forum.
    >>I mean the intellisense right click menu items are grayed out, and intellisense files are not produced.
    Based on your issue, could you please share me a screen shot about the intellisense right click menu items are grayed out?
    Generally, I know that it is default that we can enable the intellisense for C/C++ by going to the TOOLS->Options -> Text Editor -> C/C++ ->Advanced-> IntelliSense like the following screen shot.
    So please try to check if you set Disable Intellisense property as False in the VS IDE.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Text editor in Score module agonizingly clunky!  Fix?

    When creating scores from midi regions, the text editor drives me nuts when adding lyrics: The word/character positioning is different between text edit/create mode and what appears on the screen after editing, and different again between that and what appears in print preview mode or actual print-out. This is absolutely crazy-making when trying to line words/syllables up with their corresponding notations!
    Also the cut & paste functions don't work as in any other text editor I've seen.
    Also-also I can't get it to accept a new default font and size.
    Suggestions? Dr. Kevorkian's phone number?
    Thanks!

    Hi,
    it looks like you have some problem with RFC. It stopped on the following line:
    * Communication error in RFC-Call
    message x628(ke) with 'RFC_ERROR' subrc msg_text.
    Ask your basis guy to check it. The job on application server tried to connect to the central instance and it failed. The job run on central instance does not need to make any RFC call. Hence there is no problem in this case.
    Regards

  • Text Editor using cl_gui_textedit

    Hi,
    I need a text editor box on selection screen in display mode. and I'm using cl_gui_textedit class to get it.. but for some reason its not working.
    Here is the code below -
    report YLTEST1
           no standard page heading line-size 255.
    DATA: g_text_editor             TYPE REF TO cl_gui_textedit,
          g_text_container          TYPE REF TO cl_gui_custom_container,
          g_gen_text_editor         TYPE REF TO cl_gui_textedit,
          g_gen_text_container      TYPE REF TO cl_gui_custom_container.
      DATA: WORDWRAP_POSITION LIKE CL_GUI_TEXTEDIT=>M_WORDWRAP_POSITION.
      data: g_gen_txt_container       TYPE scrfname VALUE  'GENERAL_TEXT_FOR_REPS'.
      DATA: TEXT_TAB      TYPE STANDARD TABLE OF LINE.
    parameters: p_check.
    at selection-screen output.
    Create sales Text container
      WORDWRAP_POSITION = 100.
      IF G_GEN_TEXT_CONTAINER IS INITIAL.
            CREATE OBJECT:
                 G_GEN_TEXT_CONTAINER EXPORTING CONTAINER_NAME = G_GEN_TXT_CONTAINER,
                 G_GEN_TEXT_EDITOR    EXPORTING PARENT = G_GEN_TEXT_CONTAINER
                 WORDWRAP_MODE =  CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
                 WORDWRAP_POSITION = WORDWRAP_POSITION
                 WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.
      ENDIF.
      IF not G_GEN_TEXT_CONTAINER IS INITIAL.
    Set container options
      CALL METHOD: G_GEN_TEXT_EDITOR->SET_TOOLBAR_MODE
                                  EXPORTING TOOLBAR_MODE   = 0,
                   G_GEN_TEXT_EDITOR->SET_READONLY_MODE
                                  EXPORTING READONLY_MODE  = 1,
                   G_GEN_TEXT_EDITOR->SET_STATUSBAR_MODE
                                  EXPORTING STATUSBAR_MODE = 0,
                   G_GEN_TEXT_EDITOR->SET_AUTOINDENT_MODE
                                  EXPORTING AUTO_INDENT    = 1.
    Pass the text to the sales text container
      CALL METHOD G_GEN_TEXT_EDITOR->SET_TEXT_AS_STREAM
        EXPORTING
          TEXT = TEXT_TAB.
      endif.

    Try this way:
    DATA: lo_dock TYPE REF TO cl_gui_docking_container.
    DATA: lo_text_editor TYPE REF TO cl_gui_textedit.
    DATA: lt_tab TYPE STANDARD TABLE OF char80.
    DATA: la_tab LIKE LINE OF lt_tab.
    DATA: w_carrid TYPE sflight-carrid.
    ** Selection Screen
    SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE aaa.
    SELECT-OPTIONS: s_carrid FOR w_carrid.
    SELECTION-SCREEN: END   OF BLOCK blk1.
    INITIALIZATION.
    * Docking container
      CHECK lo_dock IS INITIAL.
      CREATE OBJECT lo_dock
        EXPORTING
          repid     = sy-cprog
          dynnr     = sy-dynnr
          ratio     = 80
          side      = cl_gui_docking_container=>dock_at_bottom
          name      = 'DOCK_CONT'.
      IF sy-subrc <> 0.
        MESSAGE 'Error in the Docking control' TYPE 'S'.
      ENDIF.
    * Text Editor
      CREATE OBJECT lo_text_editor
        EXPORTING
          parent                 = lo_dock
        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.
    * Set text
      la_tab = 'This is test'.
      APPEND la_tab TO lt_tab.
      CALL METHOD lo_text_editor->set_text_as_r3table
        EXPORTING
          table           = lt_tab
        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.
    Regards,
    Naimesh Patel

  • How to provide text editor in dialog program

    i have a requirement to enter upto 300 words in a dialog box how to provide text editor in dialog program

    you can use the custom controls for the same
    check this below link may be useful for you.........
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/755b94ca5911d299af5c9604c10e27/content.htm

  • How to call text editors in smart forms?

    In my module pool program,I included text editors for three fields.I want that fields in smart forms too.I need to know how these text editors are called in smart forms?

    Hi achu,
             Any text that gets saved has a corresponding entry in table STXH table. It usually has the following parameters : TDOBJECT,TDNAME,TDID and TDSPRAS.
    What you have to do is create a new text element and under general attributes ---> Type  - give Include Text.
    And in the include text you give the above four parameters which correspond to the text you want to display.
    P.S. Do not forget to check the 'No error if no text exists' checkbox.
    Hope this helps.
    Regards,
    Arun

Maybe you are looking for

  • SuperDrive not seem by OS

    I know based on reading way to many post this is pretty common issue with the notebook line and a few pro's. I took a month of Sundays deciding to drop this coin on a MBP. And with anyone looking for nirvana a few tweaks and adjustments are always in

  • Data Migration and Consolidation Best Practices?

    Hi guys Do you know what the best practice for data migration to FCSvr is? We're trying to consolidate all media on various firewire/internal drives to a centralised RAID directly attached to a dedicated server. We've found that dragging and dropping

  • InsertXML nested table

    Hello, I'm trying to insert to nested table xml clob using DBMS_XMLSave.insertXML. But xsu inserts to nested table for each row the same data ! Are there any limitation to use DBMS_XMLSave.insertXML for nested table ? This is the xml I'm trying to in

  • Networking a G5 dual 2.5ghz and a Powerbook G4/550 (Gigabit Ethernet)

    I have two macs. A PowerMac G5 dual 2.5ghz with 2 gigs ram. My other one is a Powerbook G4/550 (Gigabit Ethernet)(with PCMCIA Slot). I have the G5 at my desk and the Powerbook upstairs (about 100 feet by walking 40 feet as the crow flies. I have a 11

  • S540 critical process died

    Hy, I have upgraded my S540 to Windows 8.1. I installed all drivers and updates and have now sometimes bluescreens with the message "critical process died". I know this is not much information but I have no idea how to examne or solve the problem.