<?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 with offset in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252112#M1631187</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;This questin is answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Sep 2011 11:07:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-09-26T11:07:43Z</dc:date>
    <item>
      <title>Syntax error with offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252105#M1631180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the below logic in ECC 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM ysd_sd09_124_clean_up_zzcmw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: lv_a0 TYPE i VALUE 160.&lt;/P&gt;&lt;P&gt;  DATA: lv_trans(2).&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS: &amp;lt;lf&amp;gt; TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN lv_a0 TO &amp;lt;lf&amp;gt; CASTING TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lv_trans(1) = &amp;lt;lf&amp;gt;+3(1).&lt;/P&gt;&lt;P&gt;  TRANSLATE vbkd-zzcmw USING lv_trans.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZZCMW is a custom field(customer master warranty field).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am trying to create a sales order this user exit will trigger and giving dump for the code  TRANSLATE vbkd-zzcmw USING lv_trans.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Category               ABAP Programming Error&lt;/P&gt;&lt;P&gt;Runtime Errors         DATA_OFFSET_TOO_LARGE&lt;/P&gt;&lt;P&gt;Except.                CX_SY_RANGE_OUT_OF_BOUNDS&lt;/P&gt;&lt;P&gt;ABAP Program           SAPMV45A&lt;/P&gt;&lt;P&gt;Application Component  SD-SLS&lt;/P&gt;&lt;P&gt;Date and Time          21.09.2011 10:09:33&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Short text&lt;/P&gt;&lt;P&gt;     Invalid subfield access: Offset too large&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; What happened?&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 "SAPMV45A" 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;Since the caller of the procedure could not have anticipated that the&lt;/P&gt;&lt;P&gt;exception would occur, the current program is terminated.&lt;/P&gt;&lt;P&gt;The reason for the exception is:&lt;/P&gt;&lt;P&gt;In the running program "SAPMV45A", the field "&amp;lt;LF&amp;gt;" of the type&lt;/P&gt;&lt;P&gt;"C" and length 2 was to be accessed with the offset 3.&lt;/P&gt;&lt;P&gt;However, subfield accesses with an offset specification that is not&lt;/P&gt;&lt;P&gt;smaller than the field length are not permitted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But same is wokring in 4.7. I tried to change the declarations but it did not work out. Can you please tell me what would be the difference in both versions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jyothi CH.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 07:24:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252105#M1631180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-21T07:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error with offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252106#M1631181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you activate Unicode during the upgrade, check [Assignments to Field Symbols|http://help.sap.com/saphelp_nw04/helpdata/en/79/c55491b3dc11d5993800508b6b8b11/frameset.htm]&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;STRONG&gt;Assignments to Field Symbols&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Until now the ASSIGN statement made it possible to define addresses past field limits by specifying the offset or length. There was only a runtime error when addressing past the limits of the data segment. Cross-field accesses to the offset/length in an ASSIGN, for example, could be used to edit repeating groups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Unicode, however, problems occur since it is not possible to ensure that cross-field offset or length definitions can be interpreted as bytes or characters in an identical and meaningful manner in both a US and an NUS. For this reason, the ASSIGN statement was enhanced with the RANGE and INCREMENT additions while the CASTING addition now supports all variants of this statement. The RANGE addition is offered for all valid variants of ASSIGN and can be combined with the CASTING addition.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Try a &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lv_trans = cl_abap_conv_in_ce=&amp;gt;uccp( '00A0' ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;(UTF-16 to UTF-8 ?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 07:41:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252106#M1631181</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2011-09-21T07:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error with offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252107#M1631182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raymond,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tried debugging and changing some lengths of the variables. The value of the FS is #. Does that mean that the Unicode in our current version was not activated as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Benedict&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: benedict choa on Sep 21, 2011 3:54 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 07:44:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252107#M1631182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-21T07:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error with offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252108#M1631183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  Jyothi   ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In unicode  Length of character is 2 bytes  . Hence  fieldsymbol you declared &amp;lt;lf&amp;gt;  is having length 2  .&lt;/P&gt;&lt;P&gt;and  you have specified &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;lf&amp;gt;+3(1) which is more than 2  . Hence this is error  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so please change your code accordingly  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;lf&amp;gt;+1(1) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALso  you have  type casting with c  , i.e charater  it is taking  its  value as # &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you remove type casting  it will have value  160 in fieldsymbol varaible   , but it will give error  while using offset   because of integer  field assignment  .&lt;/P&gt;&lt;P&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;Deepak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Deepak Dhamat on Sep 21, 2011 10:58 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 08:55:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252108#M1631183</guid>
      <dc:creator>deepak_dhamat</dc:creator>
      <dc:date>2011-09-21T08:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error with offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252109#M1631184</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;&amp;lt;LF&amp;gt; will always contain # as you have used casting. Even if you remove casting, the statement lv_trans(1) = &amp;lt;lf&amp;gt;&lt;EM&gt;3(1) will never give you anything. As &amp;lt;lf&amp;gt; contains 160, &amp;lt;lf&amp;gt;&lt;/EM&gt;3(1) will contain blanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need any value in lv_trans(1), change the offset to either 0(1) / 1(1) / 2(1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try This,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: lv_a0 TYPE c LENGTH 10.
DATA: lv_trans(2).
FIELD-SYMBOLS: &amp;lt;lf&amp;gt; TYPE c.

lv_a0 = '160'.

ASSIGN lv_a0 TO &amp;lt;lf&amp;gt;.

lv_trans(1) = &amp;lt;lf&amp;gt;+2(1).

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Danish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 09:10:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252109#M1631184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-21T09:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error with offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252110#M1631185</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;&lt;/P&gt;&lt;P&gt;Check this  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: lv_a0 TYPE i VALUE 260.&lt;/P&gt;&lt;P&gt;DATA: lv_trans(3) .&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;gt&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN lv_a0 TO &amp;lt;gt&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_trans = &amp;lt;gt&amp;gt;.&lt;/P&gt;&lt;P&gt;vbkd-BSARK_E = '62' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANSLATE vbkd-BSARK_E USING lv_trans.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT will give output  vbkd-BSARK_E = 66&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because it will search for patterns  in lv_trans  where first value is  2and second is 6 so ,&lt;/P&gt;&lt;P&gt;in &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TRANSLATE vbkd-BSARK_E USING lv_trans.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will search for value 2 from  lv_trans  in  vbkd-BSARK_E  and  will replace with  6  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 09:23:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252110#M1631185</guid>
      <dc:creator>deepak_dhamat</dc:creator>
      <dc:date>2011-09-21T09:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error with offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252111#M1631186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Replace your code (substring of pointer is not a good idea in unicode system) with a&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lv_trans = cl_abap_conv_in_ce=&amp;gt;uccp( '00A0' ).
REPLACE ALL OCCURRENCES OF lv_trans IN vbkd-zzcmw WITH space.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NB: For information, '00A0' is the unicode value of "non-breaking space" (NBSP) and the program try to translate those to simple space characters. (ref [Non-breaking space|http://en.wikipedia.org/wiki/Non-breaking_space])&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 09:28:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252111#M1631186</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2011-09-21T09:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error with offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252112#M1631187</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;This questin is answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2011 11:07:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-with-offset/m-p/8252112#M1631187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-26T11:07:43Z</dc:date>
    </item>
  </channel>
</rss>

