<?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 ABAP Syntax error in this code - Could anyone help? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180408#M125618</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;I have this code which runs fine in our non-unicode SAP system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  ECC5_OFFSETS.

DATA: W_KONV TYPE KONV.

DATA: TKOMK LIKE STANDARD TABLE OF KOMK
                 WITH KEY KEY_UC
                 INITIAL SIZE 2
                 WITH HEADER LINE.

DATA: TKOMK2 type STANDARD TABLE OF KOMK
                 WITH KEY KEY_UC
                 INITIAL SIZE 2.

* Get some test data
SELECT SINGLE * INTO W_KONV FROM  KONV
       WHERE  KNUMV  = '0000000061'.

MOVE-CORRESPONDING W_KONV TO TKOMK.
APPEND TKOMK.
tkomk2[] = TKOMK[].

* Original non-Unicode compliant code
DATA: LENGTH_KEY_TKOMK(3) TYPE P.

FIELD-SYMBOLS: &amp;lt;TKOMK_KEY&amp;gt; like TKOMK2.

DESCRIBE DISTANCE BETWEEN TKOMK-MANDT AND TKOMK-SUPOS
          INTO LENGTH_KEY_TKOMK
* ( Original Unicode syntax fix! )
          IN BYTE MODE.

* Copy all the fields between these two into TKOMK_KEY field-symbol.
* ( In Unicode this assignment fails, causing short dump at read )
ASSIGN TKOMK2(LENGTH_KEY_TKOMK) TO &amp;lt;TKOMK_KEY&amp;gt;.
* Read the current record.
READ TABLE TKOMK2 WITH KEY &amp;lt;TKOMK_KEY&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I get the following error message in our UNICODE complaint SAP system:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;"&amp;lt;TKOMK_KEY&amp;gt;" cannot be a table, a reference, a string, or contain any of these objects.&amp;lt;/b&amp;gt;	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how I could get around this/suggest a solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jan 2006 17:17:25 GMT</pubDate>
    <dc:creator>former_member195355</dc:creator>
    <dc:date>2006-01-23T17:17:25Z</dc:date>
    <item>
      <title>ABAP Syntax error in this code - Could anyone help?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180408#M125618</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;I have this code which runs fine in our non-unicode SAP system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  ECC5_OFFSETS.

DATA: W_KONV TYPE KONV.

DATA: TKOMK LIKE STANDARD TABLE OF KOMK
                 WITH KEY KEY_UC
                 INITIAL SIZE 2
                 WITH HEADER LINE.

DATA: TKOMK2 type STANDARD TABLE OF KOMK
                 WITH KEY KEY_UC
                 INITIAL SIZE 2.

* Get some test data
SELECT SINGLE * INTO W_KONV FROM  KONV
       WHERE  KNUMV  = '0000000061'.

MOVE-CORRESPONDING W_KONV TO TKOMK.
APPEND TKOMK.
tkomk2[] = TKOMK[].

* Original non-Unicode compliant code
DATA: LENGTH_KEY_TKOMK(3) TYPE P.

FIELD-SYMBOLS: &amp;lt;TKOMK_KEY&amp;gt; like TKOMK2.

DESCRIBE DISTANCE BETWEEN TKOMK-MANDT AND TKOMK-SUPOS
          INTO LENGTH_KEY_TKOMK
* ( Original Unicode syntax fix! )
          IN BYTE MODE.

* Copy all the fields between these two into TKOMK_KEY field-symbol.
* ( In Unicode this assignment fails, causing short dump at read )
ASSIGN TKOMK2(LENGTH_KEY_TKOMK) TO &amp;lt;TKOMK_KEY&amp;gt;.
* Read the current record.
READ TABLE TKOMK2 WITH KEY &amp;lt;TKOMK_KEY&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I get the following error message in our UNICODE complaint SAP system:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;"&amp;lt;TKOMK_KEY&amp;gt;" cannot be a table, a reference, a string, or contain any of these objects.&amp;lt;/b&amp;gt;	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how I could get around this/suggest a solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 17:17:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180408#M125618</guid>
      <dc:creator>former_member195355</dc:creator>
      <dc:date>2006-01-23T17:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Syntax error in this code - Could anyone help?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180409#M125619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;b&amp;gt;FIELD-SYMBOLS: &amp;lt;TKOMK_KEY&amp;gt; TYPE TABLE.&amp;lt;/b&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 17:20:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180409#M125619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-23T17:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Syntax error in this code - Could anyone help?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180410#M125620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your suggestion and the exact same error came up &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other ideas...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 17:24:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180410#M125620</guid>
      <dc:creator>former_member195355</dc:creator>
      <dc:date>2006-01-23T17:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Syntax error in this code - Could anyone help?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180411#M125621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok...the problem is in this line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;READ TABLE tkomk2 WITH KEY &amp;lt;tkomk_key&amp;gt;.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE tkomk2 WITH KEY fieldname = somevalue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 17:28:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180411#M125621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-23T17:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Syntax error in this code - Could anyone help?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180412#M125622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yep that's as far as I got. This code works fine in 4.6b but in ECC5, that line you mentioned failes the syntax check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only reason why I don't waht to do what you suggest is becasue I'll have to code each of the 283 fields that it currently uses in the read!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was hoping that there would be an easier way to do the same thing...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other ideas...?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 17:41:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180412#M125622</guid>
      <dc:creator>former_member195355</dc:creator>
      <dc:date>2006-01-23T17:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Syntax error in this code - Could anyone help?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180413#M125623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please explain what is your exact requirement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 17:49:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180413#M125623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-23T17:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Syntax error in this code - Could anyone help?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180414#M125624</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;Sorry if I'm being unclear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirements are twofold:&lt;/P&gt;&lt;P&gt;1)the line of code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ASSIGN TKOMK2(LENGTH_KEY_TKOMK) TO &amp;lt;TKOMK_KEY&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;does not assign anything to the fields symbol &amp;lt;TKOMK_KEY&amp;gt;&lt;/P&gt;&lt;P&gt;2)The read statement does not like the fields symbol &amp;lt;TKOMK_KEY&amp;gt; being used as a key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both these bits of code worked in our 4.6b system but now in the ECC5 environemtn I get syntax errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you need anything else!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 18:17:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180414#M125624</guid>
      <dc:creator>former_member195355</dc:creator>
      <dc:date>2006-01-23T18:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Syntax error in this code - Could anyone help?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180415#M125625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do this change in your code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: tkomk2 TYPE STANDARD TABLE OF komk
                 WITH KEY key_uc
                 INITIAL SIZE 2
                 &amp;lt;b&amp;gt;WITH HEADER LINE&amp;lt;/b&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 18:44:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180415#M125625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-23T18:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Syntax error in this code - Could anyone help?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180416#M125626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The solution is to type the Field-Symbol with the table type:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FIELD-SYMBOLS: &amp;lt;TKOMK_KEY&amp;gt; like line of TKOMK2.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;  Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 20:43:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-syntax-error-in-this-code-could-anyone-help/m-p/1180416#M125626</guid>
      <dc:creator>former_member183804</dc:creator>
      <dc:date>2006-01-23T20:43:43Z</dc:date>
    </item>
  </channel>
</rss>

