<?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 Data type problem.. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-problem/m-p/7633860#M1571527</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When learning abap i encountered a strange situation . Consider the program below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Report ztest.
  data : BEGIN OF stru,
          du  type c LENGTH 10,
          du2 type c LENGTH 12,
         END OF stru.
 data stru1 type stru.
     stru-du = '12345678'.
    stru-du2 = '9999999'.
    stru1 = stru.
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i put breakpoint and look at  the data type of stru1 it is N(10) and the absolute type(?) is '\TYPE=STRU' the value in stru1 is '6789999999' . &lt;STRONG&gt;Can anyone pls explain why data type of stru1 is N(10)&lt;/STRONG&gt; .I am aware that like should have been used if i wanted stru1 data type similar to that of stru.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kiran A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Feb 2011 04:32:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-02-09T04:32:09Z</dc:date>
    <item>
      <title>Data type problem..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-problem/m-p/7633860#M1571527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When learning abap i encountered a strange situation . Consider the program below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Report ztest.
  data : BEGIN OF stru,
          du  type c LENGTH 10,
          du2 type c LENGTH 12,
         END OF stru.
 data stru1 type stru.
     stru-du = '12345678'.
    stru-du2 = '9999999'.
    stru1 = stru.
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i put breakpoint and look at  the data type of stru1 it is N(10) and the absolute type(?) is '\TYPE=STRU' the value in stru1 is '6789999999' . &lt;STRONG&gt;Can anyone pls explain why data type of stru1 is N(10)&lt;/STRONG&gt; .I am aware that like should have been used if i wanted stru1 data type similar to that of stru.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kiran A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 04:32:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-problem/m-p/7633860#M1571527</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-09T04:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Data type problem..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-problem/m-p/7633861#M1571528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kiran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF stru,&lt;/P&gt;&lt;P&gt;        du  TYPE c LENGTH 10,&lt;/P&gt;&lt;P&gt;        du2 TYPE c LENGTH 12,&lt;/P&gt;&lt;P&gt;       END OF stru.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data stru1 type stru.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here stru1 is defined from standard data element (STRU) Structure Description, not from your structure declaration of stru,&lt;/P&gt;&lt;P&gt;if you want to do so you need to declare using TYPES not data, then your code will go like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : BEGIN OF stru,&lt;/P&gt;&lt;P&gt;        du  TYPE c LENGTH 10,&lt;/P&gt;&lt;P&gt;        du2 TYPE c LENGTH 12,&lt;/P&gt;&lt;P&gt;       END OF stru.&lt;/P&gt;&lt;P&gt;DATA stru1 TYPE stru.&lt;/P&gt;&lt;P&gt;DATA stru2 TYPE stru.&lt;/P&gt;&lt;P&gt;stru1-du = '12345678'.&lt;/P&gt;&lt;P&gt;stru1-du2 = '9999999'.&lt;/P&gt;&lt;P&gt;stru2 = stru1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Swanand Paranjape.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 05:27:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-problem/m-p/7633861#M1571528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-09T05:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Data type problem..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-problem/m-p/7633862#M1571529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akiran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is already a &lt;STRONG&gt;built-in type stru in SAP system&lt;/STRONG&gt; whose datatype is NUMC(10).You can check it by TCode SE11 and select the radio button and write stru in the DATA TYPE field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For that reason when you are defining stru1 TYPE stru the stru1 is created with datatype numc(10) or N(10) as technical type.Instead of that you declare DATA:stru1 LIKE stru.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suvajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 05:30:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-problem/m-p/7633862#M1571529</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-09T05:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Data type problem..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-problem/m-p/7633863#M1571530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the reply..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 05:33:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-problem/m-p/7633863#M1571530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-09T05:33:46Z</dc:date>
    </item>
  </channel>
</rss>

