<?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: How to correct Message Code HEL 0510 ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492836#M16699</link>
    <description>&lt;P&gt;Thanks for clarification! I guess I should've actually asked about ABAP version.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2017 18:02:44 GMT</pubDate>
    <dc:creator>Jelena_Perfiljeva</dc:creator>
    <dc:date>2017-11-08T18:02:44Z</dc:date>
    <item>
      <title>How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492827#M16690</link>
      <description>&lt;P&gt; &lt;/P&gt;
  &lt;P&gt; how can I correct this warning ?&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Programa: YY_TEST Línea: 8 [Prio 3]&lt;BR /&gt;Do not declare fields and field symbols (GLB_TXT) globally.&lt;BR /&gt;Deactivatable using pragma ##NEEDED. Message Code HEL 0510&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;this is the ABAP code --&amp;gt;&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; REPORT yy_test.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; DATA glb_txt TYPE string.&lt;BR /&gt; &lt;BR /&gt; START-OF-SELECTION.&lt;BR /&gt; glb_txt = 'HELLO WORLD !'.&lt;BR /&gt; &lt;BR /&gt; END-OF-SELECTION.&lt;BR /&gt; WRITE / glb_txt. &lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 16:31:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492827#M16690</guid>
      <dc:creator>jimmy_guzman</dc:creator>
      <dc:date>2017-11-07T16:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492828#M16691</link>
      <description>&lt;P&gt;1) You can move the Data declaration to be within the START-OF-SELECTION &lt;/P&gt;
  &lt;P&gt;=or=&lt;BR /&gt;2) Suppress the message by suffixing for your declaration :&lt;BR /&gt;DATA glb_txt TYPE string. ##NEEDED&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 17:58:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492828#M16691</guid>
      <dc:creator>RemiKaimal</dc:creator>
      <dc:date>2017-11-07T17:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492829#M16692</link>
      <description>&lt;P&gt;Which release are you on? There is no HEL message class in EHP6.&lt;/P&gt;
  &lt;P&gt;The message is quite self-explanatory though. In a nutshell, it doesn't like that you're declaring the variable at the top (=global) and then just using it everywhere. In case of a "hello world" program it's not really a problem IMHO (although some folks here might disagree &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ). But how to change this is up to you. I suspect it'll become apparent when you move on to learning about modularization.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 17:58:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492829#M16692</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2017-11-07T17:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492830#M16693</link>
      <description>&lt;P&gt;"You can move the Data declaration to be within the START-OF-SELECTION"&lt;/P&gt;
  &lt;P&gt;This doesn't change anything, because START-OF-SELECTION does not have a local data area.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 18:43:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492830#M16693</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-11-07T18:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492831#M16694</link>
      <description>&lt;P&gt;perhaps the key question is what is the alternative to avoid the use global variables in ECC Ehp 8 ?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 15:51:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492831#M16694</guid>
      <dc:creator>jimmy_guzman</dc:creator>
      <dc:date>2017-11-08T15:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492832#M16695</link>
      <description>&lt;P&gt;ECC Ehp 8&lt;/P&gt;
  &lt;P&gt;in previous releases the use of global variables was ok, but in this release it seem that this is not a best practice anymore ?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 15:54:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492832#M16695</guid>
      <dc:creator>jimmy_guzman</dc:creator>
      <dc:date>2017-11-08T15:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492833#M16696</link>
      <description>&lt;P&gt;"There is no HEL message class in EHP6."&lt;/P&gt;
  &lt;P&gt;This message rather comes from TRMSG or so.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 17:39:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492833#M16696</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-11-08T17:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492834#M16697</link>
      <description>&lt;P&gt;Does the warning appear in normal syntax check or in extended syntax check SLIN? What are the settings in the latter?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 17:41:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492834#M16697</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-11-08T17:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492835#M16698</link>
      <description>&lt;P&gt;I believe it has not been "best practice" for quite sometime (if ever). It was just something available and used rather widely. But you'll find many mentions on SCN that global variables need to be avoided and it's like the root cause of all evil. &lt;/P&gt;
  &lt;P&gt;But, as I noted, in particular case of such a small program I honestly don't see a problem with it. I'd just ignore the warning for now. &lt;/P&gt;
  &lt;P&gt;Searched in Google for "global variables ABAP" but didn't find what I expected. I'd refer to the ABAP documentation for your ABAP version for more information on the variable scope.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 18:01:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492835#M16698</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2017-11-08T18:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492836#M16699</link>
      <description>&lt;P&gt;Thanks for clarification! I guess I should've actually asked about ABAP version.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 18:02:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492836#M16699</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2017-11-08T18:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492837#M16700</link>
      <description>&lt;P&gt;The warning appears in transaction code SLIN and SCII ( code inspector )&lt;/P&gt;
  &lt;P&gt;The setting in transaction code SLIN is only one option --&amp;gt; "Programming Guidelines" &lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 19:50:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492837#M16700</guid>
      <dc:creator>jimmy_guzman</dc:creator>
      <dc:date>2017-11-08T19:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492838#M16701</link>
      <description>&lt;P&gt;The message is a warning from extended program check (SLIN) that occurrs only, if in SLIN the checks for &lt;EM&gt;Programming Guidelines&lt;/EM&gt; are switched on. &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/84620-cusersd021085aaapictslin.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; Of course it is recommended to check this, but you don't have to.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;In order to circumvent the message, you have to program according to the programming guidelines&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abendeclaration_variables_guidl.htm"&gt;Do not declare global variables &lt;/A&gt;&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;and avoid global data by implementing your code in (local) classes.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;CLASS cls DEFINITION.
  PUBLIC SECTION.
    CLASS-DATA var TYPE i.
    CLASS-METHODS main.
ENDCLASS.

CLASS cls IMPLEMENTATION.
  METHOD main.
    cl_demo_output=&amp;gt;display( var ).
  ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
  cls=&amp;gt;main( ).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Nov 2017 07:32:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492838#M16701</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-11-09T07:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492839#M16702</link>
      <description>&lt;P&gt;thanks Horst Keller&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 15:04:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492839#M16702</guid>
      <dc:creator>jimmy_guzman</dc:creator>
      <dc:date>2017-11-10T15:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to correct Message Code HEL 0510 ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492840#M16703</link>
      <description>&lt;P&gt;1). "Oops". for this specfic report, the declaration should move with a form routine&lt;/P&gt;
  &lt;P&gt;2) (Based on the approach you have given) :&lt;BR /&gt;Some project quality deliverables, recommend, the Extended check to be free of errors/warnings, with no changes in SLIN parameters. These QA document other wise known as "Code review checklist". &lt;BR /&gt;Here, ECCheck is run, downloaded and attached to the document&lt;/P&gt;
  &lt;P&gt;In such cases use of &lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenpragma.htm"&gt;Pragmas&lt;/A&gt; "##" can not be avoided.&lt;/P&gt;
  &lt;P&gt;Good, that this a "Hello world" program, the warning can be avoided with Object Oriented approach.&lt;BR /&gt;In real time scenario, if its 2000 lines of procedural code, this approach is &lt;STRONG&gt;close to impossible&lt;/STRONG&gt;. The change request on the development, will have the whole program re-written just to avoid a warning in ECCheck &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;
  &lt;P&gt;Take the case, the usage of a SELECT-OPTIONS parameters. These are inevitable global variables, that has to pass through ECCheck. (if there is no choice of keeping the warning)&lt;/P&gt;
  &lt;P&gt;The suggestive approach is to use Pragmas - "##", telling the system : "Hey !! there is nothing i can do about this warning, but to bypass it"&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 22:51:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-correct-message-code-hel-0510/m-p/492840#M16703</guid>
      <dc:creator>RemiKaimal</dc:creator>
      <dc:date>2017-11-10T22:51:49Z</dc:date>
    </item>
  </channel>
</rss>

