<?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: Data declaration in ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766167#M1951682</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Both will give the same result without decreasing the performance of the program.&lt;/P&gt;&lt;P&gt;But I like to use Data Element.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 29 May 2016 12:29:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-05-29T12:29:43Z</dc:date>
    <item>
      <title>Data declaration in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766162#M1951677</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 want to know which of the below mentioned option is a better practice when it comes to declaring data or constants in ABAP.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;a.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Master Table- Field&lt;/P&gt;&lt;P&gt;b.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data element.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Abhinav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 May 2016 04:02:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766162#M1951677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-29T04:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Data declaration in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766163#M1951678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A __default_attr="897195" __jive_macro_name="user" class="jive_macro_user jive_macro" data-objecttype="3" data-orig-content="abhinav chatterjee" href="https://community.sap.com/"&gt;&lt;/A&gt;, If you are using a constant or data in one program only, you should go for local declaration though for SELECT-OPTIONS, you can create a new structure in the absence of a standard structure. If you need to create a table, you can either directly define the fields with elementary types or create a data element for them. That decision is dependent upon whether you want to use the field in multiple tables or structure. If 'Yes', you should create a Data Element for it and create Label-text, F1 help and possibly F4 help using Domain. Hope it clarifies. Best Regards !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 May 2016 04:34:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766163#M1951678</guid>
      <dc:creator>MukeshKumar</dc:creator>
      <dc:date>2016-05-29T04:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: Data declaration in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766164#M1951679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi mukesh,&lt;/P&gt;&lt;P&gt;thanks for the reply. my question is if we have standard data element say MATNR,&amp;nbsp; then when i am declaring a variable what would be better way :&lt;/P&gt;&lt;P&gt;gv_matnr TYPE MATNR&lt;BR /&gt;or &lt;/P&gt;&lt;P&gt;gv_matnr TYPE MARA-MATNR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 May 2016 07:37:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766164#M1951679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-29T07:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Data declaration in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766165#M1951680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Abhinav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both ways are same its just for declaring variables or fields, Both ways are standardly recommended Abaper use as per their ease.&lt;/P&gt;&lt;P&gt;If you are thinking about performance I don't think it reflects to any performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Muhammad Taha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 May 2016 08:45:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766165#M1951680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-29T08:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data declaration in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766166#M1951681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A __default_attr="897195" __jive_macro_name="user" class="jive_macro_user jive_macro" data-objecttype="3" data-orig-content="abhinav chatterjee" href="https://community.sap.com/"&gt;&lt;/A&gt;, it's the first option you should use because data elements are not table-specific and they can be used in multiple tables for defining fields in them. Also, please refer &lt;A href="https://help.sap.com/saphelp_nw73ehp1/helpdata/en/90/8d72feb1af11d194f600a0c929b3c3/content.htm?frameset=/en/90/8d72fbb1af11d194f600a0c929b3c3/frameset.htm&amp;amp;current_toc=/en/4f/991f82446d11d189700000e8322d00/plain.htm&amp;amp;node_id=90&amp;amp;show_children=false"&gt;SAP Help for more details&lt;/A&gt;. where it shows an example to define a field using this statement:&lt;/P&gt;&lt;P&gt;DATA CONNID TYPE S_CONN_ID.&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 May 2016 12:23:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766166#M1951681</guid>
      <dc:creator>MukeshKumar</dc:creator>
      <dc:date>2016-05-29T12:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Data declaration in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766167#M1951682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Both will give the same result without decreasing the performance of the program.&lt;/P&gt;&lt;P&gt;But I like to use Data Element.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 May 2016 12:29:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766167#M1951682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-29T12:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Data declaration in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766168#M1951683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 May 2016 19:07:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766168#M1951683</guid>
      <dc:creator>MukeshKumar</dc:creator>
      <dc:date>2016-05-29T19:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Data declaration in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766169#M1951684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhinav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is recommended to use data element if you define any variable in program.This is the best programming practice.In old codes you may find variable declaration with table-field name, but in new codes it is recommended to use data elements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : gv_matnr TYPE matnr&amp;nbsp;&amp;nbsp; (recommended )&lt;/P&gt;&lt;P&gt;DATA : gv_matnr TYPE mara-matnr ( not recommended )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rakesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 May 2016 21:53:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766169#M1951684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-29T21:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Data declaration in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766170#M1951685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my opinion,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both ways are same in performance, but i prefer to declare variables &lt;STRONG&gt;with table name&lt;/STRONG&gt;, because it increases the &lt;STRONG&gt;readability&lt;/STRONG&gt; of your code. at the time of analysis it &lt;STRONG&gt;makes more sense&lt;/STRONG&gt; to your declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 04:09:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766170#M1951685</guid>
      <dc:creator>prajeshdesai</dc:creator>
      <dc:date>2016-05-30T04:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Data declaration in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766171#M1951686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi abhinav ,&lt;/P&gt;&lt;P&gt;when i first used ABAP i used to declare like this&lt;/P&gt;&lt;P&gt;data:matnr type matnr .&lt;/P&gt;&lt;P&gt;But as i went on with regular practice and came to work in real time i declared the like this :&lt;/P&gt;&lt;P&gt;data: matnr type mara-matnr .&lt;/P&gt;&lt;P&gt;When declaring long internal tables and many internal tables for producing structure during report production&amp;nbsp; it will be helpful for yourself only to differentiate from where the the table data has come from during your own see through (checking your own code) of code . Now this procedure helped me while coding , and it depends upon you which method u would prefer .&lt;/P&gt;&lt;P&gt;Hope this description helps you .&lt;/P&gt;&lt;P&gt;Take care ,&lt;/P&gt;&lt;P&gt;Rohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 06:34:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766171#M1951686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-30T06:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Data declaration in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766172#M1951687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This conversation looks like all discussions about myths. I really wonder on which factual arguments people say that "TYPE Master Table- Field" is not recommended. I've heard about this myth for 15 years. Can anybody find this in the official ABAP Programming Guidelines?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 06:43:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766172#M1951687</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2016-05-30T06:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Data declaration in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766173#M1951688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;My 2 cents:&lt;/P&gt;&lt;P&gt;Since some ABAP releases &amp;lt;field&amp;gt;-&amp;lt;tablename&lt;SPAN style="font-size: 10pt;"&gt;&amp;gt; can be used in function and method interface parameter declaration too. In the ABAP source you use the field in a specific table-related context. So use this table for declarations. Even unexperienced people will be happy when maintenance has to be done. At first glance, you know what it's all about.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Btw, one of the worst sources for style hints are ABAP Example programs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;SAP knows and disabled ABAP test cockpit checks for their own code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Clemens&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 07:13:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration-in-abap/m-p/11766173#M1951688</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2016-05-30T07:13:50Z</dc:date>
    </item>
  </channel>
</rss>

