<?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: SYNTAX_ERROR in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069514#M1355292</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables ps0041.
data w_mara  like mara.
data w_index type sy-index.

field-symbols: &amp;lt;empty&amp;gt; like w_mara,
               &amp;lt;value&amp;gt; type any.



assign w_mara to &amp;lt;empty&amp;gt;.

assign component w_index of structure ps0041 to &amp;lt;value&amp;gt;.
if sy-subrc = 0.
  &amp;lt;empty&amp;gt;-matnr = &amp;lt;value&amp;gt;.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U need to assign the whole structure to field-symbol, not a single field, the u can manage the fields of field-symbol structure as a normal structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my system MARA hasn't a field called DAR01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Sep 2009 08:13:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-07T08:13:36Z</dc:date>
    <item>
      <title>SYNTAX_ERROR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069508#M1355286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am getting dump when the below code exicuted in user exit which is ECC 6.0. But it was exicuted properly in ECC 5.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The error is  &amp;lt;empty&amp;gt;-dar01 is not defined as field symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT w_index OF STRUCTURE ps0041 TO&lt;/P&gt;&lt;P&gt;                                       &amp;lt;empty&amp;gt;-dar01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error in the ABAP Application Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The current ABAP program "SAPFP50M" had to be terminated because it has&lt;/P&gt;&lt;P&gt;come across a statement that unfortunately cannot be executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following syntax error occurred in program "SAPLXPAD " in include "ZXPADF01&lt;/P&gt;&lt;P&gt; " in&lt;/P&gt;&lt;P&gt;line 458:&lt;/P&gt;&lt;P&gt;""&amp;lt;EMPTY&amp;gt;-DAR01" is not defined as a field symbol"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The include has been created and last changed by:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;appreciation for faster answeres.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ysr .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Sep 2009 15:57:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069508#M1355286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-05T15:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: SYNTAX_ERROR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069509#M1355287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  This error is coming because you have declared &amp;lt;empty&amp;gt; as field symbol not &amp;lt;empty&amp;gt;-DAR01 and you are assinging to  &amp;lt;empty&amp;gt;-DAR01 you should only be assigning to &amp;lt;empty&amp;gt; rather that &amp;lt;empty&amp;gt;-dar01 like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ASSIGN COMPONENT w_index OF STRUCTURE ps0041 TO
&amp;lt;empty&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgeards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Sep 2009 16:01:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069509#M1355287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-05T16:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: SYNTAX_ERROR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069510#M1355288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZXPADF01 is an include of user-exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U should check how the variable &amp;lt;empty&amp;gt;-dar01 is defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ASSIGN COMPONENT w_index OF STRUCTURE ps0041 TO &amp;lt;empty&amp;gt;-dar01.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This line code means the program uses a field symbol, so u should find out a field-symbol defination there, something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;EMPTY&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U need to check how the field-symbol is defined, because if defined  as generic data it can't know the name of field: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;EMPTY&amp;gt; TYPE ANY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case the line should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ASSIGN COMPONENT w_index OF STRUCTURE ps0041 TO &amp;lt;empty&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It can indicate a field name (in your case DAR01, only if the defination is referenced to a structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;EMPTY&amp;gt; TYPE structure.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Sep 2009 16:03:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069510#M1355288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-05T16:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: SYNTAX_ERROR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069511#M1355289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are right if in case of Generic Case the &amp;lt;FS&amp;gt; should be declared like below .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;EMPTY&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as per below statement . &amp;lt;empty&amp;gt;-dar01 is not a generic . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT w_index OF STRUCTURE ps0041 TO &amp;lt;empty&amp;gt;-dar01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the declaration of &amp;lt;FS&amp;gt; will be like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;EMPTY&amp;gt; TYPE structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~linganna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Sep 2009 18:06:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069511#M1355289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-05T18:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: SYNTAX_ERROR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069512#M1355290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for u r reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field symble is declared as below w_mara is also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF w_mara .&lt;/P&gt;&lt;P&gt;           INCLUDE STRUCTURE mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   DATA: END OF w_mara .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data mara like mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;empty&amp;gt;               LIKE w_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT w_index OF STRUCTURE mara TO &amp;lt;empty&amp;gt;-dar01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the error is &amp;lt;empty&amp;gt;-dar01 is not assign as field symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you correct in the above case where i am wrong .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ysr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ysr@jay on Sep 6, 2009 12:27 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Sep 2009 07:33:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069512#M1355290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-06T07:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: SYNTAX_ERROR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069513#M1355291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  As Max has already suggested:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

ASSIGN COMPONENT w_index OF STRUCTURE ps0041 TO &amp;lt;empty&amp;gt;.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the field symbol you have declared  is &amp;lt;empty&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Sep 2009 10:40:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069513#M1355291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-06T10:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: SYNTAX_ERROR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069514#M1355292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables ps0041.
data w_mara  like mara.
data w_index type sy-index.

field-symbols: &amp;lt;empty&amp;gt; like w_mara,
               &amp;lt;value&amp;gt; type any.



assign w_mara to &amp;lt;empty&amp;gt;.

assign component w_index of structure ps0041 to &amp;lt;value&amp;gt;.
if sy-subrc = 0.
  &amp;lt;empty&amp;gt;-matnr = &amp;lt;value&amp;gt;.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U need to assign the whole structure to field-symbol, not a single field, the u can manage the fields of field-symbol structure as a normal structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my system MARA hasn't a field called DAR01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2009 08:13:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069514#M1355292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-07T08:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: SYNTAX_ERROR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069515#M1355293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;resolved by self...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Feb 2010 13:15:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/6069515#M1355293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-12T13:15:54Z</dc:date>
    </item>
  </channel>
</rss>

