<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Text Editor check syntax in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-check-syntax/m-p/3274091#M782717</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get all the code in the text editor into an internal table, then use statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SYNTAX-CHECK FOR itab MESSAGE mess LINE lin WORD wrd 
                 [PROGRAM prog] [DIRECTORY ENTRY dir] 
                 [WITH CURRENT SWITCHSTATES] 
                 [error_handling]. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See example program below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
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. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jan 2008 03:00:33 GMT</pubDate>
    <dc:creator>Sougata</dc:creator>
    <dc:date>2008-01-21T03:00:33Z</dc:date>
    <item>
      <title>Text Editor check syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-check-syntax/m-p/3274090#M782716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please provide codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks. will reward points if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 02:49:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-check-syntax/m-p/3274090#M782716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T02:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor check syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-check-syntax/m-p/3274091#M782717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get all the code in the text editor into an internal table, then use statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SYNTAX-CHECK FOR itab MESSAGE mess LINE lin WORD wrd 
                 [PROGRAM prog] [DIRECTORY ENTRY dir] 
                 [WITH CURRENT SWITCHSTATES] 
                 [error_handling]. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See example program below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
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. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 03:00:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-check-syntax/m-p/3274091#M782717</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2008-01-21T03:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor check syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-check-syntax/m-p/3274092#M782718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sougata thanks for your reply. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am i suppose to add a button onto my screen so that after users key in the codes and click on the button, it will check the syntax?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can provide me the codes for the screen layput? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 07:12:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-check-syntax/m-p/3274092#M782718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T07:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor check syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-check-syntax/m-p/3274093#M782719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sougata, after tryin out the codes, the system promt me this meaasge with i click on the "save" button:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program is not Unicode-compatible, according to its program attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Unicode, DESCRIBE LENGTH can only be used with IN BYTE MODE or IN CHARACTER MODE addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can i know what is the problem and how to solve it? thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 07:36:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-check-syntax/m-p/3274093#M782719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T07:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor check syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-check-syntax/m-p/3274094#M782720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also check FM's: &lt;STRONG&gt;EDITOR_SYNTAX_CHECK&lt;/STRONG&gt; or &lt;STRONG&gt;RS_SYNTAX_CHECK&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both FM's belong to fucntion group: &lt;STRONG&gt;S38E&lt;/STRONG&gt; related to Editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 07:46:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-check-syntax/m-p/3274094#M782720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T07:46:37Z</dc:date>
    </item>
  </channel>
</rss>

