<?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: coading stadards in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/coading-stadards/m-p/3020587#M714090</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Coding standards is a document generally defined at the time of implementation. It incorporates for example how to code a select statement, how to read an internal table bla bla bla................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dont forget coding standards is different from naming standards which tell you how to name a report, a variable, a table etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Oct 2007 17:27:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-25T17:27:02Z</dc:date>
    <item>
      <title>coading stadards</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/coading-stadards/m-p/3020586#M714089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can any one tell me coading standards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 16:59:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/coading-stadards/m-p/3020586#M714089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T16:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: coading stadards</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/coading-stadards/m-p/3020587#M714090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Coding standards is a document generally defined at the time of implementation. It incorporates for example how to code a select statement, how to read an internal table bla bla bla................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dont forget coding standards is different from naming standards which tell you how to name a report, a variable, a table etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 17:27:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/coading-stadards/m-p/3020587#M714090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T17:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: coading stadards</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/coading-stadards/m-p/3020588#M714091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Generally all ABAP REPORTS have the following structure i.e The CODING  SEQ.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Program Declarartion&lt;/P&gt;&lt;P&gt;DECLARATION SECTION .&lt;/P&gt;&lt;P&gt; Things like Report Name,Programmer Name ,Request For Change(RFC)&lt;/P&gt;&lt;P&gt; number, Change History Etc.&lt;/P&gt;&lt;P&gt;INCLUDE DECLARATIONS .&lt;/P&gt;&lt;P&gt; Includes like programTOP for data declaration, programF01 for form routines&lt;/P&gt;&lt;P&gt; programO01 for PBO modules,programI01 for PAI modules Etc.&lt;/P&gt;&lt;P&gt;Data Work area declaration&lt;/P&gt;&lt;P&gt;TABLES DECLARATION .&lt;/P&gt;&lt;P&gt; Here declare all the tables by using TABLES keyword.&lt;/P&gt;&lt;P&gt;TYPE-POOLS DECLARATION.&lt;/P&gt;&lt;P&gt; Any type pools used in the report like VRM(for use with ListBox)&lt;/P&gt;&lt;P&gt; should be declared here using TYPE-POOLS command.&lt;/P&gt;&lt;P&gt;TYPES DECLARATION .&lt;/P&gt;&lt;P&gt; Any type sused should be deined here by using TYPES keyword.&lt;/P&gt;&lt;P&gt;CONSTANTS .&lt;/P&gt;&lt;P&gt; All constants should be declared here starting with C_name using &lt;/P&gt;&lt;P&gt;keyword CONSTANTS.&lt;/P&gt;&lt;P&gt;DATA VARIABLES &lt;/P&gt;&lt;P&gt; All data variables decalred with DATA keyword should be here &lt;/P&gt;&lt;P&gt;DATA STRUCTURES&lt;/P&gt;&lt;P&gt; All structures declared with DATA should be here.&lt;/P&gt;&lt;P&gt;INTERNAL TABLES&lt;/P&gt;&lt;P&gt; All internal tables should be declared here.&lt;/P&gt;&lt;P&gt;RANGES DEFINITIONS.&lt;/P&gt;&lt;P&gt; All the ranges defined in the program using RANGES statement should be declared here.&lt;/P&gt;&lt;P&gt;FIELD GROUPS DECLARATION.&lt;/P&gt;&lt;P&gt;FIELD SYMBOL DECLARATION.&lt;/P&gt;&lt;P&gt;Events Declaration&lt;/P&gt;&lt;P&gt;INITIALIAZATION.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR field.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON HELP-REQUEST FOR field.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON FIELD field.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON BLOCK block.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;START OF SELECTION&lt;/P&gt;&lt;P&gt;GET field1,field2.&lt;/P&gt;&lt;P&gt;END OF SELECTION.&lt;/P&gt;&lt;P&gt;List Events&lt;/P&gt;&lt;P&gt;TOP OF PAGE&lt;/P&gt;&lt;P&gt;END OF PAGE.&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt;AT USER_COMMAND.&lt;/P&gt;&lt;P&gt;AT PFn.&lt;/P&gt;&lt;P&gt;Declaration of FORM ROUTINES.&lt;/P&gt;&lt;P&gt;FORM ....&lt;/P&gt;&lt;P&gt;ENDFORM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Varaible Declarartion&lt;/P&gt;&lt;P&gt; Variables should have descriptive names if possible .Variable names having meaningful words should be  separated by '_' like  CUST_NAME .Suitable 1st letter should be used with variables  to suggest their type and purpose like :&lt;/P&gt;&lt;P&gt; W_   Normal work variables declared with DATA statement &lt;/P&gt;&lt;P&gt;         e.g. DATA: W_NAME.&lt;/P&gt;&lt;P&gt; TY_   All types declared in the program shold start from TY_&lt;/P&gt;&lt;P&gt; C_    Constants&lt;/P&gt;&lt;P&gt; P_    Parameter&lt;/P&gt;&lt;P&gt; S_    Select Options&lt;/P&gt;&lt;P&gt; R_    Range Table&lt;/P&gt;&lt;P&gt; T_     Structure&lt;/P&gt;&lt;P&gt;  I_      internal Table &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;EVERY ABAP statement on a single line.&lt;/P&gt;&lt;P&gt;Every ABAP statement should be on single line e.g.In case of SELECT&lt;/P&gt;&lt;P&gt;statement to retrieve records every clause like FROM ,WHERE etc should be on &lt;/P&gt;&lt;P&gt;diferent line.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;SELECT matnr mtart meins &lt;/P&gt;&lt;P&gt;        FROM mara&lt;/P&gt;&lt;P&gt;        WHERE ersda = &lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;Pretty painter should be used to indent the code properly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the parameters used in a form routine should be properly typed in&lt;/P&gt;&lt;P&gt;form definition if it is possible as the performance of sap code increases .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Text symbols should be used extensively .i.e TEXT-nnn or text(nnn) should &lt;/P&gt;&lt;P&gt;be used instead of only literal text,for language translation and code readibility&lt;/P&gt;&lt;P&gt;and maintenance benefits.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Message class should be declared in the REPORT statement with the addition MESSAGE-ID and long text should be created for each message used if possible. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Table Declaration Guidelines&lt;/P&gt;&lt;P&gt;Every customer table name should begin with z and 2nd and 3rd character should&lt;/P&gt;&lt;P&gt;represent the application to which that table belongs e.g.&lt;/P&gt;&lt;P&gt;SD sales and distribution&lt;/P&gt;&lt;P&gt;MM material management&lt;/P&gt;&lt;P&gt;QM Quality mangement&lt;/P&gt;&lt;P&gt;BC Basis components.&lt;/P&gt;&lt;P&gt; The rest part of the table name shopuld be descriptive as much as possible.&lt;/P&gt;&lt;P&gt;The delivery class of tables should be 'A' and 'C' .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTERNAL TABLE GUIDELINES&lt;/P&gt;&lt;P&gt; Before using the READ TABLE statement the internal table should be sorted&lt;/P&gt;&lt;P&gt; as it increases performance. BINARY SEARCH addition should be used with&lt;/P&gt;&lt;P&gt;READ TABLE int KEY key BINARY SEARCH.&lt;/P&gt;&lt;P&gt; To sort an internal table use SORT BY f1 f2 instead of SORT .&lt;/P&gt;&lt;P&gt; To create internal tables it is recommended that a line type or work area should&lt;/P&gt;&lt;P&gt;be first created using the TYPES statement .&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF TY_INT,&lt;/P&gt;&lt;P&gt;              NAME(14) TYPE C,&lt;/P&gt;&lt;P&gt;              ADDRESS(30) TYPE C,&lt;/P&gt;&lt;P&gt;              END OF TY_INT.&lt;/P&gt;&lt;P&gt;DATA :  T_NAME TYPE STANDARD TABLE OF TY_INT  WITH HEADER LINE .&lt;/P&gt;&lt;P&gt;                 OR&lt;/P&gt;&lt;P&gt;DATA: T_NAME TYPE TY_INT OCCURS 0 .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM DOCUMENTATION&lt;/P&gt;&lt;P&gt; Every program before relesing it should be properly documented . Short comments should be inserted at every important junction in the program&lt;/P&gt;&lt;P&gt;describing the purpose of code .&lt;/P&gt;&lt;P&gt;When doing modification to an existing program the 10 digit change request&lt;/P&gt;&lt;P&gt;should be inserted where the changes or addition has been done. The existing &lt;/P&gt;&lt;P&gt;code should be commented out with change request number instead of deleting it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it was useful.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 18:24:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/coading-stadards/m-p/3020588#M714091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T18:24:28Z</dc:date>
    </item>
  </channel>
</rss>

