<?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: Getting error while giving inline declaration. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753730#M2021942</link>
    <description>&lt;P&gt;I love that in the same place you have defined &lt;STRONG&gt;gv_&lt;/STRONG&gt; variables, you've also defined &lt;STRONG&gt;lv_&lt;/STRONG&gt; variables! Which are they? Global or local?&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jun 2023 13:27:36 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2023-06-01T13:27:36Z</dc:date>
    <item>
      <title>Getting error while giving inline declaration.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753725#M2021937</link>
      <description>&lt;P&gt;While giving Inline declaration, There was an syntax error.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2170573-image.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 09:05:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753725#M2021937</guid>
      <dc:creator>atslokesh</dc:creator>
      <dc:date>2023-06-01T09:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while giving inline declaration.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753726#M2021938</link>
      <description>&lt;P&gt;The topinclude of a function group is used for data declarations. The statement is not a declaration but an assignment of value. In topinclude the statement is not accessible.  &lt;/P&gt;&lt;P&gt;N.B. The statement makes no sense, because gv_fiscal_year is initial. &lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 10:14:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753726#M2021938</guid>
      <dc:creator>jens_michaelsen</dc:creator>
      <dc:date>2023-06-01T10:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while giving inline declaration.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753727#M2021939</link>
      <description>&lt;P&gt;Eagle eyes to see L...TOP inside the screenshot &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 11:42:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753727#M2021939</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-06-01T11:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while giving inline declaration.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753728#M2021940</link>
      <description>&lt;P&gt;So we need to declare gv fiscal post not initial.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 12:04:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753728#M2021940</guid>
      <dc:creator>atslokesh</dc:creator>
      <dc:date>2023-06-01T12:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while giving inline declaration.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753729#M2021941</link>
      <description>&lt;P&gt;No Sir, this statement is not possible in a topinclude of a function group. You can use your statement in a function module of this function group, but not in the data declaration of the topinclude. &lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 13:00:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753729#M2021941</guid>
      <dc:creator>jens_michaelsen</dc:creator>
      <dc:date>2023-06-01T13:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while giving inline declaration.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753730#M2021942</link>
      <description>&lt;P&gt;I love that in the same place you have defined &lt;STRONG&gt;gv_&lt;/STRONG&gt; variables, you've also defined &lt;STRONG&gt;lv_&lt;/STRONG&gt; variables! Which are they? Global or local?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 13:27:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753730#M2021942</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2023-06-01T13:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while giving inline declaration.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753731#M2021943</link>
      <description>&lt;P&gt;The error "Statement not accessible" typically occurs when a statement is not allowed in the current context or scope.&lt;/P&gt;&lt;P&gt;In your case, it seems that you are trying to perform a computation and assignment operation (`gv_previous_fyear = gv_fiscal_year - 1`) directly in the top include section.&lt;/P&gt;&lt;P&gt;To resolve this issue, you need to move the computation and assignment statement into a proper executable section, such as a subroutine, function module, or within an executable block of code.&lt;/P&gt;&lt;P&gt;For example, you can place the computation and assignment statement inside a subroutine or a method:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;METHODS calculate_previous_fyear.

START-OF-SELECTION.
PERFORM calculate_previous_fyear.

FORM calculate_previous_fyear.
DATA: gv_fiscal_year TYPE numc4.
DATA(gv_previous_fyear) = gv_fiscal_year - 1.
...
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Alternatively, you can place it within an executable block like this:&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gv_fiscal_year TYPE numc4.
DATA(gv_previous_fyear) TYPE numc4.


START-OF-SELECTION.
gv_previous_fyear = gv_fiscal_year - 1.
...

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Remember to ensure that the executable code is placed within a valid context such as a subroutine, function module, or an executable block.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 03:12:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753731#M2021943</guid>
      <dc:creator>AmanSaxena</dc:creator>
      <dc:date>2023-06-02T03:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while giving inline declaration.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753732#M2021944</link>
      <description>&lt;P&gt;To resolve this issue, &lt;/P&gt;&lt;P&gt;you need to write this statment in execution area i.e after star of selection. &lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2023 03:28:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-giving-inline-declaration/m-p/12753732#M2021944</guid>
      <dc:creator>Sumit_Holey</dc:creator>
      <dc:date>2023-06-03T03:28:29Z</dc:date>
    </item>
  </channel>
</rss>

