<?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: Abap program standards in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282704#M497068</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;plz go through this documementaion,&lt;/P&gt;&lt;P&gt;i think its helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP Programming StandardsContents&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Objective	5&lt;/P&gt;&lt;P&gt;2.	Naming Conventions	5&lt;/P&gt;&lt;P&gt;2.1	Codes for naming conventions	5&lt;/P&gt;&lt;P&gt;2.1.1	Module Codes	5&lt;/P&gt;&lt;P&gt;2.1.2	Free text	6&lt;/P&gt;&lt;P&gt;2.2	Naming Convention of Development Objects	6&lt;/P&gt;&lt;P&gt;2.2.1	Package	6&lt;/P&gt;&lt;P&gt;2.2.2	Executable Program	6&lt;/P&gt;&lt;P&gt;2.2.3	BSP Application	7&lt;/P&gt;&lt;P&gt;2.2.4	Logical Database	8&lt;/P&gt;&lt;P&gt;2.2.5	SAP Scripts /Smartforms	9&lt;/P&gt;&lt;P&gt;2.2.6	Idocs	9&lt;/P&gt;&lt;P&gt;2.2.7	Transaction Code	10&lt;/P&gt;&lt;P&gt;2.2.8	Function Groups	10&lt;/P&gt;&lt;P&gt;2.2.9	Dictionary Objects	11&lt;/P&gt;&lt;P&gt;2.2.10	Message Class	11&lt;/P&gt;&lt;P&gt;2.2.11	Enhancement Projects (User Exits)	11&lt;/P&gt;&lt;P&gt;2.2.12	LSMW Objects	12&lt;/P&gt;&lt;P&gt;2.2.13	Classes	12&lt;/P&gt;&lt;P&gt;2.2.14	BOR Object Types	13&lt;/P&gt;&lt;P&gt;2.2.15	Screen / Transaction Variants	13&lt;/P&gt;&lt;P&gt;2.2.16	Area Menu	13&lt;/P&gt;&lt;P&gt;2.3	Naming of Sub-Objects	13&lt;/P&gt;&lt;P&gt;2.3.1	Program Sub-Objects	13&lt;/P&gt;&lt;P&gt;2.3.2	SAP Script /Smartform sub-objects	14&lt;/P&gt;&lt;P&gt;3.	General Programming Guidelines	14&lt;/P&gt;&lt;P&gt;3.1	Modification Logs	14&lt;/P&gt;&lt;P&gt;3.2	Program Organization	15&lt;/P&gt;&lt;P&gt;3.2.1	Executable Programs	15&lt;/P&gt;&lt;P&gt;3.2.2	Dialog Programs	15&lt;/P&gt;&lt;P&gt;3.3	Package	15&lt;/P&gt;&lt;P&gt;3.3.1	Adding Components to existing objects	15&lt;/P&gt;&lt;P&gt;3.3.2	Creation of New Objects	15&lt;/P&gt;&lt;P&gt;3.4	Program Messages	15&lt;/P&gt;&lt;P&gt;3.4.1	Adding Messages to existing landscapes	15&lt;/P&gt;&lt;P&gt;3.4.2	Creation of New Objects	16&lt;/P&gt;&lt;P&gt;3.5	Dictionary Objects	16&lt;/P&gt;&lt;P&gt;4.	Structure of ABAP Programs	16&lt;/P&gt;&lt;P&gt;4.1	Type	16&lt;/P&gt;&lt;P&gt;4.2	Status	18&lt;/P&gt;&lt;P&gt;4.3	Authority Check	18&lt;/P&gt;&lt;P&gt;4.4	Program Structure	19&lt;/P&gt;&lt;P&gt;4.4.1	Declaration data for global data, classes and selection screens	19&lt;/P&gt;&lt;P&gt;4.4.2	Container for Processing Blocks	19&lt;/P&gt;&lt;P&gt;4.4.3	Calling Processing Blocks	20&lt;/P&gt;&lt;P&gt;4.5	Screen Flow Logic (Dialog Programs)	20&lt;/P&gt;&lt;P&gt;4.5.1	Place the AT EXIT COMMAND at the beginning of the flow logic.	20&lt;/P&gt;&lt;P&gt;4.5.2	Use FIELD and CHAIN statements to keep fields in error open for correction.	20&lt;/P&gt;&lt;P&gt;4.6	Main Program	20&lt;/P&gt;&lt;P&gt;4.6.1	Events	20&lt;/P&gt;&lt;P&gt;5.	General Coding Standards	21&lt;/P&gt;&lt;P&gt;5.1	One command per line	21&lt;/P&gt;&lt;P&gt;5.2	Indented Source Code	21&lt;/P&gt;&lt;P&gt;5.3	Extended Syntax Check	21&lt;/P&gt;&lt;P&gt;5.4	Reusability and Modularity	21&lt;/P&gt;&lt;P&gt;5.5	Text Handling	21&lt;/P&gt;&lt;P&gt;5.6	Usage of System Variables	22&lt;/P&gt;&lt;P&gt;5.7	Chaining Statements	22&lt;/P&gt;&lt;P&gt;5.8	Common Routines	22&lt;/P&gt;&lt;P&gt;5.9	Dialog Messages	22&lt;/P&gt;&lt;P&gt;5.10	Function Keys	23&lt;/P&gt;&lt;P&gt;5.11	Enqueuing and Dequeuing Data Objects	23&lt;/P&gt;&lt;P&gt;5.12	Error Handling (SY-SUBRC)	23&lt;/P&gt;&lt;P&gt;5.13	General Conventions and Hints	24&lt;/P&gt;&lt;P&gt;5.14	Parameters in Sub-Routines	24&lt;/P&gt;&lt;P&gt;6.	Performance Standards	25&lt;/P&gt;&lt;P&gt;6.1	General Tips on Performance Tuning	25&lt;/P&gt;&lt;P&gt;6.1.1	Avoid Redundant code	25&lt;/P&gt;&lt;P&gt;6.1.2	Subroutine Usage	25&lt;/P&gt;&lt;P&gt;6.1.3	Case vs. Nested IF	25&lt;/P&gt;&lt;P&gt;6.1.4	Using the MOVE Statement	25&lt;/P&gt;&lt;P&gt;6.1.5	SELECT Queries	25&lt;/P&gt;&lt;P&gt;6.1.6	Using the READ statement	27&lt;/P&gt;&lt;P&gt;6.1.7	Hashed table	27&lt;/P&gt;&lt;P&gt;6.1.8	Transporting	28&lt;/P&gt;&lt;P&gt;6.1.9	Using LDB	28&lt;/P&gt;&lt;P&gt;6.1.10	Append Lines of	28&lt;/P&gt;&lt;P&gt;6.1.11	Use WHILE	28&lt;/P&gt;&lt;P&gt;6.1.12	DELETE &amp;lt;itab&amp;gt; WHERE	28&lt;/P&gt;&lt;P&gt;6.1.13	Using WHERE clause in LOOP&amp;#133;&amp;#133;.ENDLOOP	28&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Objective&lt;/P&gt;&lt;P&gt;The objective of this document is to describe general programming guidelines, methodologies, Naming conventions and performance guidelines for all the programs developed for SAP Project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.	Naming Conventions&lt;/P&gt;&lt;P&gt;This chapter describes the naming conventions to be followed for naming the programming objects for SAP project. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.1	 Codes for naming conventions&lt;/P&gt;&lt;P&gt;The variable portion of naming convention is given with Code ID given in angle brackets(&amp;lt;&amp;gt;). Use the following tables for replacing code IDs with codes in the object naming. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.1.1	Module Codes&lt;/P&gt;&lt;P&gt;Code ID:  mm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Code	Description&lt;/P&gt;&lt;P&gt;FI	Finance &lt;/P&gt;&lt;P&gt;CO	Controlling Module&lt;/P&gt;&lt;P&gt;MM	Materials Management&lt;/P&gt;&lt;P&gt;PP 	Production Planning&lt;/P&gt;&lt;P&gt;SD	Sales &amp;amp; Distribution&lt;/P&gt;&lt;P&gt;QM 	Quality Management&lt;/P&gt;&lt;P&gt;PM	Plant Maintenance&lt;/P&gt;&lt;P&gt;IM	Inventory Management&lt;/P&gt;&lt;P&gt;WM	Warehouse Management&lt;/P&gt;&lt;P&gt;BC	Basis Module&lt;/P&gt;&lt;P&gt;BW	Business Warehouse&lt;/P&gt;&lt;P&gt;WF	Workflows (Master Data Management)&lt;/P&gt;&lt;P&gt;HR	Human Resources&lt;/P&gt;&lt;P&gt;EBP	EBP&lt;/P&gt;&lt;P&gt;PS	Project Systems&lt;/P&gt;&lt;P&gt;PCP	Synpro: Product Costing&lt;/P&gt;&lt;P&gt;PAP	Synpro: COPA&lt;/P&gt;&lt;P&gt;DP	APO :  Demand Planning&lt;/P&gt;&lt;P&gt;SP	APO :  Supply Network Planning &lt;/P&gt;&lt;P&gt;DS	 APO : Production Planning &amp;amp; Detailed Scheduling&lt;/P&gt;&lt;P&gt;AT	APO : Global ATP&lt;/P&gt;&lt;P&gt;TP	APO : Transportation Planning/Vehicle Scheduling&lt;/P&gt;&lt;P&gt;CI	Core Interface&lt;/P&gt;&lt;P&gt;LC	Live Cache &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.1.2	Free text&lt;/P&gt;&lt;P&gt;Code ID: ffff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Developer should replace &amp;#145;ffff&amp;#146; with meaningful text. The text can be multiple words separated by underscore. &lt;/P&gt;&lt;P&gt;2.2	Naming Convention of Development Objects&lt;/P&gt;&lt;P&gt;2.2.1	Package&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with Module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with the sub-landscape of the Module that this Message Class caters to as illustrated in examples below.&lt;/P&gt;&lt;P&gt;3.	The maximum permissible length for development class is 30 characters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;Dev. Class	Description&lt;/P&gt;&lt;P&gt;ZFI_AR	FI: Account Receivables&lt;/P&gt;&lt;P&gt;ZCO_CCA	CO: Cost Center Accounting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.2	Executable Program&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text as illustrated in examples below.&lt;/P&gt;&lt;P&gt;3.	The maximum permissible length for program name is 30 characters. However, the name should be restricted to 25 characters to accommodate appropriate Include naming as described in 2.2.2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;Program Name	Description&lt;/P&gt;&lt;P&gt;ZFI_VAT_RET	FI:  Report for VAT Return&lt;/P&gt;&lt;P&gt;ZMM_AUTO_GR	MM: Automated Goods Receipt&lt;/P&gt;&lt;P&gt;ZSD_XX_STCK_SHORTAGE	SD: Stock shortage report for stock allocation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.2.1	Includes for executable programs&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;_&amp;lt;Inn&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	All includes of executable program will be prefixed by Z, followed by the same program name as described in 2.2.2 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;Inn&amp;gt; with include type and sequence number. Use the following table for includes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include Type ID	Description&lt;/P&gt;&lt;P&gt;TOP	Top Include.&lt;/P&gt;&lt;P&gt;Fnn	Subroutine pool (Forms)&lt;/P&gt;&lt;P&gt;Inn	PAI Modules&lt;/P&gt;&lt;P&gt;Onn	PBO Modules&lt;/P&gt;&lt;P&gt;Xnn	Other Includes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The maximum permissible length for Include name is 30 characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;Include Name	Main Program Name	Description&lt;/P&gt;&lt;P&gt;ZFI_VAT_RET_TOP	ZFI_VAT_RET	FI:  Report for VAT Return &amp;#150; Top Include&lt;/P&gt;&lt;P&gt;ZFI_VAT_RET_F01	ZFI_VAT_RET	FI:  Report for VAT Return &amp;#150; Forms&lt;/P&gt;&lt;P&gt;ZMM_AUTO_GR_TOP	ZMM_FR_AUTO_GR	MM: &amp;#150; Automated Goods Receipt &amp;#150; Top include&lt;/P&gt;&lt;P&gt;ZMM_AUTO_GR_F01	ZMM_FR_AUTO_GR	MM:&amp;#150; Automated Goods Receipt &amp;#150; Forms&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.3	BSP Application&lt;/P&gt;&lt;P&gt;2.2.3.1	Main Application&lt;/P&gt;&lt;P&gt;Naming Convention: BSP Applications shall follow the same Naming Convention as Executable Programs i.e. Z&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text as illustrated in examples below.&lt;/P&gt;&lt;P&gt;2.2.3.2	Pages &amp;amp; Controllers&lt;/P&gt;&lt;P&gt;Naming Convention: &amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;ffff&amp;gt; with meaningful text, that adequately describes the function of the page/controller&lt;/P&gt;&lt;P&gt;2.2.3.3	Theme&lt;/P&gt;&lt;P&gt;Naming Convention: Z_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;ffff&amp;gt; with meaningful text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.3.4	Mime Objects:&lt;/P&gt;&lt;P&gt;Naming Convention: &amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;1.	A MIME Object can be logo for the company.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text, that adequately describes the function of the MIME objects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.3.5	Controller and Handler Classes:&lt;/P&gt;&lt;P&gt;See section Classes (Section 2.2.133)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.3.6	BSP Extension&lt;/P&gt;&lt;P&gt;Naming Convention: Z_&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;ffff&amp;gt; with meaningful text&lt;/P&gt;&lt;P&gt;2.2.3.7	BSP Layout elements id &lt;/P&gt;&lt;P&gt;Label:	lb_fffff&lt;/P&gt;&lt;P&gt;Input field:	if_fffff&lt;/P&gt;&lt;P&gt;Button:	b_fffff&lt;/P&gt;&lt;P&gt;Text Edit:	te_fffff&lt;/P&gt;&lt;P&gt;Text View:	tv_fffff&lt;/P&gt;&lt;P&gt;Radio button Group:	rbg_fffff&lt;/P&gt;&lt;P&gt;Radio button:	rb_fffff&lt;/P&gt;&lt;P&gt;Check Box Group:	cbg_fffff&lt;/P&gt;&lt;P&gt;Check Box	cb_fffff&lt;/P&gt;&lt;P&gt;Tray	tr_fffff&lt;/P&gt;&lt;P&gt;Tabstrip	ts_fffff&lt;/P&gt;&lt;P&gt;Tableview 	tab_fffff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.  Replace &amp;lt;fffff&amp;gt; with meaningful text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.4	Logical Database&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text&lt;/P&gt;&lt;P&gt;3.	The maximum permissible length for LDB name is 20 characters. However, the name should be restricted to 15 characters to accommodate appropriate Include naming &lt;/P&gt;&lt;P&gt;4.	LDB Program and LDB Program Includes shall follow the naming convention Auto-Generated by SAP &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.5	SAP Scripts /Smartforms&lt;/P&gt;&lt;P&gt;Naming Convention: ZF&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text as illustrated in examples below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;Form Name	Description&lt;/P&gt;&lt;P&gt;ZFFI_EMP_CONF	Employee Confirmation Letter&lt;/P&gt;&lt;P&gt;ZFFI_ANN_TO	Annual Turnover Letter To Customers and Vendors&lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.6	Idocs&lt;/P&gt;&lt;P&gt;2.2.6.1	Idoc Types&lt;/P&gt;&lt;P&gt;Basic Type :&lt;/P&gt;&lt;P&gt;Naming Convention : ZB&amp;lt;FFFF&amp;gt;NN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.Replace &amp;lt;NN&amp;gt; with sequence number.&lt;/P&gt;&lt;P&gt;3.	Replace &amp;lt;ffff&amp;gt; with meaningful text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extension Type : ZX&amp;lt;Basic type name&amp;gt;_NN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;NN&amp;gt; with sequence number .&lt;/P&gt;&lt;P&gt;2.2.6.2	Message Types&lt;/P&gt;&lt;P&gt;Naming Convention :  ZM&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes :&lt;/P&gt;&lt;P&gt;1.   Replace &amp;lt;mm&amp;gt; with module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.  Replace &amp;lt;ffff&amp;gt; with meaningful text .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.6.3	 Process Code&lt;/P&gt;&lt;P&gt;Naming Convention :  Z&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes :&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;ffff&amp;gt; with meaningful text ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.6.4	IDOC Segments&lt;/P&gt;&lt;P&gt;Naming Convention :  Z1&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes :&lt;/P&gt;&lt;P&gt;1.Replace &amp;lt;ffff&amp;gt; with meaningful text as illustrated in examples below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.7	Transaction Code&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	The tcode name is provided by SAP TIN The Developer must write a mail to SAP Tin asking for the T-Code name with a filled form. &lt;/P&gt;&lt;P&gt;The form can be found at :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.8	Function Groups&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with relevant module code as given above&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text. &lt;/P&gt;&lt;P&gt;2.2.8.1	Function Group Include Programs&lt;/P&gt;&lt;P&gt;Naming Convention: LZ&amp;lt;Function Group&amp;gt;&amp;lt;Inn&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	All includes of Function Group program will be prefixed by LZ, followed by the Function Group name&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;Inn&amp;gt; with include type and sequence number. Use the values from the table given in 2.2.2.1&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;Include Name	Function Group Name	Description&lt;/P&gt;&lt;P&gt;SAPLZMMPURCHASING	ZMMPURCHASING	F.Group-Purchasing: Main Program&lt;/P&gt;&lt;P&gt;LZMMPURCHASINGO01	ZMMPURCHASING	F.Group-Purchasing: PBO&lt;/P&gt;&lt;P&gt;LZMMPURCHASINGI01	ZMMPURCHASING	F.Group-Purchasing: PAI&lt;/P&gt;&lt;P&gt;LZMMPURCHASINGF01	ZMMPURCHASING	F.Group-Purchasing: Forms&lt;/P&gt;&lt;P&gt;LZMMPURCHASINGTOP	ZMMPURCHASING	F.Group-Purchasing: Data Declarations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.8.2	Function Modules&lt;/P&gt;&lt;P&gt;2.2.8.2.1	Normal Function Modules&lt;/P&gt;&lt;P&gt;Convention: Z_&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with relevant module code as given above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text. &lt;/P&gt;&lt;P&gt;2.2.8.2.2	IDOC Function Modules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Convention: Z_IDOC_&amp;lt;mode&amp;gt;_&amp;lt;msg type&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mode&amp;gt; with INPUT or OUTPUT depending on whether the function processes incoming or outgoing IDOC.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;msg type&amp;gt; with the IDOC message type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.9	Dictionary Objects&lt;/P&gt;&lt;P&gt;Tables:	 Z&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Structures:	 ZS&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Views:	 ZV&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Data Element:	 ZDE&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Domain:	 ZDO&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Table Type:	 ZTT&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Type Group:	 Z&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Search Help:	 ZSH&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Lock Object:	 EZ&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with module code given above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text. &lt;/P&gt;&lt;P&gt;2.2.10	Message Class&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with Module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with the sub-landscape of the Module that this Message Class caters to as illustrated in examples below.&lt;/P&gt;&lt;P&gt;3.	The maximum permissible length for development class is 30 characters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;Msg. Class	Description&lt;/P&gt;&lt;P&gt;ZFI_AR	FI: Account Receivables&lt;/P&gt;&lt;P&gt;ZCO_CCA	CO: Cost Center Accounting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.11	Enhancement Projects (User Exits)&lt;/P&gt;&lt;P&gt;Convention: Z&amp;lt;XX&amp;gt;&amp;lt;nn&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes: &lt;/P&gt;&lt;P&gt;1.	XX is the application area code e.g. for sales it is SD etc.&lt;/P&gt;&lt;P&gt;2.	'nn'  is one up number for one application area. It starts with 001.&lt;/P&gt;&lt;P&gt;3.	Maximum length of the Project name is 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:  The name of the SD enhancement project can be ZSD001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.12	LSMW Objects&lt;/P&gt;&lt;P&gt;2.2.12.1	Project&lt;/P&gt;&lt;P&gt;Naming Convention: ZM_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	1.	Replace &amp;lt;ffff&amp;gt; with meaningful text &lt;/P&gt;&lt;P&gt;2.	The maximum permissible length for Project name is 16 characters. But please limit it to 12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example : ZM_VENDOR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.12.2	SubProject&lt;/P&gt;&lt;P&gt;Naming Convention: ZM_&amp;lt;ffff&amp;gt;_&amp;lt;n&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;	Suffix Project name with a running sequence no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example : ZM_VENDOR_1&lt;/P&gt;&lt;P&gt;2.2.12.3	Object&lt;/P&gt;&lt;P&gt;Naming Convention: ZM_&amp;lt;ffff&amp;gt;_&amp;lt;n&amp;gt;&amp;lt;n&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;	Suffix Subproject name with a running sequence no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example : ZM_VENDOR_11&lt;/P&gt;&lt;P&gt;2.2.13	Classes&lt;/P&gt;&lt;P&gt;Naming Convention: ZCL_[IM/DF/BSPCO/BSPHN/BADI]_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	IM: Implementation Class;&lt;/P&gt;&lt;P&gt;DF: Definition Class&lt;/P&gt;&lt;P&gt;BSPCO: BSP Controller class&lt;/P&gt;&lt;P&gt;BSPHN: BSP Handler class&lt;/P&gt;&lt;P&gt;BADI : BADI implementation &lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text: In case of Implementation classes, it should preferably be the same as that of the Definition Class&lt;/P&gt;&lt;P&gt;3.	Example:&lt;/P&gt;&lt;P&gt;IMPLEMENTATION Class: ZCL_IM_REBATE_SETTL&lt;/P&gt;&lt;P&gt;DEFINITION: ZCL_DF_REBATE_SETTL&lt;/P&gt;&lt;P&gt;2.2.14	BOR Object Types&lt;/P&gt;&lt;P&gt;Object	Convention	Example&lt;/P&gt;&lt;P&gt;Supertype	Z&amp;lt;ffff&amp;gt;	ZLVAPPL&lt;/P&gt;&lt;P&gt;SubType	Z&amp;lt;SuperType&amp;gt;&amp;lt;nn&amp;gt;	ZZLVAPPL01&lt;/P&gt;&lt;P&gt;Program	&amp;lt;Subtype&amp;gt;	ZZLVAPPL01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;nn&amp;gt; with a running 2 digit serial Number&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.15	Screen / Transaction Variants&lt;/P&gt;&lt;P&gt;Naming Convention: &amp;lt;tcode&amp;gt;_&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Where:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;tcode&amp;gt; with the t-code that will be assigned to this Variant&lt;/P&gt;&lt;P&gt;2.	Replace ffff with a meaningful text&lt;/P&gt;&lt;P&gt;E.g.:&lt;/P&gt;&lt;P&gt;For an SE16 variant for table KONA that will be used by T-Code Z_CH_SD_001:&lt;/P&gt;&lt;P&gt;Z_CH_SD_001_KONA&lt;/P&gt;&lt;P&gt;2.2.16	Area Menu&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;_&amp;lt;Main Menu&amp;gt;_&amp;lt;Sub Menu&amp;gt;&amp;#133;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Where:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with the Module code&lt;/P&gt;&lt;P&gt;2.	Followed by the hierarchical position of the immediate parent of this Area Menu&lt;/P&gt;&lt;P&gt;3.	Followed by a Meaningful text for this Menu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g.:&lt;/P&gt;&lt;P&gt;ZSD&lt;/P&gt;&lt;P&gt;ZSD_TAB&lt;/P&gt;&lt;P&gt;ZSD_TAB_VIEW&lt;/P&gt;&lt;P&gt;ZSD_TAB_UPDT&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Clusters of Transactions should be introduced as Sub-Menus rather than as Folders&lt;/P&gt;&lt;P&gt;2.	As a gradual process, the current Clusters that exist as Folders should also be replaced with Sub-Menus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.3	Naming of Sub-Objects&lt;/P&gt;&lt;P&gt;2.3.1	Program Sub-Objects&lt;/P&gt;&lt;P&gt;Naming of all the internal components of a program will be consistent across the project. &lt;/P&gt;&lt;P&gt;Naming Convention: &amp;lt;Prefix&amp;gt;ffff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;Prefix&amp;gt; with the component prefix values given in the table below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program Component	Prefixed by&lt;/P&gt;&lt;P&gt;Program Constants	C_&lt;/P&gt;&lt;P&gt;Global Variables	W_&lt;/P&gt;&lt;P&gt;Types Definition	T_&lt;/P&gt;&lt;P&gt;Global Structures	WA_&lt;/P&gt;&lt;P&gt;Global Internal Tables	I_&lt;/P&gt;&lt;P&gt;Select-Options	SO_&lt;/P&gt;&lt;P&gt;Parameters	PO_&lt;/P&gt;&lt;P&gt;Table Type	TT_&lt;/P&gt;&lt;P&gt;Field Symbols	FS_&lt;/P&gt;&lt;P&gt;Ranges	R_&lt;/P&gt;&lt;P&gt;Local Constants	LC_&lt;/P&gt;&lt;P&gt;Local Variables	L_&lt;/P&gt;&lt;P&gt;Local Static Variables	LS_&lt;/P&gt;&lt;P&gt;Local Internal Tables	LI_&lt;/P&gt;&lt;P&gt;Local Work Area	LWA_&lt;/P&gt;&lt;P&gt;Local Range	LR_&lt;/P&gt;&lt;P&gt;Field Groups	FG_&lt;/P&gt;&lt;P&gt;Container 	CO_&lt;/P&gt;&lt;P&gt;Macro	MA_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important: The Same sequence as above must be followed in the Data declaration part of all the ABAP/4 programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.3.2	SAP Script /Smartform sub-objects&lt;/P&gt;&lt;P&gt;Naming of all the internal components of a SAPScript/SmartForm shall follow the same convention as for Programs (2.2.2), with the addition of the Field Label on the FRS. E.g. if the FRS has labeled a field for Sales Order Number as Field 27 on the Layout, the variable name should be W_27_VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.	General Programming Guidelines&lt;/P&gt;&lt;P&gt;3.1	Modification Logs&lt;/P&gt;&lt;P&gt;At the top of every ABAP Object Modified by a Developer, there should be a Modification Log Every Line Created/Changed by the developer should be Identifiable by the TR Number. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP Patterns: Following Patterns should be used for Uniform ModLogs:&lt;/P&gt;&lt;P&gt;Nature of Change	Pattern to Use&lt;/P&gt;&lt;P&gt;New Development	ZZNEWPROG&lt;/P&gt;&lt;P&gt;In-Line Logs	ZZLINE&lt;/P&gt;&lt;P&gt;Modification Logs at the Top of Object	ZZMODLOG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.2	Program Organization&lt;/P&gt;&lt;P&gt;All the programs will be organized as described below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.2.1	Executable Programs&lt;/P&gt;&lt;P&gt;TOP Include: For global data declarations&lt;/P&gt;&lt;P&gt;Form Include: For definition of all the FORMs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.2.2	Dialog Programs&lt;/P&gt;&lt;P&gt;TOP Include: For global data declarations&lt;/P&gt;&lt;P&gt;Form Include: For definition of all the FORMs. &lt;/P&gt;&lt;P&gt;PBO Include: Include for PBO Modules&lt;/P&gt;&lt;P&gt;PAI Include: Include for PAI Modules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.3	Package&lt;/P&gt;&lt;P&gt;All the related objects within a sub-module of SAP will be developed under a single Package.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.3.1	Adding Components to existing objects&lt;/P&gt;&lt;P&gt;When adding new workbench components to existing Objects, the same Package will be used as has been used for the existing Components&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.3.2	Creation of New Objects&lt;/P&gt;&lt;P&gt;When creating new Objects or new Sub-lanscapes, Packages used should have the Naming convention as in Section 2 Above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.4	Program Messages&lt;/P&gt;&lt;P&gt;All the messages within a sub-module of SAP will be grouped under a single Message Class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.4.1	Adding Messages to existing landscapes&lt;/P&gt;&lt;P&gt;When adding new messages for existing Objects, the same Message Class will be used as has been used for the existing Objects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.4.2	Creation of New Objects&lt;/P&gt;&lt;P&gt;When creating new Objects or new Sub-landscapes, Message classes used should have the Naming convention as in Section 2 Above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.5	Dictionary Objects&lt;/P&gt;&lt;P&gt;Whenever you create a Z table in  system always include MANDT field as the first field, except when the table contains client independent data. Also create the table with attribute Data Class as USER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.	Structure of ABAP Programs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.1	Type&lt;/P&gt;&lt;P&gt;&amp;#149;	When an ABAP program is run, its processing blocks are called. ABAP programs are controlled from outside the program itself by the processors in the current work process. For the purposes of program flow, we can summarize the screen processor and ABAP processor into the ABAP runtime environment. The runtime environment controls screens and ABAP processing blocks. It contains a range of special control patterns that call screens and processing blocks in certain orders. These sections are also called processors. When a ABAP program is run, the control passes between various processors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	In the R/3 System, there are various types of ABAP program. The program type determines the basic technical attributes of the program, and must be set when created. The main difference between the different program types is the way in which the runtime environment calls its processing blocks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	When an application program is run, it must at least call the first processing block from outside the program, that is, from the runtime environment. This processing block can then either call further processing blocks or return control to the runtime environment. When an ABAP program is started, the runtime environment starts a processor (dependent on the program type), which calls the first ABAP processing block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	The following program types are relevant to application programming:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Type 1 programs have the important characteristic that they do not have to be controlled using user-defined screens. Instead, they are controlled by the runtime environment, which calls a series of processing blocks (and selection screens and lists where necessary) in a fixed sequence. User actions on screens can then trigger further processing blocks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type M&lt;/P&gt;&lt;P&gt;&amp;#149;	The most important technical attribute of a type M program is that it can only be controlled using screen flow logic and run via a transaction code which is linked to the program and one of its screens (initial screen). &lt;/P&gt;&lt;P&gt;&amp;#149;	ABAP programs with type M contain the dialog modules belonging to the various screens. They are therefore known as module pools.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Type F&lt;/P&gt;&lt;P&gt;&amp;#149;	Type F programs are containers for function modules, and cannot be started using a transaction code or by entering their name directly. &lt;/P&gt;&lt;P&gt;&amp;#149;	Type F programs are known as function groups. Function modules may only be programmed in function groups. The Function Builder is a tool in the ABAP Workbench that is used to create function groups and function modules. Apart from function modules, function groups can contain global data declarations and subroutines. These are visible to all function modules in the group. They can also contain event blocks for screens in function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type K&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Type K programs are containers for global classes in ABAP Objects. Type K programs are known as class definitions. The Class Builder is a tool in the ABAP Workbench that can be used to create class definitions.	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type J&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Type J programs are containers for global interface in ABAP Objects. Type J programs are known as interface definitions and are created in the Class Builder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type I&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Type I programs - called includes - are a means of dividing up program code into smaller, more manageable units. The coding of an include program can be inserted at any point in another ABAP program using the INCLUDE statement. There is no technical relationship between include programs and processing blocks. Includes are more suitable for logical programming units, such as data declarations, or sets of similar processing blocks. The ABAP Workbench has a mechanism for automatically dividing up module pools and function groups into include programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.2	Status&lt;/P&gt;&lt;P&gt;P = SAP standard production program&lt;/P&gt;&lt;P&gt;K = Customer production program&lt;/P&gt;&lt;P&gt;S = System program&lt;/P&gt;&lt;P&gt;T = Test program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Application&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Categorize the program according to the purpose it fulfills.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.3	Authority Check&lt;/P&gt;&lt;P&gt;Authority checks will be carried out as given in the respective FRS&amp;#146;s.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.4	Program Structure&lt;/P&gt;&lt;P&gt;ABAP programs are responsible for data processing within the individual dialog steps (ie. events) of an application program. This means that the program cannot be constructed as a single sequential unit, but must be divided into sections that can be assigned to the individual dialog steps. To meet this requirement, ABAP programs should have a modular structure. Each module is called a processing block. A processing block consists of a set of ABAP statements. When a program is run, effectively a series of processing blocks is called. Therefore, they should not be nested but modularized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Each ABAP program consists of the following two parts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.4.1	Declaration data for global data, classes and selection screens&lt;/P&gt;&lt;P&gt;&amp;#149;	The first part of an ABAP program is the declaration part for global data, classes, and selection screens. This consists of:&lt;/P&gt;&lt;P&gt;&amp;#149;	All declaration statements for global data. Global data is visible in all internal  processing   blocks and should be defined using declarative statements that appear before the first processing block, in dialog modules, or in event blocks. Local data should not be declared in dialog modules or event blocks. &lt;/P&gt;&lt;P&gt;&amp;#149;	All selection screen definitions. &lt;/P&gt;&lt;P&gt;&amp;#149;	All local class definitions (CLASS DEFINITION statement). Local classes are part of ABAP Objects, the object-oriented extension of ABAP.&lt;/P&gt;&lt;P&gt;&amp;#149;	Declaration statements which occur in procedures (methods, subroutines, function modules) form the declaration part for local data in those processing blocks. This data is only visible within the procedure in which it is declared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.4.2	Container for Processing Blocks&lt;/P&gt;&lt;P&gt;&amp;#149;	The second part of an ABAP program contains all of the processing blocks for the program. The following types of processing blocks are allowed:&lt;/P&gt;&lt;P&gt;1.	Dialog modules (no local data area) &lt;/P&gt;&lt;P&gt;2.	Event blocks (no local data area) &lt;/P&gt;&lt;P&gt;3.	Procedures (methods, subroutines and function modules with their own local data area).&lt;/P&gt;&lt;P&gt;&amp;#149;	Whereas dialog modules and procedures are enclosed in the ABAP keywords which define them, event blocks are introduced with event keywords and concluded implicitly by the beginning of the next processing block. &lt;/P&gt;&lt;P&gt;&amp;#149;	All ABAP statements (except declarative statements in the declaration part of the program) are part of a processing block. Non-declarative ABAP statements, which occur between the declaration of global data and a processing block are automatically assigned to the START-OF-SELECTION processing block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.4.3	Calling Processing Blocks&lt;/P&gt;&lt;P&gt;&amp;#149;	Processing blocks can be called from either the ABAP program or using ABAP commands which are themselves part of a processing block. Dialog modules and event blocks are called from outside the ABAP program. Procedures are called using ABAP statements in ABAP programs.&lt;/P&gt;&lt;P&gt;&amp;#149;	Calling event blocks is different from calling other processing blocks for the following reasons: &lt;/P&gt;&lt;P&gt;&amp;#149;	An event block call is triggered by an event. User actions on selection screens and lists, and the runtime environment trigger events that can be processed in ABAP programs. Define event blocks for the events that the program needs to react to (whereas a subroutine call, for example, must have a corresponding subroutine). This ensures that while an ABAP program may react to a particular event, it is not forced to do so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.5	Screen Flow Logic (Dialog Programs)&lt;/P&gt;&lt;P&gt;4.5.1	Place the AT EXIT COMMAND at the beginning of the flow logic.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT&lt;/P&gt;&lt;P&gt;   MODULE EXIT_1170 AT EXIT-COMMAND.&lt;/P&gt;&lt;P&gt;   MODULE PAINT_1170.&lt;/P&gt;&lt;P&gt;4.5.2	Use FIELD and CHAIN statements to keep fields in error open for correction.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;   PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;   MODULE EXIT_1170 AT EXIT-COMMAND.&lt;/P&gt;&lt;P&gt;   CHAIN.&lt;/P&gt;&lt;P&gt;      FIELD BTCH1170-JOBNAME.&lt;/P&gt;&lt;P&gt;      FIELD BTCH1170-USERNAME.&lt;/P&gt;&lt;P&gt;      FIELD BTCH1170-FROM_DATE.&lt;/P&gt;&lt;P&gt;      FIELD BTCH1170-FROM_TIME.&lt;/P&gt;&lt;P&gt;      MODULE PAINT_1170.&lt;/P&gt;&lt;P&gt;   ENDCHAIN.&lt;/P&gt;&lt;P&gt;4.6	Main Program&lt;/P&gt;&lt;P&gt;4.6.1	Events&lt;/P&gt;&lt;P&gt;The Program MUST NOT be coded without the use of Proper Coding blocks&lt;/P&gt;&lt;P&gt;&amp;#149;	Initializations&lt;/P&gt;&lt;P&gt;&amp;#149;	Top-of-page during line-selection&lt;/P&gt;&lt;P&gt;&amp;#149;	At Selection-Screen&lt;/P&gt;&lt;P&gt;&amp;#149;	At Line-Selection&lt;/P&gt;&lt;P&gt;&amp;#149;	At User-Command&lt;/P&gt;&lt;P&gt;&amp;#149;	At Pfn&lt;/P&gt;&lt;P&gt;&amp;#149;	Start-Of-Selection&lt;/P&gt;&lt;P&gt;&amp;#149;	Top-Of-Page&lt;/P&gt;&lt;P&gt;&amp;#149;	Get&lt;/P&gt;&lt;P&gt;&amp;#149;	End-Of-Page&lt;/P&gt;&lt;P&gt;&amp;#149;	End-Of-Selection&lt;/P&gt;&lt;P&gt;NOTE: The coding for each event should be logically split into forms (subroutines). That is to say, each event will comprise mostly of &amp;#145;PERFORM&amp;#146; statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.	General Coding Standards&lt;/P&gt;&lt;P&gt;5.1	One command per line&lt;/P&gt;&lt;P&gt;Each ABAP/4 command consists of a sentence ending with a period. Multiple commands can be on one line; however, as a standard start each new command on a new line. This will allow for easier deleting, commenting, and debugging.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.2	Indented Source Code&lt;/P&gt;&lt;P&gt;The ABAP/4 editor has a "Pretty Printer" command to indent by 2 positions specific lines of code and add subroutine comments. Event keywords are typically not indented.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.3	Extended Syntax Check&lt;/P&gt;&lt;P&gt;Extended Program Check (EPC) to be done on each object to make sure the code is Syntactically correct. There should be no Error/warning messages in the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.4	Reusability and Modularity&lt;/P&gt;&lt;P&gt;If a block of code is executed more than once, it should be placed in a subroutine at the bottom of the code. This makes the code more readable, requires less indentation, and is easier to debug since the debugger can jump through an entire subroutine via a PF key. Also, when possible parameters should be passed to and from subroutines to make the purpose easier to understand and reduce the need for global variables. Always document the purpose of each parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.5	Text Handling&lt;/P&gt;&lt;P&gt;Text elements must be used to display any text messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.6	Usage of System Variables&lt;/P&gt;&lt;P&gt;The system variables should be used wherever possible. The SY-SUBRC is to be checked after any function call, selection operation, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.7	Chaining Statements&lt;/P&gt;&lt;P&gt;&amp;#149;	Consecutive sentences with an identical beginning shall be combined into a chained statement.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Instead of the statements&lt;/P&gt;&lt;P&gt;MOVE SY-MANDT TO D00001-MANDT.&lt;/P&gt;&lt;P&gt;MOVE SY-LANGU TO D00001-SPRAS.&lt;/P&gt;&lt;P&gt;A chained statement shall be used&lt;/P&gt;&lt;P&gt;MOVE:&lt;/P&gt;&lt;P&gt;   		SY-MANDT TO D00001-MANDT,&lt;/P&gt;&lt;P&gt;   		SY-LANGU TO D00001-SPRAS,&lt;/P&gt;&lt;P&gt;   		SY-UNAME TO D00001-BNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.8	Common Routines&lt;/P&gt;&lt;P&gt;&amp;#149;	Standard sub-routines should be implemented as FUNCTION's rather than a FORM (ie. SUBROUTINE). A FUNCTION is easier to maintain and can be easily tested without a calling program. Standard SAP function modules are also available and the function library should be used to check if function modules already exist for a function that needs to be performed i.e.POPUP_TO_CONFIRM_LOSS_OF_DATA etc.&lt;/P&gt;&lt;P&gt;&amp;#149;	Includes can also be created for re-usable or common code e.g. common data declaration statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.9	Dialog Messages&lt;/P&gt;&lt;P&gt;Dialogue messages are stored in table T100. Programmers shall check to see if an appropriate message exists before adding a new message. Programs shall use the message-id which corresponds to the SAP module that the program most relates to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.10	Function Keys&lt;/P&gt;&lt;P&gt;PF-keys should be programmed to execute functions where required. SAP Standard function keys should be used where appropriate. The most commonly used buttons should be displayed as pushbuttons in the application toolbar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.11	Enqueuing and Dequeuing Data Objects&lt;/P&gt;&lt;P&gt;&amp;#149;	All database objects being processed by a program, for purposes other than for display, shall be enqueued before such processing is executed. If the enqueue is unsuccessful, then a message shall be returned stating why the enqueue was unsuccessful. &lt;/P&gt;&lt;P&gt;&amp;#149;	Enqueue and Dequeue objects should be created via the data dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.12	Error Handling (SY-SUBRC)&lt;/P&gt;&lt;P&gt;&amp;#149;	Return codes shall always be checked immediately after an event which returns a code.   &lt;/P&gt;&lt;P&gt;Eg. Function calls, Select statements, Updates etc.&lt;/P&gt;&lt;P&gt;&amp;#149;	The value of SY-SUBRC is 0 when successful and generally produces a value of 4 when unsuccessful (there are a few exceptions).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, rather check SY-SUBRC with:&lt;/P&gt;&lt;P&gt;   	   IF SY-SUBRC &amp;lt;&amp;gt; 0 &lt;/P&gt;&lt;P&gt;than with&lt;/P&gt;&lt;P&gt;   	 IF SY-SUBRC = 4  (which is redundant and makes the system do a double check)&lt;/P&gt;&lt;P&gt;&amp;#149;	Error messages displayed to the user must be clear and descriptive.&lt;/P&gt;&lt;P&gt;&amp;#149;	Remember to group related / dependant steps together and to Rollback all changes for steps in that group should any one of them fail, thus maintaining the integrity of the system.&lt;/P&gt;&lt;P&gt;&amp;#149;	Check whether an Error Log, (file), must be produced by your program and if so check on the format of the file.&lt;/P&gt;&lt;P&gt;&amp;#149;	If any Error Logging is done to a custom table in the database then make sure this table is maintained and monitored correctly. (Dev. Note)&lt;/P&gt;&lt;P&gt;&amp;#149;	Transaction SE91 provides the facility to create and utilize messages in their appropriate message class. Elaborate on the message if necessary, using the long text documentation for that message number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.13	General Conventions and Hints&lt;/P&gt;&lt;P&gt;&amp;#149;	There should be NO hard coding of values in programs &amp;#150; easy maintainability&lt;/P&gt;&lt;P&gt;&amp;#149;	For amounts, use the CURRENCY command in write statements to automatically convert fields into their correct decimal format. The currency specified in the write statement is treated as a key for the table TCURX. If no entry exists for the currency specified, the system assumes two decimal places.&lt;/P&gt;&lt;P&gt;&amp;#149;	For quantities, use the UNIT command in write statements to automatically convert fields into their correct decimal format. The contents of the unit specified are used on table T006. If no entry exists for the unit specified, the formatting has no effect.&lt;/P&gt;&lt;P&gt;&amp;#149;	Use the &amp;#145;LIKE&amp;#146; statement as often as possible to declare &amp;#145;DATA&amp;#146; variables instead of an explicit &amp;#145;TYPE&amp;#146; declarations.&lt;/P&gt;&lt;P&gt;&amp;#149;	Try to use the &amp;#145;INCLUDE&amp;#146; statement with standard SAP structures and tables for your structures and internal tables where possible.  If you use the include statement to include other program components in your code then document what those components are, what they do and how to use them.&lt;/P&gt;&lt;P&gt;&amp;#149;	Try to make use of standard SAP Function Modules wherever possible rather than building your own. Use the pull down functionality in transaction SE37 to find suitable standard function modules. &lt;/P&gt;&lt;P&gt;&amp;#149;	Make use of the SAP PATTERN tool to automatically insert the standard code for:&lt;/P&gt;&lt;P&gt;&amp;#149;	CALL FUNCTION&lt;/P&gt;&lt;P&gt;&amp;#149;	MESSAGE ID&lt;/P&gt;&lt;P&gt;&amp;#149;	SELECT*FROM&lt;/P&gt;&lt;P&gt;&amp;#149;	PERFORM&lt;/P&gt;&lt;P&gt;&amp;#149;	AUTHORITY-CHECK&lt;/P&gt;&lt;P&gt;&amp;#149;	WRITE&lt;/P&gt;&lt;P&gt;&amp;#149;	CASE&lt;/P&gt;&lt;P&gt;&amp;#149;	CALL DIALOG&lt;/P&gt;&lt;P&gt;&amp;#149;	The standard date format to use is &amp;#145;DD/MM/YYYY&amp;#146;. (Dev. Note)&lt;/P&gt;&lt;P&gt;The standard time format to use is &amp;#145;HH:MM:SS&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.14	Parameters in Sub-Routines&lt;/P&gt;&lt;P&gt;Naming convention for Parameters in subroutine is P_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.	Performance Standards&lt;/P&gt;&lt;P&gt;6.1	General Tips on Performance Tuning&lt;/P&gt;&lt;P&gt;6.1.1	Avoid Redundant code&lt;/P&gt;&lt;P&gt;Avoid leaving "dead" code in the program. Comment out variables that are not referenced and code that is not executed. To analyze the program, use the Program Analysis function in SE38 -&amp;gt; Utilities -&amp;gt; Program Analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.2	Subroutine Usage&lt;/P&gt;&lt;P&gt;For good modularization, the decision of whether or not to execute a subroutine should be made before the subroutine is called. &lt;/P&gt;&lt;P&gt;Example: &lt;/P&gt;&lt;P&gt;IF f1 NE 0.&lt;/P&gt;&lt;P&gt;  PERFORM sub1.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;FORM sub1.&lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.3	Case vs. Nested IF&lt;/P&gt;&lt;P&gt;When testing fields "equal to" something, one can use either the nested IF or the CASE statement. The CASE is better for two reasons. It is easier to read and after about five nested IFs the performance of the CASE is more efficient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.4	Using the MOVE Statement&lt;/P&gt;&lt;P&gt;When records a and b have the exact same structure, it is more efficient to MOVE a TO b than to MOVE-CORRESPONDING a TO b.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5	SELECT Queries&lt;/P&gt;&lt;P&gt;The performance of  any ABAP program mainly depends on the ABAP Queries used in it. More optimum the queries , better the performance. Take care of the points mentioned nin the following sections while writing any ABAP queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.1	Using all the keys in SELECT statement&lt;/P&gt;&lt;P&gt;When using the SELECT statement, study the key and always provide as much of the left-most part of the key as possible. The SELECT * command is to be avoided everywhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.2	Fetching Single Record&lt;/P&gt;&lt;P&gt;If the entire key can be qualified, code a SELECT SINGLE not just a SELECT. If all the keys are not available, we should use SELECT UPTO 1 ROWS if we are interested only in the first record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.3	Avoid SELECT-ENDSELECT&lt;/P&gt;&lt;P&gt;Selecting data into an internal table using an array fetch versus a SELECT-ENDELECT loop will give at least a 2x performance improvement.  After the data has been put into the internal data, then row-level processing can be done.   &lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;select ... from table &amp;lt;..&amp;gt;&lt;/P&gt;&lt;P&gt;           into &amp;lt;itab&amp;gt; &lt;/P&gt;&lt;P&gt;           where ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at &amp;lt;itab&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;do the row-level processing here&amp;gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.4	Using Indexs&lt;/P&gt;&lt;P&gt;Use indexes wherever possible. Tune the Query so that optimum Indexing will happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.5	Provide all the keys&lt;/P&gt;&lt;P&gt;Give as many keys as possible in the WHERE clause to optimize the database fetching. Use the Index fields in the first position to optimize performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.6	Avoid &amp;#147;INTO CORRESPONDING&amp;#148;&lt;/P&gt;&lt;P&gt;Avoid using INTO CORESPONDING FIELDS of Table. Instead, explicitly mention the fields. Else, The Table Fields should be in the same sequence as the selection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.7	SELECT statement inside LOOP&lt;/P&gt;&lt;P&gt;Do not write SELECT statements inside the loop. Instead, use the FOR ALL ENTRIES Command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before using FOR ALL ENTRIES command, check that the &lt;/P&gt;&lt;P&gt;1.	Corresponding Internal table is not empty. If the Internal table is empty, the statement will select ALL the entries in the Database&lt;/P&gt;&lt;P&gt;2.	The Internal table is sorted by the Filed used in the Where Clause: This makes selection faster&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.8	Nested SELECT statement&lt;/P&gt;&lt;P&gt;Avoid Using nested SELECT statements. Instead, make use of different internal tables to fetch the data, and Use Nested LOOPS to read them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.9	Select Distinct&lt;/P&gt;&lt;P&gt;Whenever its possible avoid SELECT DISTINCT, instead select data into internal table, sort and use DELETE ADJACENT DUPLICATES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.10	Use of OR in Where Clause&lt;/P&gt;&lt;P&gt;Do not use OR when selecting data from DB table using an index because The optimizer generally stops if the WHERE condition contains an OR expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;Instead of &lt;/P&gt;&lt;P&gt;	SELECT * FROM spfli WHERE carrid = &amp;#145;LH&amp;#146;&lt;/P&gt;&lt;P&gt;			                AND (cityfrom = &amp;#145;FRANKFURT&amp;#146; OR &lt;/P&gt;&lt;P&gt;             city from = &amp;#145;NEWYORK&amp;#146;)&lt;/P&gt;&lt;P&gt;Use &lt;/P&gt;&lt;P&gt;	SELECT * FROM spfli WHERE (carrid = &amp;#145;LH&amp;#146; AND cityfrom = &amp;#145;FRANKFURT&amp;#146;)&lt;/P&gt;&lt;P&gt;			                   OR (carrid = &amp;#145;LH&amp;#146; AND cityfrom = &amp;#145;NEWYORK&amp;#146;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.11	Order By&lt;/P&gt;&lt;P&gt;ORDER BY will Bypass buffer. So, performance will decrease. If you want to sort data, it is efficient to SORT them in INTERNAL TABLE rather than using ORDER BY. Only use an ORDER BY in your SELECT if the order matches the index, which should be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.6	Using the READ statement&lt;/P&gt;&lt;P&gt;When reading a single record in an internal table, the READ TABLE WITH KEY is not a direct READ. The table needs to be sorted by the Key fields and the command READ TABLE WITH KEY BINARY SEARCH is to be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.7	Hashed table&lt;/P&gt;&lt;P&gt;If the number of entries in the Internal Table is high then use Hashed Table with Keys to access the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.8	Transporting&lt;/P&gt;&lt;P&gt;With READ or MODIFY Statements use TRANSPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.9	Using LDB&lt;/P&gt;&lt;P&gt;In order to improve performance in case of an LDB, individual tables can be excluded from selection. Under the section &amp;#145;Table Selection&amp;#146; in the Documentation of LDB the fields with proper description has been given those fields can be set in the application report at the time of INITIALIZATION or at the START OF SELECTION. This can enhance the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.10	Append Lines of&lt;/P&gt;&lt;P&gt;Whenever it is possible use APPEND LINES OF to append the internal Tables instead of using loop and then APPEND Statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.11	Use WHILE&lt;/P&gt;&lt;P&gt;Use WHILE instead of a DO+EXIT-construction, as WHILE is easier to understand and faster to execute&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.12	DELETE &amp;lt;itab&amp;gt; WHERE&lt;/P&gt;&lt;P&gt;Use DELETE &amp;lt;itab&amp;gt; WHERE&amp;#133;for deleting records from an internal table.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;Instead of &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;itab&amp;gt; WHERE &amp;lt;field&amp;gt; = &amp;#145;0001&amp;#146;&lt;/P&gt;&lt;P&gt;	DELETE &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;Use &lt;/P&gt;&lt;P&gt;DELETE &amp;lt;itab&amp;gt;  WHERE &amp;lt;field&amp;gt; = &amp;#145;0001&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.13	Using WHERE clause in LOOP&amp;#133;&amp;#133;.ENDLOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use:&lt;/P&gt;&lt;P&gt;Sort ITAB by NAME.&lt;/P&gt;&lt;P&gt;Loop at itab where name EQ SY-UNAME&lt;/P&gt;&lt;P&gt;.&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;Instead Of:&lt;/P&gt;&lt;P&gt;Read itab with key name = SY-UNAME.&lt;/P&gt;&lt;P&gt;L_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;Loop at itab from l_tabix.&lt;/P&gt;&lt;P&gt;If name eq &amp;#145;bijoy&amp;#146;&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 May 2007 10:45:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-18T10:45:03Z</dc:date>
    <item>
      <title>Abap program standards</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282702#M497066</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;     i need to design flow chart for checking for a program whether it satifies the abap coding standards or not. who to do it. if possible send me graphical representations [flow charts]  or links to find programming standards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some of my requirements in that folw chart are&lt;/P&gt;&lt;P&gt;  1. how to recognize a blank space in a given program,&lt;/P&gt;&lt;P&gt;  2. how to recognize a comment,&lt;/P&gt;&lt;P&gt;  3. how to check wheteher a keyword is used or not,&lt;/P&gt;&lt;P&gt;  4. how to identify the ' :' symbol&lt;/P&gt;&lt;P&gt;............&lt;/P&gt;&lt;P&gt;...........&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;suresh babu aluri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 10:34:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282702#M497066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T10:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Abap program standards</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282703#M497067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;In each orgn there will be a std programming stds that should be followed by all the developers.&lt;/P&gt;&lt;P&gt;It may vary from orgn to orgn.&lt;/P&gt;&lt;P&gt;It mostly contains the Naming conventions for the different Objects used in the Program, and the Standards of Code, like whether to use Nested Selects, Loops &lt;/P&gt;&lt;P&gt;conditions like IF..else.endif..case and endcase..&lt;/P&gt;&lt;P&gt;some of them are:&lt;/P&gt;&lt;P&gt;1) Dont use nested seelct statement&lt;/P&gt;&lt;P&gt;2) If possible use for all entries in addition&lt;/P&gt;&lt;P&gt;3) In the where addition make sure you give all the primary key&lt;/P&gt;&lt;P&gt;4) Use Index for the selection criteria.&lt;/P&gt;&lt;P&gt;5) You can also use inner joins&lt;/P&gt;&lt;P&gt;6) You can try to put the data from the first select statement into an Itab and then in order to select the data from the second table use for all entries in.&lt;/P&gt;&lt;P&gt;7) Use the runtime analysis SE30 and SQL Trace (ST05) to identify the performance and also to identify where the load is heavy, so that you can change the code accordingly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 10:39:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282703#M497067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T10:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Abap program standards</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282704#M497068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;plz go through this documementaion,&lt;/P&gt;&lt;P&gt;i think its helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP Programming StandardsContents&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Objective	5&lt;/P&gt;&lt;P&gt;2.	Naming Conventions	5&lt;/P&gt;&lt;P&gt;2.1	Codes for naming conventions	5&lt;/P&gt;&lt;P&gt;2.1.1	Module Codes	5&lt;/P&gt;&lt;P&gt;2.1.2	Free text	6&lt;/P&gt;&lt;P&gt;2.2	Naming Convention of Development Objects	6&lt;/P&gt;&lt;P&gt;2.2.1	Package	6&lt;/P&gt;&lt;P&gt;2.2.2	Executable Program	6&lt;/P&gt;&lt;P&gt;2.2.3	BSP Application	7&lt;/P&gt;&lt;P&gt;2.2.4	Logical Database	8&lt;/P&gt;&lt;P&gt;2.2.5	SAP Scripts /Smartforms	9&lt;/P&gt;&lt;P&gt;2.2.6	Idocs	9&lt;/P&gt;&lt;P&gt;2.2.7	Transaction Code	10&lt;/P&gt;&lt;P&gt;2.2.8	Function Groups	10&lt;/P&gt;&lt;P&gt;2.2.9	Dictionary Objects	11&lt;/P&gt;&lt;P&gt;2.2.10	Message Class	11&lt;/P&gt;&lt;P&gt;2.2.11	Enhancement Projects (User Exits)	11&lt;/P&gt;&lt;P&gt;2.2.12	LSMW Objects	12&lt;/P&gt;&lt;P&gt;2.2.13	Classes	12&lt;/P&gt;&lt;P&gt;2.2.14	BOR Object Types	13&lt;/P&gt;&lt;P&gt;2.2.15	Screen / Transaction Variants	13&lt;/P&gt;&lt;P&gt;2.2.16	Area Menu	13&lt;/P&gt;&lt;P&gt;2.3	Naming of Sub-Objects	13&lt;/P&gt;&lt;P&gt;2.3.1	Program Sub-Objects	13&lt;/P&gt;&lt;P&gt;2.3.2	SAP Script /Smartform sub-objects	14&lt;/P&gt;&lt;P&gt;3.	General Programming Guidelines	14&lt;/P&gt;&lt;P&gt;3.1	Modification Logs	14&lt;/P&gt;&lt;P&gt;3.2	Program Organization	15&lt;/P&gt;&lt;P&gt;3.2.1	Executable Programs	15&lt;/P&gt;&lt;P&gt;3.2.2	Dialog Programs	15&lt;/P&gt;&lt;P&gt;3.3	Package	15&lt;/P&gt;&lt;P&gt;3.3.1	Adding Components to existing objects	15&lt;/P&gt;&lt;P&gt;3.3.2	Creation of New Objects	15&lt;/P&gt;&lt;P&gt;3.4	Program Messages	15&lt;/P&gt;&lt;P&gt;3.4.1	Adding Messages to existing landscapes	15&lt;/P&gt;&lt;P&gt;3.4.2	Creation of New Objects	16&lt;/P&gt;&lt;P&gt;3.5	Dictionary Objects	16&lt;/P&gt;&lt;P&gt;4.	Structure of ABAP Programs	16&lt;/P&gt;&lt;P&gt;4.1	Type	16&lt;/P&gt;&lt;P&gt;4.2	Status	18&lt;/P&gt;&lt;P&gt;4.3	Authority Check	18&lt;/P&gt;&lt;P&gt;4.4	Program Structure	19&lt;/P&gt;&lt;P&gt;4.4.1	Declaration data for global data, classes and selection screens	19&lt;/P&gt;&lt;P&gt;4.4.2	Container for Processing Blocks	19&lt;/P&gt;&lt;P&gt;4.4.3	Calling Processing Blocks	20&lt;/P&gt;&lt;P&gt;4.5	Screen Flow Logic (Dialog Programs)	20&lt;/P&gt;&lt;P&gt;4.5.1	Place the AT EXIT COMMAND at the beginning of the flow logic.	20&lt;/P&gt;&lt;P&gt;4.5.2	Use FIELD and CHAIN statements to keep fields in error open for correction.	20&lt;/P&gt;&lt;P&gt;4.6	Main Program	20&lt;/P&gt;&lt;P&gt;4.6.1	Events	20&lt;/P&gt;&lt;P&gt;5.	General Coding Standards	21&lt;/P&gt;&lt;P&gt;5.1	One command per line	21&lt;/P&gt;&lt;P&gt;5.2	Indented Source Code	21&lt;/P&gt;&lt;P&gt;5.3	Extended Syntax Check	21&lt;/P&gt;&lt;P&gt;5.4	Reusability and Modularity	21&lt;/P&gt;&lt;P&gt;5.5	Text Handling	21&lt;/P&gt;&lt;P&gt;5.6	Usage of System Variables	22&lt;/P&gt;&lt;P&gt;5.7	Chaining Statements	22&lt;/P&gt;&lt;P&gt;5.8	Common Routines	22&lt;/P&gt;&lt;P&gt;5.9	Dialog Messages	22&lt;/P&gt;&lt;P&gt;5.10	Function Keys	23&lt;/P&gt;&lt;P&gt;5.11	Enqueuing and Dequeuing Data Objects	23&lt;/P&gt;&lt;P&gt;5.12	Error Handling (SY-SUBRC)	23&lt;/P&gt;&lt;P&gt;5.13	General Conventions and Hints	24&lt;/P&gt;&lt;P&gt;5.14	Parameters in Sub-Routines	24&lt;/P&gt;&lt;P&gt;6.	Performance Standards	25&lt;/P&gt;&lt;P&gt;6.1	General Tips on Performance Tuning	25&lt;/P&gt;&lt;P&gt;6.1.1	Avoid Redundant code	25&lt;/P&gt;&lt;P&gt;6.1.2	Subroutine Usage	25&lt;/P&gt;&lt;P&gt;6.1.3	Case vs. Nested IF	25&lt;/P&gt;&lt;P&gt;6.1.4	Using the MOVE Statement	25&lt;/P&gt;&lt;P&gt;6.1.5	SELECT Queries	25&lt;/P&gt;&lt;P&gt;6.1.6	Using the READ statement	27&lt;/P&gt;&lt;P&gt;6.1.7	Hashed table	27&lt;/P&gt;&lt;P&gt;6.1.8	Transporting	28&lt;/P&gt;&lt;P&gt;6.1.9	Using LDB	28&lt;/P&gt;&lt;P&gt;6.1.10	Append Lines of	28&lt;/P&gt;&lt;P&gt;6.1.11	Use WHILE	28&lt;/P&gt;&lt;P&gt;6.1.12	DELETE &amp;lt;itab&amp;gt; WHERE	28&lt;/P&gt;&lt;P&gt;6.1.13	Using WHERE clause in LOOP&amp;#133;&amp;#133;.ENDLOOP	28&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Objective&lt;/P&gt;&lt;P&gt;The objective of this document is to describe general programming guidelines, methodologies, Naming conventions and performance guidelines for all the programs developed for SAP Project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.	Naming Conventions&lt;/P&gt;&lt;P&gt;This chapter describes the naming conventions to be followed for naming the programming objects for SAP project. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.1	 Codes for naming conventions&lt;/P&gt;&lt;P&gt;The variable portion of naming convention is given with Code ID given in angle brackets(&amp;lt;&amp;gt;). Use the following tables for replacing code IDs with codes in the object naming. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.1.1	Module Codes&lt;/P&gt;&lt;P&gt;Code ID:  mm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Code	Description&lt;/P&gt;&lt;P&gt;FI	Finance &lt;/P&gt;&lt;P&gt;CO	Controlling Module&lt;/P&gt;&lt;P&gt;MM	Materials Management&lt;/P&gt;&lt;P&gt;PP 	Production Planning&lt;/P&gt;&lt;P&gt;SD	Sales &amp;amp; Distribution&lt;/P&gt;&lt;P&gt;QM 	Quality Management&lt;/P&gt;&lt;P&gt;PM	Plant Maintenance&lt;/P&gt;&lt;P&gt;IM	Inventory Management&lt;/P&gt;&lt;P&gt;WM	Warehouse Management&lt;/P&gt;&lt;P&gt;BC	Basis Module&lt;/P&gt;&lt;P&gt;BW	Business Warehouse&lt;/P&gt;&lt;P&gt;WF	Workflows (Master Data Management)&lt;/P&gt;&lt;P&gt;HR	Human Resources&lt;/P&gt;&lt;P&gt;EBP	EBP&lt;/P&gt;&lt;P&gt;PS	Project Systems&lt;/P&gt;&lt;P&gt;PCP	Synpro: Product Costing&lt;/P&gt;&lt;P&gt;PAP	Synpro: COPA&lt;/P&gt;&lt;P&gt;DP	APO :  Demand Planning&lt;/P&gt;&lt;P&gt;SP	APO :  Supply Network Planning &lt;/P&gt;&lt;P&gt;DS	 APO : Production Planning &amp;amp; Detailed Scheduling&lt;/P&gt;&lt;P&gt;AT	APO : Global ATP&lt;/P&gt;&lt;P&gt;TP	APO : Transportation Planning/Vehicle Scheduling&lt;/P&gt;&lt;P&gt;CI	Core Interface&lt;/P&gt;&lt;P&gt;LC	Live Cache &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.1.2	Free text&lt;/P&gt;&lt;P&gt;Code ID: ffff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Developer should replace &amp;#145;ffff&amp;#146; with meaningful text. The text can be multiple words separated by underscore. &lt;/P&gt;&lt;P&gt;2.2	Naming Convention of Development Objects&lt;/P&gt;&lt;P&gt;2.2.1	Package&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with Module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with the sub-landscape of the Module that this Message Class caters to as illustrated in examples below.&lt;/P&gt;&lt;P&gt;3.	The maximum permissible length for development class is 30 characters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;Dev. Class	Description&lt;/P&gt;&lt;P&gt;ZFI_AR	FI: Account Receivables&lt;/P&gt;&lt;P&gt;ZCO_CCA	CO: Cost Center Accounting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.2	Executable Program&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text as illustrated in examples below.&lt;/P&gt;&lt;P&gt;3.	The maximum permissible length for program name is 30 characters. However, the name should be restricted to 25 characters to accommodate appropriate Include naming as described in 2.2.2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;Program Name	Description&lt;/P&gt;&lt;P&gt;ZFI_VAT_RET	FI:  Report for VAT Return&lt;/P&gt;&lt;P&gt;ZMM_AUTO_GR	MM: Automated Goods Receipt&lt;/P&gt;&lt;P&gt;ZSD_XX_STCK_SHORTAGE	SD: Stock shortage report for stock allocation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.2.1	Includes for executable programs&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;_&amp;lt;Inn&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	All includes of executable program will be prefixed by Z, followed by the same program name as described in 2.2.2 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;Inn&amp;gt; with include type and sequence number. Use the following table for includes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include Type ID	Description&lt;/P&gt;&lt;P&gt;TOP	Top Include.&lt;/P&gt;&lt;P&gt;Fnn	Subroutine pool (Forms)&lt;/P&gt;&lt;P&gt;Inn	PAI Modules&lt;/P&gt;&lt;P&gt;Onn	PBO Modules&lt;/P&gt;&lt;P&gt;Xnn	Other Includes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The maximum permissible length for Include name is 30 characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;Include Name	Main Program Name	Description&lt;/P&gt;&lt;P&gt;ZFI_VAT_RET_TOP	ZFI_VAT_RET	FI:  Report for VAT Return &amp;#150; Top Include&lt;/P&gt;&lt;P&gt;ZFI_VAT_RET_F01	ZFI_VAT_RET	FI:  Report for VAT Return &amp;#150; Forms&lt;/P&gt;&lt;P&gt;ZMM_AUTO_GR_TOP	ZMM_FR_AUTO_GR	MM: &amp;#150; Automated Goods Receipt &amp;#150; Top include&lt;/P&gt;&lt;P&gt;ZMM_AUTO_GR_F01	ZMM_FR_AUTO_GR	MM:&amp;#150; Automated Goods Receipt &amp;#150; Forms&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.3	BSP Application&lt;/P&gt;&lt;P&gt;2.2.3.1	Main Application&lt;/P&gt;&lt;P&gt;Naming Convention: BSP Applications shall follow the same Naming Convention as Executable Programs i.e. Z&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text as illustrated in examples below.&lt;/P&gt;&lt;P&gt;2.2.3.2	Pages &amp;amp; Controllers&lt;/P&gt;&lt;P&gt;Naming Convention: &amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;ffff&amp;gt; with meaningful text, that adequately describes the function of the page/controller&lt;/P&gt;&lt;P&gt;2.2.3.3	Theme&lt;/P&gt;&lt;P&gt;Naming Convention: Z_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;ffff&amp;gt; with meaningful text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.3.4	Mime Objects:&lt;/P&gt;&lt;P&gt;Naming Convention: &amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;1.	A MIME Object can be logo for the company.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text, that adequately describes the function of the MIME objects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.3.5	Controller and Handler Classes:&lt;/P&gt;&lt;P&gt;See section Classes (Section 2.2.133)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.3.6	BSP Extension&lt;/P&gt;&lt;P&gt;Naming Convention: Z_&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;ffff&amp;gt; with meaningful text&lt;/P&gt;&lt;P&gt;2.2.3.7	BSP Layout elements id &lt;/P&gt;&lt;P&gt;Label:	lb_fffff&lt;/P&gt;&lt;P&gt;Input field:	if_fffff&lt;/P&gt;&lt;P&gt;Button:	b_fffff&lt;/P&gt;&lt;P&gt;Text Edit:	te_fffff&lt;/P&gt;&lt;P&gt;Text View:	tv_fffff&lt;/P&gt;&lt;P&gt;Radio button Group:	rbg_fffff&lt;/P&gt;&lt;P&gt;Radio button:	rb_fffff&lt;/P&gt;&lt;P&gt;Check Box Group:	cbg_fffff&lt;/P&gt;&lt;P&gt;Check Box	cb_fffff&lt;/P&gt;&lt;P&gt;Tray	tr_fffff&lt;/P&gt;&lt;P&gt;Tabstrip	ts_fffff&lt;/P&gt;&lt;P&gt;Tableview 	tab_fffff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.  Replace &amp;lt;fffff&amp;gt; with meaningful text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.4	Logical Database&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text&lt;/P&gt;&lt;P&gt;3.	The maximum permissible length for LDB name is 20 characters. However, the name should be restricted to 15 characters to accommodate appropriate Include naming &lt;/P&gt;&lt;P&gt;4.	LDB Program and LDB Program Includes shall follow the naming convention Auto-Generated by SAP &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.5	SAP Scripts /Smartforms&lt;/P&gt;&lt;P&gt;Naming Convention: ZF&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text as illustrated in examples below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;Form Name	Description&lt;/P&gt;&lt;P&gt;ZFFI_EMP_CONF	Employee Confirmation Letter&lt;/P&gt;&lt;P&gt;ZFFI_ANN_TO	Annual Turnover Letter To Customers and Vendors&lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.6	Idocs&lt;/P&gt;&lt;P&gt;2.2.6.1	Idoc Types&lt;/P&gt;&lt;P&gt;Basic Type :&lt;/P&gt;&lt;P&gt;Naming Convention : ZB&amp;lt;FFFF&amp;gt;NN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.Replace &amp;lt;NN&amp;gt; with sequence number.&lt;/P&gt;&lt;P&gt;3.	Replace &amp;lt;ffff&amp;gt; with meaningful text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extension Type : ZX&amp;lt;Basic type name&amp;gt;_NN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;NN&amp;gt; with sequence number .&lt;/P&gt;&lt;P&gt;2.2.6.2	Message Types&lt;/P&gt;&lt;P&gt;Naming Convention :  ZM&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes :&lt;/P&gt;&lt;P&gt;1.   Replace &amp;lt;mm&amp;gt; with module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.  Replace &amp;lt;ffff&amp;gt; with meaningful text .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.6.3	 Process Code&lt;/P&gt;&lt;P&gt;Naming Convention :  Z&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes :&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;ffff&amp;gt; with meaningful text ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.6.4	IDOC Segments&lt;/P&gt;&lt;P&gt;Naming Convention :  Z1&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes :&lt;/P&gt;&lt;P&gt;1.Replace &amp;lt;ffff&amp;gt; with meaningful text as illustrated in examples below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.7	Transaction Code&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	The tcode name is provided by SAP TIN The Developer must write a mail to SAP Tin asking for the T-Code name with a filled form. &lt;/P&gt;&lt;P&gt;The form can be found at :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.8	Function Groups&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with relevant module code as given above&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text. &lt;/P&gt;&lt;P&gt;2.2.8.1	Function Group Include Programs&lt;/P&gt;&lt;P&gt;Naming Convention: LZ&amp;lt;Function Group&amp;gt;&amp;lt;Inn&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	All includes of Function Group program will be prefixed by LZ, followed by the Function Group name&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;Inn&amp;gt; with include type and sequence number. Use the values from the table given in 2.2.2.1&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;Include Name	Function Group Name	Description&lt;/P&gt;&lt;P&gt;SAPLZMMPURCHASING	ZMMPURCHASING	F.Group-Purchasing: Main Program&lt;/P&gt;&lt;P&gt;LZMMPURCHASINGO01	ZMMPURCHASING	F.Group-Purchasing: PBO&lt;/P&gt;&lt;P&gt;LZMMPURCHASINGI01	ZMMPURCHASING	F.Group-Purchasing: PAI&lt;/P&gt;&lt;P&gt;LZMMPURCHASINGF01	ZMMPURCHASING	F.Group-Purchasing: Forms&lt;/P&gt;&lt;P&gt;LZMMPURCHASINGTOP	ZMMPURCHASING	F.Group-Purchasing: Data Declarations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.8.2	Function Modules&lt;/P&gt;&lt;P&gt;2.2.8.2.1	Normal Function Modules&lt;/P&gt;&lt;P&gt;Convention: Z_&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with relevant module code as given above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text. &lt;/P&gt;&lt;P&gt;2.2.8.2.2	IDOC Function Modules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Convention: Z_IDOC_&amp;lt;mode&amp;gt;_&amp;lt;msg type&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mode&amp;gt; with INPUT or OUTPUT depending on whether the function processes incoming or outgoing IDOC.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;msg type&amp;gt; with the IDOC message type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.9	Dictionary Objects&lt;/P&gt;&lt;P&gt;Tables:	 Z&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Structures:	 ZS&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Views:	 ZV&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Data Element:	 ZDE&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Domain:	 ZDO&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Table Type:	 ZTT&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Type Group:	 Z&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Search Help:	 ZSH&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Lock Object:	 EZ&amp;lt;mm&amp;gt;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with module code given above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text. &lt;/P&gt;&lt;P&gt;2.2.10	Message Class&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with Module codes given in section 2.1.1 above.&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with the sub-landscape of the Module that this Message Class caters to as illustrated in examples below.&lt;/P&gt;&lt;P&gt;3.	The maximum permissible length for development class is 30 characters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples: &lt;/P&gt;&lt;P&gt;Msg. Class	Description&lt;/P&gt;&lt;P&gt;ZFI_AR	FI: Account Receivables&lt;/P&gt;&lt;P&gt;ZCO_CCA	CO: Cost Center Accounting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.11	Enhancement Projects (User Exits)&lt;/P&gt;&lt;P&gt;Convention: Z&amp;lt;XX&amp;gt;&amp;lt;nn&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes: &lt;/P&gt;&lt;P&gt;1.	XX is the application area code e.g. for sales it is SD etc.&lt;/P&gt;&lt;P&gt;2.	'nn'  is one up number for one application area. It starts with 001.&lt;/P&gt;&lt;P&gt;3.	Maximum length of the Project name is 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:  The name of the SD enhancement project can be ZSD001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.12	LSMW Objects&lt;/P&gt;&lt;P&gt;2.2.12.1	Project&lt;/P&gt;&lt;P&gt;Naming Convention: ZM_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	1.	Replace &amp;lt;ffff&amp;gt; with meaningful text &lt;/P&gt;&lt;P&gt;2.	The maximum permissible length for Project name is 16 characters. But please limit it to 12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example : ZM_VENDOR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.12.2	SubProject&lt;/P&gt;&lt;P&gt;Naming Convention: ZM_&amp;lt;ffff&amp;gt;_&amp;lt;n&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;	Suffix Project name with a running sequence no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example : ZM_VENDOR_1&lt;/P&gt;&lt;P&gt;2.2.12.3	Object&lt;/P&gt;&lt;P&gt;Naming Convention: ZM_&amp;lt;ffff&amp;gt;_&amp;lt;n&amp;gt;&amp;lt;n&amp;gt;.&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;	Suffix Subproject name with a running sequence no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example : ZM_VENDOR_11&lt;/P&gt;&lt;P&gt;2.2.13	Classes&lt;/P&gt;&lt;P&gt;Naming Convention: ZCL_[IM/DF/BSPCO/BSPHN/BADI]_&amp;lt;ffff&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	IM: Implementation Class;&lt;/P&gt;&lt;P&gt;DF: Definition Class&lt;/P&gt;&lt;P&gt;BSPCO: BSP Controller class&lt;/P&gt;&lt;P&gt;BSPHN: BSP Handler class&lt;/P&gt;&lt;P&gt;BADI : BADI implementation &lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text: In case of Implementation classes, it should preferably be the same as that of the Definition Class&lt;/P&gt;&lt;P&gt;3.	Example:&lt;/P&gt;&lt;P&gt;IMPLEMENTATION Class: ZCL_IM_REBATE_SETTL&lt;/P&gt;&lt;P&gt;DEFINITION: ZCL_DF_REBATE_SETTL&lt;/P&gt;&lt;P&gt;2.2.14	BOR Object Types&lt;/P&gt;&lt;P&gt;Object	Convention	Example&lt;/P&gt;&lt;P&gt;Supertype	Z&amp;lt;ffff&amp;gt;	ZLVAPPL&lt;/P&gt;&lt;P&gt;SubType	Z&amp;lt;SuperType&amp;gt;&amp;lt;nn&amp;gt;	ZZLVAPPL01&lt;/P&gt;&lt;P&gt;Program	&amp;lt;Subtype&amp;gt;	ZZLVAPPL01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;nn&amp;gt; with a running 2 digit serial Number&lt;/P&gt;&lt;P&gt;2.	Replace &amp;lt;ffff&amp;gt; with meaningful text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.2.15	Screen / Transaction Variants&lt;/P&gt;&lt;P&gt;Naming Convention: &amp;lt;tcode&amp;gt;_&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Where:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;tcode&amp;gt; with the t-code that will be assigned to this Variant&lt;/P&gt;&lt;P&gt;2.	Replace ffff with a meaningful text&lt;/P&gt;&lt;P&gt;E.g.:&lt;/P&gt;&lt;P&gt;For an SE16 variant for table KONA that will be used by T-Code Z_CH_SD_001:&lt;/P&gt;&lt;P&gt;Z_CH_SD_001_KONA&lt;/P&gt;&lt;P&gt;2.2.16	Area Menu&lt;/P&gt;&lt;P&gt;Naming Convention: Z&amp;lt;mm&amp;gt;_&amp;lt;Main Menu&amp;gt;_&amp;lt;Sub Menu&amp;gt;&amp;#133;&amp;lt;ffff&amp;gt;&lt;/P&gt;&lt;P&gt;Where:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;mm&amp;gt; with the Module code&lt;/P&gt;&lt;P&gt;2.	Followed by the hierarchical position of the immediate parent of this Area Menu&lt;/P&gt;&lt;P&gt;3.	Followed by a Meaningful text for this Menu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g.:&lt;/P&gt;&lt;P&gt;ZSD&lt;/P&gt;&lt;P&gt;ZSD_TAB&lt;/P&gt;&lt;P&gt;ZSD_TAB_VIEW&lt;/P&gt;&lt;P&gt;ZSD_TAB_UPDT&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Clusters of Transactions should be introduced as Sub-Menus rather than as Folders&lt;/P&gt;&lt;P&gt;2.	As a gradual process, the current Clusters that exist as Folders should also be replaced with Sub-Menus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.3	Naming of Sub-Objects&lt;/P&gt;&lt;P&gt;2.3.1	Program Sub-Objects&lt;/P&gt;&lt;P&gt;Naming of all the internal components of a program will be consistent across the project. &lt;/P&gt;&lt;P&gt;Naming Convention: &amp;lt;Prefix&amp;gt;ffff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;1.	Replace &amp;lt;Prefix&amp;gt; with the component prefix values given in the table below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program Component	Prefixed by&lt;/P&gt;&lt;P&gt;Program Constants	C_&lt;/P&gt;&lt;P&gt;Global Variables	W_&lt;/P&gt;&lt;P&gt;Types Definition	T_&lt;/P&gt;&lt;P&gt;Global Structures	WA_&lt;/P&gt;&lt;P&gt;Global Internal Tables	I_&lt;/P&gt;&lt;P&gt;Select-Options	SO_&lt;/P&gt;&lt;P&gt;Parameters	PO_&lt;/P&gt;&lt;P&gt;Table Type	TT_&lt;/P&gt;&lt;P&gt;Field Symbols	FS_&lt;/P&gt;&lt;P&gt;Ranges	R_&lt;/P&gt;&lt;P&gt;Local Constants	LC_&lt;/P&gt;&lt;P&gt;Local Variables	L_&lt;/P&gt;&lt;P&gt;Local Static Variables	LS_&lt;/P&gt;&lt;P&gt;Local Internal Tables	LI_&lt;/P&gt;&lt;P&gt;Local Work Area	LWA_&lt;/P&gt;&lt;P&gt;Local Range	LR_&lt;/P&gt;&lt;P&gt;Field Groups	FG_&lt;/P&gt;&lt;P&gt;Container 	CO_&lt;/P&gt;&lt;P&gt;Macro	MA_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important: The Same sequence as above must be followed in the Data declaration part of all the ABAP/4 programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.3.2	SAP Script /Smartform sub-objects&lt;/P&gt;&lt;P&gt;Naming of all the internal components of a SAPScript/SmartForm shall follow the same convention as for Programs (2.2.2), with the addition of the Field Label on the FRS. E.g. if the FRS has labeled a field for Sales Order Number as Field 27 on the Layout, the variable name should be W_27_VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.	General Programming Guidelines&lt;/P&gt;&lt;P&gt;3.1	Modification Logs&lt;/P&gt;&lt;P&gt;At the top of every ABAP Object Modified by a Developer, there should be a Modification Log Every Line Created/Changed by the developer should be Identifiable by the TR Number. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP Patterns: Following Patterns should be used for Uniform ModLogs:&lt;/P&gt;&lt;P&gt;Nature of Change	Pattern to Use&lt;/P&gt;&lt;P&gt;New Development	ZZNEWPROG&lt;/P&gt;&lt;P&gt;In-Line Logs	ZZLINE&lt;/P&gt;&lt;P&gt;Modification Logs at the Top of Object	ZZMODLOG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.2	Program Organization&lt;/P&gt;&lt;P&gt;All the programs will be organized as described below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.2.1	Executable Programs&lt;/P&gt;&lt;P&gt;TOP Include: For global data declarations&lt;/P&gt;&lt;P&gt;Form Include: For definition of all the FORMs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.2.2	Dialog Programs&lt;/P&gt;&lt;P&gt;TOP Include: For global data declarations&lt;/P&gt;&lt;P&gt;Form Include: For definition of all the FORMs. &lt;/P&gt;&lt;P&gt;PBO Include: Include for PBO Modules&lt;/P&gt;&lt;P&gt;PAI Include: Include for PAI Modules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.3	Package&lt;/P&gt;&lt;P&gt;All the related objects within a sub-module of SAP will be developed under a single Package.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.3.1	Adding Components to existing objects&lt;/P&gt;&lt;P&gt;When adding new workbench components to existing Objects, the same Package will be used as has been used for the existing Components&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.3.2	Creation of New Objects&lt;/P&gt;&lt;P&gt;When creating new Objects or new Sub-lanscapes, Packages used should have the Naming convention as in Section 2 Above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.4	Program Messages&lt;/P&gt;&lt;P&gt;All the messages within a sub-module of SAP will be grouped under a single Message Class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.4.1	Adding Messages to existing landscapes&lt;/P&gt;&lt;P&gt;When adding new messages for existing Objects, the same Message Class will be used as has been used for the existing Objects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.4.2	Creation of New Objects&lt;/P&gt;&lt;P&gt;When creating new Objects or new Sub-landscapes, Message classes used should have the Naming convention as in Section 2 Above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.5	Dictionary Objects&lt;/P&gt;&lt;P&gt;Whenever you create a Z table in  system always include MANDT field as the first field, except when the table contains client independent data. Also create the table with attribute Data Class as USER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.	Structure of ABAP Programs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.1	Type&lt;/P&gt;&lt;P&gt;&amp;#149;	When an ABAP program is run, its processing blocks are called. ABAP programs are controlled from outside the program itself by the processors in the current work process. For the purposes of program flow, we can summarize the screen processor and ABAP processor into the ABAP runtime environment. The runtime environment controls screens and ABAP processing blocks. It contains a range of special control patterns that call screens and processing blocks in certain orders. These sections are also called processors. When a ABAP program is run, the control passes between various processors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	In the R/3 System, there are various types of ABAP program. The program type determines the basic technical attributes of the program, and must be set when created. The main difference between the different program types is the way in which the runtime environment calls its processing blocks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	When an application program is run, it must at least call the first processing block from outside the program, that is, from the runtime environment. This processing block can then either call further processing blocks or return control to the runtime environment. When an ABAP program is started, the runtime environment starts a processor (dependent on the program type), which calls the first ABAP processing block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	The following program types are relevant to application programming:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Type 1 programs have the important characteristic that they do not have to be controlled using user-defined screens. Instead, they are controlled by the runtime environment, which calls a series of processing blocks (and selection screens and lists where necessary) in a fixed sequence. User actions on screens can then trigger further processing blocks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type M&lt;/P&gt;&lt;P&gt;&amp;#149;	The most important technical attribute of a type M program is that it can only be controlled using screen flow logic and run via a transaction code which is linked to the program and one of its screens (initial screen). &lt;/P&gt;&lt;P&gt;&amp;#149;	ABAP programs with type M contain the dialog modules belonging to the various screens. They are therefore known as module pools.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Type F&lt;/P&gt;&lt;P&gt;&amp;#149;	Type F programs are containers for function modules, and cannot be started using a transaction code or by entering their name directly. &lt;/P&gt;&lt;P&gt;&amp;#149;	Type F programs are known as function groups. Function modules may only be programmed in function groups. The Function Builder is a tool in the ABAP Workbench that is used to create function groups and function modules. Apart from function modules, function groups can contain global data declarations and subroutines. These are visible to all function modules in the group. They can also contain event blocks for screens in function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type K&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Type K programs are containers for global classes in ABAP Objects. Type K programs are known as class definitions. The Class Builder is a tool in the ABAP Workbench that can be used to create class definitions.	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type J&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Type J programs are containers for global interface in ABAP Objects. Type J programs are known as interface definitions and are created in the Class Builder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type I&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Type I programs - called includes - are a means of dividing up program code into smaller, more manageable units. The coding of an include program can be inserted at any point in another ABAP program using the INCLUDE statement. There is no technical relationship between include programs and processing blocks. Includes are more suitable for logical programming units, such as data declarations, or sets of similar processing blocks. The ABAP Workbench has a mechanism for automatically dividing up module pools and function groups into include programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.2	Status&lt;/P&gt;&lt;P&gt;P = SAP standard production program&lt;/P&gt;&lt;P&gt;K = Customer production program&lt;/P&gt;&lt;P&gt;S = System program&lt;/P&gt;&lt;P&gt;T = Test program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Application&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Categorize the program according to the purpose it fulfills.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.3	Authority Check&lt;/P&gt;&lt;P&gt;Authority checks will be carried out as given in the respective FRS&amp;#146;s.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.4	Program Structure&lt;/P&gt;&lt;P&gt;ABAP programs are responsible for data processing within the individual dialog steps (ie. events) of an application program. This means that the program cannot be constructed as a single sequential unit, but must be divided into sections that can be assigned to the individual dialog steps. To meet this requirement, ABAP programs should have a modular structure. Each module is called a processing block. A processing block consists of a set of ABAP statements. When a program is run, effectively a series of processing blocks is called. Therefore, they should not be nested but modularized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Each ABAP program consists of the following two parts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.4.1	Declaration data for global data, classes and selection screens&lt;/P&gt;&lt;P&gt;&amp;#149;	The first part of an ABAP program is the declaration part for global data, classes, and selection screens. This consists of:&lt;/P&gt;&lt;P&gt;&amp;#149;	All declaration statements for global data. Global data is visible in all internal  processing   blocks and should be defined using declarative statements that appear before the first processing block, in dialog modules, or in event blocks. Local data should not be declared in dialog modules or event blocks. &lt;/P&gt;&lt;P&gt;&amp;#149;	All selection screen definitions. &lt;/P&gt;&lt;P&gt;&amp;#149;	All local class definitions (CLASS DEFINITION statement). Local classes are part of ABAP Objects, the object-oriented extension of ABAP.&lt;/P&gt;&lt;P&gt;&amp;#149;	Declaration statements which occur in procedures (methods, subroutines, function modules) form the declaration part for local data in those processing blocks. This data is only visible within the procedure in which it is declared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.4.2	Container for Processing Blocks&lt;/P&gt;&lt;P&gt;&amp;#149;	The second part of an ABAP program contains all of the processing blocks for the program. The following types of processing blocks are allowed:&lt;/P&gt;&lt;P&gt;1.	Dialog modules (no local data area) &lt;/P&gt;&lt;P&gt;2.	Event blocks (no local data area) &lt;/P&gt;&lt;P&gt;3.	Procedures (methods, subroutines and function modules with their own local data area).&lt;/P&gt;&lt;P&gt;&amp;#149;	Whereas dialog modules and procedures are enclosed in the ABAP keywords which define them, event blocks are introduced with event keywords and concluded implicitly by the beginning of the next processing block. &lt;/P&gt;&lt;P&gt;&amp;#149;	All ABAP statements (except declarative statements in the declaration part of the program) are part of a processing block. Non-declarative ABAP statements, which occur between the declaration of global data and a processing block are automatically assigned to the START-OF-SELECTION processing block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.4.3	Calling Processing Blocks&lt;/P&gt;&lt;P&gt;&amp;#149;	Processing blocks can be called from either the ABAP program or using ABAP commands which are themselves part of a processing block. Dialog modules and event blocks are called from outside the ABAP program. Procedures are called using ABAP statements in ABAP programs.&lt;/P&gt;&lt;P&gt;&amp;#149;	Calling event blocks is different from calling other processing blocks for the following reasons: &lt;/P&gt;&lt;P&gt;&amp;#149;	An event block call is triggered by an event. User actions on selection screens and lists, and the runtime environment trigger events that can be processed in ABAP programs. Define event blocks for the events that the program needs to react to (whereas a subroutine call, for example, must have a corresponding subroutine). This ensures that while an ABAP program may react to a particular event, it is not forced to do so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.5	Screen Flow Logic (Dialog Programs)&lt;/P&gt;&lt;P&gt;4.5.1	Place the AT EXIT COMMAND at the beginning of the flow logic.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT&lt;/P&gt;&lt;P&gt;   MODULE EXIT_1170 AT EXIT-COMMAND.&lt;/P&gt;&lt;P&gt;   MODULE PAINT_1170.&lt;/P&gt;&lt;P&gt;4.5.2	Use FIELD and CHAIN statements to keep fields in error open for correction.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;   PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;   MODULE EXIT_1170 AT EXIT-COMMAND.&lt;/P&gt;&lt;P&gt;   CHAIN.&lt;/P&gt;&lt;P&gt;      FIELD BTCH1170-JOBNAME.&lt;/P&gt;&lt;P&gt;      FIELD BTCH1170-USERNAME.&lt;/P&gt;&lt;P&gt;      FIELD BTCH1170-FROM_DATE.&lt;/P&gt;&lt;P&gt;      FIELD BTCH1170-FROM_TIME.&lt;/P&gt;&lt;P&gt;      MODULE PAINT_1170.&lt;/P&gt;&lt;P&gt;   ENDCHAIN.&lt;/P&gt;&lt;P&gt;4.6	Main Program&lt;/P&gt;&lt;P&gt;4.6.1	Events&lt;/P&gt;&lt;P&gt;The Program MUST NOT be coded without the use of Proper Coding blocks&lt;/P&gt;&lt;P&gt;&amp;#149;	Initializations&lt;/P&gt;&lt;P&gt;&amp;#149;	Top-of-page during line-selection&lt;/P&gt;&lt;P&gt;&amp;#149;	At Selection-Screen&lt;/P&gt;&lt;P&gt;&amp;#149;	At Line-Selection&lt;/P&gt;&lt;P&gt;&amp;#149;	At User-Command&lt;/P&gt;&lt;P&gt;&amp;#149;	At Pfn&lt;/P&gt;&lt;P&gt;&amp;#149;	Start-Of-Selection&lt;/P&gt;&lt;P&gt;&amp;#149;	Top-Of-Page&lt;/P&gt;&lt;P&gt;&amp;#149;	Get&lt;/P&gt;&lt;P&gt;&amp;#149;	End-Of-Page&lt;/P&gt;&lt;P&gt;&amp;#149;	End-Of-Selection&lt;/P&gt;&lt;P&gt;NOTE: The coding for each event should be logically split into forms (subroutines). That is to say, each event will comprise mostly of &amp;#145;PERFORM&amp;#146; statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.	General Coding Standards&lt;/P&gt;&lt;P&gt;5.1	One command per line&lt;/P&gt;&lt;P&gt;Each ABAP/4 command consists of a sentence ending with a period. Multiple commands can be on one line; however, as a standard start each new command on a new line. This will allow for easier deleting, commenting, and debugging.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.2	Indented Source Code&lt;/P&gt;&lt;P&gt;The ABAP/4 editor has a "Pretty Printer" command to indent by 2 positions specific lines of code and add subroutine comments. Event keywords are typically not indented.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.3	Extended Syntax Check&lt;/P&gt;&lt;P&gt;Extended Program Check (EPC) to be done on each object to make sure the code is Syntactically correct. There should be no Error/warning messages in the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.4	Reusability and Modularity&lt;/P&gt;&lt;P&gt;If a block of code is executed more than once, it should be placed in a subroutine at the bottom of the code. This makes the code more readable, requires less indentation, and is easier to debug since the debugger can jump through an entire subroutine via a PF key. Also, when possible parameters should be passed to and from subroutines to make the purpose easier to understand and reduce the need for global variables. Always document the purpose of each parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.5	Text Handling&lt;/P&gt;&lt;P&gt;Text elements must be used to display any text messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.6	Usage of System Variables&lt;/P&gt;&lt;P&gt;The system variables should be used wherever possible. The SY-SUBRC is to be checked after any function call, selection operation, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.7	Chaining Statements&lt;/P&gt;&lt;P&gt;&amp;#149;	Consecutive sentences with an identical beginning shall be combined into a chained statement.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Instead of the statements&lt;/P&gt;&lt;P&gt;MOVE SY-MANDT TO D00001-MANDT.&lt;/P&gt;&lt;P&gt;MOVE SY-LANGU TO D00001-SPRAS.&lt;/P&gt;&lt;P&gt;A chained statement shall be used&lt;/P&gt;&lt;P&gt;MOVE:&lt;/P&gt;&lt;P&gt;   		SY-MANDT TO D00001-MANDT,&lt;/P&gt;&lt;P&gt;   		SY-LANGU TO D00001-SPRAS,&lt;/P&gt;&lt;P&gt;   		SY-UNAME TO D00001-BNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.8	Common Routines&lt;/P&gt;&lt;P&gt;&amp;#149;	Standard sub-routines should be implemented as FUNCTION's rather than a FORM (ie. SUBROUTINE). A FUNCTION is easier to maintain and can be easily tested without a calling program. Standard SAP function modules are also available and the function library should be used to check if function modules already exist for a function that needs to be performed i.e.POPUP_TO_CONFIRM_LOSS_OF_DATA etc.&lt;/P&gt;&lt;P&gt;&amp;#149;	Includes can also be created for re-usable or common code e.g. common data declaration statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.9	Dialog Messages&lt;/P&gt;&lt;P&gt;Dialogue messages are stored in table T100. Programmers shall check to see if an appropriate message exists before adding a new message. Programs shall use the message-id which corresponds to the SAP module that the program most relates to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.10	Function Keys&lt;/P&gt;&lt;P&gt;PF-keys should be programmed to execute functions where required. SAP Standard function keys should be used where appropriate. The most commonly used buttons should be displayed as pushbuttons in the application toolbar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.11	Enqueuing and Dequeuing Data Objects&lt;/P&gt;&lt;P&gt;&amp;#149;	All database objects being processed by a program, for purposes other than for display, shall be enqueued before such processing is executed. If the enqueue is unsuccessful, then a message shall be returned stating why the enqueue was unsuccessful. &lt;/P&gt;&lt;P&gt;&amp;#149;	Enqueue and Dequeue objects should be created via the data dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.12	Error Handling (SY-SUBRC)&lt;/P&gt;&lt;P&gt;&amp;#149;	Return codes shall always be checked immediately after an event which returns a code.   &lt;/P&gt;&lt;P&gt;Eg. Function calls, Select statements, Updates etc.&lt;/P&gt;&lt;P&gt;&amp;#149;	The value of SY-SUBRC is 0 when successful and generally produces a value of 4 when unsuccessful (there are a few exceptions).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, rather check SY-SUBRC with:&lt;/P&gt;&lt;P&gt;   	   IF SY-SUBRC &amp;lt;&amp;gt; 0 &lt;/P&gt;&lt;P&gt;than with&lt;/P&gt;&lt;P&gt;   	 IF SY-SUBRC = 4  (which is redundant and makes the system do a double check)&lt;/P&gt;&lt;P&gt;&amp;#149;	Error messages displayed to the user must be clear and descriptive.&lt;/P&gt;&lt;P&gt;&amp;#149;	Remember to group related / dependant steps together and to Rollback all changes for steps in that group should any one of them fail, thus maintaining the integrity of the system.&lt;/P&gt;&lt;P&gt;&amp;#149;	Check whether an Error Log, (file), must be produced by your program and if so check on the format of the file.&lt;/P&gt;&lt;P&gt;&amp;#149;	If any Error Logging is done to a custom table in the database then make sure this table is maintained and monitored correctly. (Dev. Note)&lt;/P&gt;&lt;P&gt;&amp;#149;	Transaction SE91 provides the facility to create and utilize messages in their appropriate message class. Elaborate on the message if necessary, using the long text documentation for that message number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.13	General Conventions and Hints&lt;/P&gt;&lt;P&gt;&amp;#149;	There should be NO hard coding of values in programs &amp;#150; easy maintainability&lt;/P&gt;&lt;P&gt;&amp;#149;	For amounts, use the CURRENCY command in write statements to automatically convert fields into their correct decimal format. The currency specified in the write statement is treated as a key for the table TCURX. If no entry exists for the currency specified, the system assumes two decimal places.&lt;/P&gt;&lt;P&gt;&amp;#149;	For quantities, use the UNIT command in write statements to automatically convert fields into their correct decimal format. The contents of the unit specified are used on table T006. If no entry exists for the unit specified, the formatting has no effect.&lt;/P&gt;&lt;P&gt;&amp;#149;	Use the &amp;#145;LIKE&amp;#146; statement as often as possible to declare &amp;#145;DATA&amp;#146; variables instead of an explicit &amp;#145;TYPE&amp;#146; declarations.&lt;/P&gt;&lt;P&gt;&amp;#149;	Try to use the &amp;#145;INCLUDE&amp;#146; statement with standard SAP structures and tables for your structures and internal tables where possible.  If you use the include statement to include other program components in your code then document what those components are, what they do and how to use them.&lt;/P&gt;&lt;P&gt;&amp;#149;	Try to make use of standard SAP Function Modules wherever possible rather than building your own. Use the pull down functionality in transaction SE37 to find suitable standard function modules. &lt;/P&gt;&lt;P&gt;&amp;#149;	Make use of the SAP PATTERN tool to automatically insert the standard code for:&lt;/P&gt;&lt;P&gt;&amp;#149;	CALL FUNCTION&lt;/P&gt;&lt;P&gt;&amp;#149;	MESSAGE ID&lt;/P&gt;&lt;P&gt;&amp;#149;	SELECT*FROM&lt;/P&gt;&lt;P&gt;&amp;#149;	PERFORM&lt;/P&gt;&lt;P&gt;&amp;#149;	AUTHORITY-CHECK&lt;/P&gt;&lt;P&gt;&amp;#149;	WRITE&lt;/P&gt;&lt;P&gt;&amp;#149;	CASE&lt;/P&gt;&lt;P&gt;&amp;#149;	CALL DIALOG&lt;/P&gt;&lt;P&gt;&amp;#149;	The standard date format to use is &amp;#145;DD/MM/YYYY&amp;#146;. (Dev. Note)&lt;/P&gt;&lt;P&gt;The standard time format to use is &amp;#145;HH:MM:SS&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.14	Parameters in Sub-Routines&lt;/P&gt;&lt;P&gt;Naming convention for Parameters in subroutine is P_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.	Performance Standards&lt;/P&gt;&lt;P&gt;6.1	General Tips on Performance Tuning&lt;/P&gt;&lt;P&gt;6.1.1	Avoid Redundant code&lt;/P&gt;&lt;P&gt;Avoid leaving "dead" code in the program. Comment out variables that are not referenced and code that is not executed. To analyze the program, use the Program Analysis function in SE38 -&amp;gt; Utilities -&amp;gt; Program Analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.2	Subroutine Usage&lt;/P&gt;&lt;P&gt;For good modularization, the decision of whether or not to execute a subroutine should be made before the subroutine is called. &lt;/P&gt;&lt;P&gt;Example: &lt;/P&gt;&lt;P&gt;IF f1 NE 0.&lt;/P&gt;&lt;P&gt;  PERFORM sub1.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;FORM sub1.&lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.3	Case vs. Nested IF&lt;/P&gt;&lt;P&gt;When testing fields "equal to" something, one can use either the nested IF or the CASE statement. The CASE is better for two reasons. It is easier to read and after about five nested IFs the performance of the CASE is more efficient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.4	Using the MOVE Statement&lt;/P&gt;&lt;P&gt;When records a and b have the exact same structure, it is more efficient to MOVE a TO b than to MOVE-CORRESPONDING a TO b.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5	SELECT Queries&lt;/P&gt;&lt;P&gt;The performance of  any ABAP program mainly depends on the ABAP Queries used in it. More optimum the queries , better the performance. Take care of the points mentioned nin the following sections while writing any ABAP queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.1	Using all the keys in SELECT statement&lt;/P&gt;&lt;P&gt;When using the SELECT statement, study the key and always provide as much of the left-most part of the key as possible. The SELECT * command is to be avoided everywhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.2	Fetching Single Record&lt;/P&gt;&lt;P&gt;If the entire key can be qualified, code a SELECT SINGLE not just a SELECT. If all the keys are not available, we should use SELECT UPTO 1 ROWS if we are interested only in the first record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.3	Avoid SELECT-ENDSELECT&lt;/P&gt;&lt;P&gt;Selecting data into an internal table using an array fetch versus a SELECT-ENDELECT loop will give at least a 2x performance improvement.  After the data has been put into the internal data, then row-level processing can be done.   &lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;select ... from table &amp;lt;..&amp;gt;&lt;/P&gt;&lt;P&gt;           into &amp;lt;itab&amp;gt; &lt;/P&gt;&lt;P&gt;           where ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at &amp;lt;itab&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;do the row-level processing here&amp;gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.4	Using Indexs&lt;/P&gt;&lt;P&gt;Use indexes wherever possible. Tune the Query so that optimum Indexing will happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.5	Provide all the keys&lt;/P&gt;&lt;P&gt;Give as many keys as possible in the WHERE clause to optimize the database fetching. Use the Index fields in the first position to optimize performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.6	Avoid &amp;#147;INTO CORRESPONDING&amp;#148;&lt;/P&gt;&lt;P&gt;Avoid using INTO CORESPONDING FIELDS of Table. Instead, explicitly mention the fields. Else, The Table Fields should be in the same sequence as the selection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.7	SELECT statement inside LOOP&lt;/P&gt;&lt;P&gt;Do not write SELECT statements inside the loop. Instead, use the FOR ALL ENTRIES Command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before using FOR ALL ENTRIES command, check that the &lt;/P&gt;&lt;P&gt;1.	Corresponding Internal table is not empty. If the Internal table is empty, the statement will select ALL the entries in the Database&lt;/P&gt;&lt;P&gt;2.	The Internal table is sorted by the Filed used in the Where Clause: This makes selection faster&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.8	Nested SELECT statement&lt;/P&gt;&lt;P&gt;Avoid Using nested SELECT statements. Instead, make use of different internal tables to fetch the data, and Use Nested LOOPS to read them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.9	Select Distinct&lt;/P&gt;&lt;P&gt;Whenever its possible avoid SELECT DISTINCT, instead select data into internal table, sort and use DELETE ADJACENT DUPLICATES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.10	Use of OR in Where Clause&lt;/P&gt;&lt;P&gt;Do not use OR when selecting data from DB table using an index because The optimizer generally stops if the WHERE condition contains an OR expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;Instead of &lt;/P&gt;&lt;P&gt;	SELECT * FROM spfli WHERE carrid = &amp;#145;LH&amp;#146;&lt;/P&gt;&lt;P&gt;			                AND (cityfrom = &amp;#145;FRANKFURT&amp;#146; OR &lt;/P&gt;&lt;P&gt;             city from = &amp;#145;NEWYORK&amp;#146;)&lt;/P&gt;&lt;P&gt;Use &lt;/P&gt;&lt;P&gt;	SELECT * FROM spfli WHERE (carrid = &amp;#145;LH&amp;#146; AND cityfrom = &amp;#145;FRANKFURT&amp;#146;)&lt;/P&gt;&lt;P&gt;			                   OR (carrid = &amp;#145;LH&amp;#146; AND cityfrom = &amp;#145;NEWYORK&amp;#146;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.5.11	Order By&lt;/P&gt;&lt;P&gt;ORDER BY will Bypass buffer. So, performance will decrease. If you want to sort data, it is efficient to SORT them in INTERNAL TABLE rather than using ORDER BY. Only use an ORDER BY in your SELECT if the order matches the index, which should be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.6	Using the READ statement&lt;/P&gt;&lt;P&gt;When reading a single record in an internal table, the READ TABLE WITH KEY is not a direct READ. The table needs to be sorted by the Key fields and the command READ TABLE WITH KEY BINARY SEARCH is to be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.7	Hashed table&lt;/P&gt;&lt;P&gt;If the number of entries in the Internal Table is high then use Hashed Table with Keys to access the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.8	Transporting&lt;/P&gt;&lt;P&gt;With READ or MODIFY Statements use TRANSPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.9	Using LDB&lt;/P&gt;&lt;P&gt;In order to improve performance in case of an LDB, individual tables can be excluded from selection. Under the section &amp;#145;Table Selection&amp;#146; in the Documentation of LDB the fields with proper description has been given those fields can be set in the application report at the time of INITIALIZATION or at the START OF SELECTION. This can enhance the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.10	Append Lines of&lt;/P&gt;&lt;P&gt;Whenever it is possible use APPEND LINES OF to append the internal Tables instead of using loop and then APPEND Statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.11	Use WHILE&lt;/P&gt;&lt;P&gt;Use WHILE instead of a DO+EXIT-construction, as WHILE is easier to understand and faster to execute&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.12	DELETE &amp;lt;itab&amp;gt; WHERE&lt;/P&gt;&lt;P&gt;Use DELETE &amp;lt;itab&amp;gt; WHERE&amp;#133;for deleting records from an internal table.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;Instead of &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;itab&amp;gt; WHERE &amp;lt;field&amp;gt; = &amp;#145;0001&amp;#146;&lt;/P&gt;&lt;P&gt;	DELETE &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;Use &lt;/P&gt;&lt;P&gt;DELETE &amp;lt;itab&amp;gt;  WHERE &amp;lt;field&amp;gt; = &amp;#145;0001&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.1.13	Using WHERE clause in LOOP&amp;#133;&amp;#133;.ENDLOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use:&lt;/P&gt;&lt;P&gt;Sort ITAB by NAME.&lt;/P&gt;&lt;P&gt;Loop at itab where name EQ SY-UNAME&lt;/P&gt;&lt;P&gt;.&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;Instead Of:&lt;/P&gt;&lt;P&gt;Read itab with key name = SY-UNAME.&lt;/P&gt;&lt;P&gt;L_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;Loop at itab from l_tabix.&lt;/P&gt;&lt;P&gt;If name eq &amp;#145;bijoy&amp;#146;&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 10:45:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282704#M497068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T10:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Abap program standards</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282705#M497069</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;actually my requiremnet is we r developing a tool for checking all the coding standards of a report program for that first i need to design a flow chart for that standards, how to do it even for a few of them . [graphically presentation and if possible code for standard checking]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;suresh babu aluri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 10:51:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282705#M497069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T10:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Abap program standards</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282706#M497070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;make use of some of these fm's and statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FM - PROGRAM_CHECK_FOR_TEXTS&lt;/P&gt;&lt;P&gt;        NAMETAB_GET'&lt;/P&gt;&lt;P&gt;  SCAN ABAP-SOURCE &amp;lt;source&amp;gt;  KEYWORDS FROM &amp;lt;&amp;gt;                           STATEMENTS INTO  &amp;lt;&amp;gt;&lt;/P&gt;&lt;P&gt;                        TOKENS INTO &amp;lt;&amp;gt;&lt;/P&gt;&lt;P&gt;                        WITH ANALYSIS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                       WITH COMMENTS .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TEXTPOOL &amp;lt;&amp;gt; INTO &amp;lt;&amp;gt; LANGUAGE sy-langu .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 10:56:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282706#M497070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T10:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Abap program standards</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282707#M497071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2007 05:44:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282707#M497071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-30T05:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Abap program standards</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282708#M497072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bhaskar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you send me this document in digital format, please? If the format would be rtf or something like that, it will be fantastic. I am writting a naming convention document in my company, and this document could help me as template.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e-mail address: albertomgalindo@gmail.com&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advanced!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 08:29:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282708#M497072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T08:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Abap program standards</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282709#M497073</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;Did you got in e-format, if not reply me,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will send.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2007 13:27:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-program-standards/m-p/2282709#M497073</guid>
      <dc:creator>surjith_kumar</dc:creator>
      <dc:date>2007-06-28T13:27:07Z</dc:date>
    </item>
  </channel>
</rss>

