<?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 offset error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922384#M383112</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 to make a unicode check for all our old reports. There I got a problem with&lt;/P&gt;&lt;P&gt;the following statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;*--- Internal table Cust master gen data&lt;/P&gt;&lt;P&gt;      t_kna1 TYPE kna1 OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF t_inrec OCCURS 0,&lt;/P&gt;&lt;P&gt;        rec_typ_ind(1)   TYPE c,         "H, D or T Literals&lt;/P&gt;&lt;P&gt;        kunnr(10)        TYPE c,         "Customer #&lt;/P&gt;&lt;P&gt;        tabname(30)      TYPE c,         "SAP R/3 table segment name&lt;/P&gt;&lt;P&gt;        tabdata(1500)    TYPE c,         "SAP R/3 table data&lt;/P&gt;&lt;P&gt;      END OF t_inrec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT t_inrec WHERE rec_typ_ind = c_rec_ind.&lt;/P&gt;&lt;P&gt;    CASE t_inrec-tabname.&lt;/P&gt;&lt;P&gt;      WHEN 'KNA1'.                                 "Create table t_kna1&lt;/P&gt;&lt;P&gt;        MOVE t_inrec-kunnr   TO t_kna1-kunnr.&lt;/P&gt;&lt;P&gt;        MOVE t_inrec-tabdata TO t_kna1+13.  &amp;lt;-----error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;-Sikha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Feb 2007 12:00:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-20T12:00:44Z</dc:date>
    <item>
      <title>offset error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922384#M383112</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 to make a unicode check for all our old reports. There I got a problem with&lt;/P&gt;&lt;P&gt;the following statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;*--- Internal table Cust master gen data&lt;/P&gt;&lt;P&gt;      t_kna1 TYPE kna1 OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF t_inrec OCCURS 0,&lt;/P&gt;&lt;P&gt;        rec_typ_ind(1)   TYPE c,         "H, D or T Literals&lt;/P&gt;&lt;P&gt;        kunnr(10)        TYPE c,         "Customer #&lt;/P&gt;&lt;P&gt;        tabname(30)      TYPE c,         "SAP R/3 table segment name&lt;/P&gt;&lt;P&gt;        tabdata(1500)    TYPE c,         "SAP R/3 table data&lt;/P&gt;&lt;P&gt;      END OF t_inrec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT t_inrec WHERE rec_typ_ind = c_rec_ind.&lt;/P&gt;&lt;P&gt;    CASE t_inrec-tabname.&lt;/P&gt;&lt;P&gt;      WHEN 'KNA1'.                                 "Create table t_kna1&lt;/P&gt;&lt;P&gt;        MOVE t_inrec-kunnr   TO t_kna1-kunnr.&lt;/P&gt;&lt;P&gt;        MOVE t_inrec-tabdata TO t_kna1+13.  &amp;lt;-----error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;-Sikha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2007 12:00:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922384#M383112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-20T12:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: offset error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922385#M383113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u shud move th value  t_inrec-tabdata  to some field of internal table   t_kna1.&lt;/P&gt;&lt;P&gt;like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE t_inrec-kunnr TO t_kna1-kunnr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2007 12:04:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922385#M383113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-20T12:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: offset error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922386#M383114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try out this tabdata(1500) to tabdata(500)... the length may be exceeding....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2007 12:05:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922386#M383114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-20T12:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: offset error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922387#M383115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;t_kna1+13. &amp;lt;-----error&lt;/P&gt;&lt;P&gt;mention the field name into which you are passing the value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2007 12:06:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922387#M383115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-20T12:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: offset error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922388#M383116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The field name has not been mentioned here......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2007 12:28:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922388#M383116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-20T12:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: offset error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922389#M383117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No it does not help.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sikha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2007 12:29:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922389#M383117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-20T12:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: offset error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922390#M383118</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;You cannot directly move data to a offset on a table.&lt;/P&gt;&lt;P&gt;When you want the tabdata field to be distributed into the fields of kna1, you can move each field by providing offset on tabname&lt;/P&gt;&lt;P&gt;ex. t_kna1-name1 = t_inrec-tabname+0(35).&lt;/P&gt;&lt;P&gt;     t_kna1-name2 = ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or, create a workarea containing the fields in KNA1 ( from position 13 onwards ) you wish to populate and move t_inrec-tabname to wa_kna1_new&lt;/P&gt;&lt;P&gt;Then, do a move-corresponding to move the values from wa_kna1_new to t_kna1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either way, make sure the date field (ERDAT) and any non char/numc fields are populated correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anil.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2007 12:29:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922390#M383118</guid>
      <dc:creator>anilnal</dc:creator>
      <dc:date>2007-02-20T12:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: offset error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922391#M383119</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;Offset u have to specify as&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;MOVE t_inrec-tabdata TO t_kna1-xxxx+0(13)&amp;lt;/b&amp;gt;. &amp;lt;-----error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specif the field name. But the above doesnot work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tabdata(1500) the field u r moving should contain 1500 length.&lt;/P&gt;&lt;P&gt;You can move 13 to 1500 not the reverse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;MOVE t_inrec-tabdata+0(13) TO t_kna1-xxxx&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want to move this as a whole to kna1, then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MOVE t_inrec-tabdata TO t_kna1.
APPEND t_kna1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2007 13:01:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/offset-error/m-p/1922391#M383119</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-20T13:01:17Z</dc:date>
    </item>
  </channel>
</rss>

