<?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 Field Symbol assignment in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/1975425#M399704</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi fiends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find below code. It is giving error that Fields is not assigned. Please advise me how to correct it.&lt;/P&gt;&lt;P&gt;The detailed error is.&lt;/P&gt;&lt;P&gt; The field symbol is no longer assigned because there was an attempt&lt;/P&gt;&lt;P&gt; make previously in a Unicode program to set the field symbol using&lt;/P&gt;&lt;P&gt; ASSIGN with offset and/or length specification. Here, the memory&lt;/P&gt;&lt;P&gt; addressed by the offset/length specification was not within the&lt;/P&gt;&lt;P&gt; allowed area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; FIELD-SYMBOLS &amp;lt;TEXT&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;  DATA: ASSIGN_LENGTH     LIKE SY-FDPOS,&lt;/P&gt;&lt;P&gt;        ERROR_TEXT_LENGTH LIKE SY-FDPOS,&lt;/P&gt;&lt;P&gt;        SHIFT_DISTANCE    LIKE SY-FDPOS,&lt;/P&gt;&lt;P&gt;        OVERWRITE_LENGTH  LIKE SY-FDPOS.&lt;/P&gt;&lt;P&gt;  SEARCH ERROR_TEXT FOR '&amp;amp;&amp;amp;'.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;    OVERWRITE_LENGTH = 2.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    SEARCH ERROR_TEXT FOR '&amp;amp;'.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;      OVERWRITE_LENGTH = 1.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      SEARCH ERROR_TEXT FOR '$'.&lt;/P&gt;&lt;P&gt;      IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;        OVERWRITE_LENGTH = 1.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DESCRIBE FIELD T100-TEXT LENGTH ERROR_TEXT_LENGTH IN BYTE MODE.&lt;/P&gt;&lt;P&gt;  SHIFT_DISTANCE = STRLEN( INSERT_TEXT ) - OVERWRITE_LENGTH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN_LENGTH = ERROR_TEXT_LENGTH - SY-FDPOS.&lt;/P&gt;&lt;P&gt;  ASSIGN ERROR_TEXT+SY-FDPOS(ASSIGN_LENGTH) TO &amp;lt;TEXT&amp;gt;.&lt;/P&gt;&lt;P&gt; Here the error showing&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SHIFT &amp;lt;TEXT&amp;gt; BY SHIFT_DISTANCE PLACES RIGHT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN_LENGTH = SHIFT_DISTANCE + OVERWRITE_LENGTH.&lt;/P&gt;&lt;P&gt;  IF ASSIGN_LENGTH = 0.&lt;/P&gt;&lt;P&gt;    ASSIGN_LENGTH = 1.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  ASSIGN ERROR_TEXT+SY-FDPOS(ASSIGN_LENGTH) TO &amp;lt;TEXT&amp;gt;.&lt;/P&gt;&lt;P&gt;  MOVE INSERT_TEXT TO &amp;lt;TEXT&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Feb 2007 12:30:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-21T12:30:26Z</dc:date>
    <item>
      <title>Field Symbol assignment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/1975425#M399704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi fiends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find below code. It is giving error that Fields is not assigned. Please advise me how to correct it.&lt;/P&gt;&lt;P&gt;The detailed error is.&lt;/P&gt;&lt;P&gt; The field symbol is no longer assigned because there was an attempt&lt;/P&gt;&lt;P&gt; make previously in a Unicode program to set the field symbol using&lt;/P&gt;&lt;P&gt; ASSIGN with offset and/or length specification. Here, the memory&lt;/P&gt;&lt;P&gt; addressed by the offset/length specification was not within the&lt;/P&gt;&lt;P&gt; allowed area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; FIELD-SYMBOLS &amp;lt;TEXT&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;  DATA: ASSIGN_LENGTH     LIKE SY-FDPOS,&lt;/P&gt;&lt;P&gt;        ERROR_TEXT_LENGTH LIKE SY-FDPOS,&lt;/P&gt;&lt;P&gt;        SHIFT_DISTANCE    LIKE SY-FDPOS,&lt;/P&gt;&lt;P&gt;        OVERWRITE_LENGTH  LIKE SY-FDPOS.&lt;/P&gt;&lt;P&gt;  SEARCH ERROR_TEXT FOR '&amp;amp;&amp;amp;'.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;    OVERWRITE_LENGTH = 2.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    SEARCH ERROR_TEXT FOR '&amp;amp;'.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;      OVERWRITE_LENGTH = 1.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      SEARCH ERROR_TEXT FOR '$'.&lt;/P&gt;&lt;P&gt;      IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;        OVERWRITE_LENGTH = 1.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DESCRIBE FIELD T100-TEXT LENGTH ERROR_TEXT_LENGTH IN BYTE MODE.&lt;/P&gt;&lt;P&gt;  SHIFT_DISTANCE = STRLEN( INSERT_TEXT ) - OVERWRITE_LENGTH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN_LENGTH = ERROR_TEXT_LENGTH - SY-FDPOS.&lt;/P&gt;&lt;P&gt;  ASSIGN ERROR_TEXT+SY-FDPOS(ASSIGN_LENGTH) TO &amp;lt;TEXT&amp;gt;.&lt;/P&gt;&lt;P&gt; Here the error showing&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SHIFT &amp;lt;TEXT&amp;gt; BY SHIFT_DISTANCE PLACES RIGHT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN_LENGTH = SHIFT_DISTANCE + OVERWRITE_LENGTH.&lt;/P&gt;&lt;P&gt;  IF ASSIGN_LENGTH = 0.&lt;/P&gt;&lt;P&gt;    ASSIGN_LENGTH = 1.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  ASSIGN ERROR_TEXT+SY-FDPOS(ASSIGN_LENGTH) TO &amp;lt;TEXT&amp;gt;.&lt;/P&gt;&lt;P&gt;  MOVE INSERT_TEXT TO &amp;lt;TEXT&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2007 12:30:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/1975425#M399704</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-21T12:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Field Symbol assignment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/1975426#M399705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean the error occurs at the shift statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so then no data exists in the field symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect u nee to do the follwing: -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data field(50).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'ERROR_TEXT+'&lt;/P&gt;&lt;P&gt;                         SY-FDPOS     *** You will need to make this a field of type char.&lt;/P&gt;&lt;P&gt;                         '('&lt;/P&gt;&lt;P&gt;                          ASSIGN_LENGTH&lt;/P&gt;&lt;P&gt;                          ')' INTO FIELD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN (field) TO &amp;lt;TEXT&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2007 12:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/1975426#M399705</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-21T12:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Field Symbol assignment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/1975427#M399706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sapna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just before using the field symbol check whether it is assigned or not.&lt;/P&gt;&lt;P&gt;only when it is assigned use that otherwise it will give you error. Bcoz field symbols are handled at runtime&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;IF &amp;lt;FS&amp;gt; IS ASSIGNED&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also debug at ASSIGN statement , see why it is not assigned&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;MB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2007 13:59:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-symbol-assignment/m-p/1975427#M399706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-21T13:59:36Z</dc:date>
    </item>
  </channel>
</rss>

