SAP ABAP Development Standards

Last changed on: 2/3/2006 11:58:00 AM

Last changed by: u0092453

File name: /opt/scribd/conversion/tmp/scratch6126/59492316.doc

Page: 1 of 65

Document Identification
Summary Information Title Version Date Author ABAP Development Standards 4.0 3/15/1999 Kevin Wolfe

How to Find the Latest Version of This Document This document is located in \\Koro\Q-SAP\BIECS SAP Development Team\Standards and Templates\A8 Standards - ABAP Standards.doc Summary of Changes Version Version Number Date 1.0 3/15/1999
6/3/1999 6/4/1999 7/13/1999 7/20/1999 9/13/1999 9/15/1999 9/23/1999 11/01/1999 11/02/1999 12/14/1999 1/26/2000 5/6/2002 5/7/2002 6/10/2003

Revision Comments Initial Creation
Added Application Module LO- Logistics General. Added Application Submodules: MD under Logistics Data and BD under Production Planning. Added External Files; directories and file names. Also added useful function modules. Removed ‘Approved by’ from summary of changes. Added HR submodule under program name. Chg’ed R/L margins from 1.25 to 1. Added PM module and HR submodule to the program name section. Add SU (subscription) submodule under SD for program naming Add CA (Cross Applications) module for program naming Add PC (Product Cost) submodule under CO module Update Search Help and Lock Objects Reduced table name to 10 characters since that is all that a change object can handle. Changed DDIC to refer all work to the Basis team Update variants to include transport procedure Changed ‘Prototype’ in Program Use category to ‘Processing’ Changed warning about ‘external forms’ use because SAP can detect it’s use from parent program 1. Program Name naming convention should include descriptive text after the numeric for unique identifier. This greatly simplifies finding related programs without having to go to the extra step of analyzing program descriptions which are often not changed from the default on creation of programs. 2. Addition of PR to the application submodule under SD for pricing. 3. "Pretty Printer" should be used. The issues with it in the past seem to save been cleared up. Not only do we have a problem with developers using different methods of indentation than other developers, many use different methods between different programs, within the same program and even within the same subroutines. 4. Naming convention for structures should be gs_ or ls_ to differentiate structures from individual variable fields. 5. Removal of all references to Select...Endselect except to say that it should not be used. 6. Field Names in Z tables should have no prefix (currently defined as ZZ). Field names added to standard SAP table should continue to retain the ZZ prefix. 7. Function Module naming convention should be Z_MMSS_XXXXX... . Added standards for business object methods and attributes

Added by Kevin Wolfe
Josh Duerkop Kevin Wolfe Kevin Wolfe Kevin Wolfe Kevin Wolfe Kevin Wolfe Kevin Wolfe Kevin Wolfe Kevin Wolfe Kevin Wolfe Kevin Wolfe Kevin Wolfe Kevin Wolfe Ryan Kane

12/08/03

Aaron Pust

Last changed on: 2/3/2006 11:58:00 AM

Last changed by: u0092453

File name: /opt/scribd/conversion/tmp/scratch6126/59492316.doc

Page: 2 of 65

Table of Contents
OVERVIEW....................................................................................................................................................1 PURPOSE..........................................................................................................................................................1 OBJECTIVES......................................................................................................................................................1 CONTENT.........................................................................................................................................................1 SUPPLEMENTAL DEVELOPMENT MATERIALS..........................................................................................................1 TERMINOLOGY..................................................................................................................................................2 Adherence.................................................................................................................................................2 Glossary...................................................................................................................................................2 APPLICATION....................................................................................................................................................2 PROGRAM ELEMENTS..............................................................................................................................2 PROGRAM NAME...............................................................................................................................................2 ATTRIBUTES.....................................................................................................................................................4 Title...........................................................................................................................................................5 Type..........................................................................................................................................................5 Status........................................................................................................................................................5 Application...............................................................................................................................................5 Authorization group.................................................................................................................................5 Development class....................................................................................................................................5 Fixed point arithmetic..............................................................................................................................6 SOURCE CODE..................................................................................................................................................6 Coding Guidelines....................................................................................................................................6 Readability............................................................................................................................................6 Functionality.........................................................................................................................................9 Performance..........................................................................................................................................9 Declarative Elements.............................................................................................................................10 REPORT/PROGRAM........................................................................................................................10 TABLES.............................................................................................................................................11 TYPES................................................................................................................................................12 SELECT-OPTIONS...........................................................................................................................12 PARAMETERS..................................................................................................................................13 DATA.................................................................................................................................................14 CONSTANTS.....................................................................................................................................17 RANGES............................................................................................................................................18 FIELD-GROUPS................................................................................................................................19 FIELD-SYMBOLS.............................................................................................................................20 Event Elements.......................................................................................................................................21 AT SELECTION-SCREEN................................................................................................................21 START-OF-SELECTION..................................................................................................................21 END-OF-SELECTION.......................................................................................................................22 AT USER-COMMAND.....................................................................................................................22 AT PFn................................................................................................................................................22 TOP-OF-PAGE...................................................................................................................................22 Control Elements....................................................................................................................................22 IF.........................................................................................................................................................22 CASE..................................................................................................................................................23 DO.......................................................................................................................................................24 WHILE...............................................................................................................................................24 LOOP..................................................................................................................................................24 FORM (SUBROUTINES)..................................................................................................................25 CALL (FUNCTION MODULES)......................................................................................................26 Operational Elements.............................................................................................................................27
Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.doc Page: 3 of 65

................................................................................................42 Documentation....................................................................................................................................................................................................................................................................................................................................................................................41 Database...........................................................................................................................................30 MODIFY..................................................................................................................................................................................................................................................................................................................................................................39 DATA DICTIONARY ELEMENTS..........................................................................29 EXPORT …TO MEMORY / IMPORT…FROM MEMORY...............31 Other Source Code Elements...........................................................................................................................................40 IDOC segments.............37 LISTS.......................................................................................................37 Field Formats.....36 Field Help........................................................................................................................................................................................29 FORMAT......37 Logos.............................................................................................................42 TABLE INDEXES..................................................................................................................................................................................................................................38 UPC....................................................................................................................................................................................................................................30 READ TABLE (itab).........................................................................................................42 Help................................................................................................................36 Field Descriptions.................................39 Table Technical Settings Maintenance Approval Procedure........................................................34 Long text...32 COMMENTS..........................33 MESSAGES.....37 “End of Report” Line.................40 STRUCTURES.........................................42 Projection..........................................................................................................................................32 Text symbols.......................38 Audit Reports................................................................42 DOMAINS....................................................................40 VIEWS.............................................31 WRITE.............................43 LOCK OBJECTS..........................................................................................................................................................................................................................................................................................................................................................................................37 Header.................................................32 TEXT ELEMENTS.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................35 VARIANTS......................................CHECK....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................30 SELECT.....................................................................................42 FIELD NAMES.................................................................37 Retail price..........................................................30 MOVE/MOVE-CORRESPONDING........................................................................................................................................39 TABLES......36 Possible Values....................................................38 FONTS....................................................................................................................................................................................................28 CONCATENATE................................................................................doc Page: 4 of 65 ..................................................................................42 DATA ELEMENTS.........................................................................................................................................................................28 COMMIT WORK....29 DELETE...............................................................................................................................................................................................................................................................27 CLEAR................................35 PROGRAM DOCUMENTATION...................................................................................43 Table Index Maintenance Approval Procedure...............................................................................................................................................................................................................................................................................................................43 Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316......................................................................................................................................................................................................................................................................................................................................................................................................................36 SELECTION SCREENS......................................................................................................................................................................................32 Titles and headers.........................................................................................................................................................................................................................................................................................................................................................................35 REPORT/PROGRAM OUTPUT..................39 Table Elements Maintenance Approval Procedure..............................32 Selection texts.................................................................

......................................................................57 END OF DOCUMENT....46 SET/GET PARAMETERS (PARAMETER ID’S).........................................................................................................................................................................................................56 USEFUL ABAP PROGRAMS......................................................................................................................................................................................................................................................................................................47 PF keys.............................................................................................................................49 MODULE POOLS.....................................................................................................................................................................................................................doc Page: 5 of 65 ..........................................54 IDOCS.......................................................................................................................................................................................................................................51 Methods................................................................................................................................................55 IDOC Type..........................................................................46 LOGICAL DATABASES.....52 BDC SESSIONS / CALL TRANSACTIONS...................................................................................................................................................................................................................................................52 SECURITY............................44 FUNCTION GROUPS.............................................................................49 SCREEN PAINTER........................................................................................................................................................................................53 DIRECTORIES..........................................48 Job names.........................................................................................................................................................................................................................................47 MESSAGE CLASSES.................................................................44 FUNCTION GROUP ELEMENTS............................................................................................................................................................................................47 AREA MENUS..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................53 SECURING A TRANSACTION........................................................................................................................................................................45 MISCELLANEOUS DEVELOPMENT ELEMENTS............................................................................................................................52 Events...........................................................................................................................................44 TYPE GROUPS...........................................48 Event ID’s........................................................................................................................................56 APPENDIX ...........................................................................................................................................................................................Lock Objects :........................................................................................................................................................................................................................................................................................................................................................................................................48 PBO MODULES........52 SECURING A PROGRAM....................................................................................................................................................................................................................................................................................................................................................45 TRANSACTIONS........................................................................................................................................................................................................................................................44 FUNCTION MODULES.......56 USEFUL FUNCTION MODULES...........................................................................................................46 Logical Database...........................................................................52 Attributes.......................................................................................................54 FILENAMES.................................................................................................................................................52 Call Transaction.........................................................49 BUSINESS OJBECTS..............48 PAI MODULES............................................................................................48 SCREENS.................................47 JOBS..........................................................................43 SEARCH HELP.......................................................52 BDC Sessions............53 EXTERNAL FILES......................59 Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316..............................................55 FTP......45 DOCUMENTATION................................................................................................................48 DIALOG MODULES...........................................44 Search Help Objects : ..........................................................................................................................49 INCLUDE PROGRAMS.......................................................................................................................................

Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.doc Page: 6 of 65 .

followed by standards for other miscellaneous development topics. information on prototyping. For ABAP language support. and will undergo continual improvement to evolve the documentation. Standards for a given development element or topic will include any applicable coding standards and/or naming conventions. Produce application output that is consistent with SAP application output guidelines. you should refer to the SAP Style Guide (from initial SAP screen: Help > Application help > BC-Basis Components > BCSAP Style Guide) to the standards for closely related elements listed in this document as guidelines for development of this element. Content This document lists standard development procedures for the most commonly used ABAP development elements. Objectives The objectives of the development standards contained in this document are to help you.OVERVIEW Purpose The ABAP (Advanced Business Application Programming) Development Standards document has been created to describe the standards and guidelines to be followed by application programmers when developing applications in SAP’s ABAP programming language. Supplemental Development Materials Supplemental development materials such as Development Request templates and documentation. you should refer to the SAP ABAP language manuals and on-line help. and approvals and walkthru templates can be found in (Carolyn’s master directory document…?? ) Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. Develop software that is consistent with SAP ABAP software development guidelines. The intended purpose of this document is to describe West Group’s development standards for the most common ABAP development elements and topics. Develop software that can be easily maintained. Develop commonly structured programs.0. especially the ABAP User’s Guide (from initial SAP screen: Help > Application help > BC – Basis Components > BC ABAP User’s Guide). It is not intended to describe the functionality or explain how to use the ABAP language. During the time that no standard exists.doc Page: 1 of 65 . If you need to create a development element for which no standard is listed. The standards described in this document are based on the ABAP Workbench and programming language for SAP version 4. which will assist in identifying SAP objects. you should contact your Team Lead so they can determine if a new standard should be created. Develop programs that are easily read and understood. This document will describe the standards defined per ABAP development element. the developer: • • • • • • Establish naming conventions.

You should adhere to the standard whenever possible. As a rule. If it does not conform. which can be accessed via the ABAP Workbench (Help > Glossary). No exceptions. Application You shall apply the standards described in this document to all custom-developed applications written in the ABAP programming language. You must adhere to the standard in every case. Your adherence to the standard is preferred. Your adherence to the standard is inferred or implicit. Glossary Descriptions for ABAP-related terms found throughout this document can be found within the SAP Glossary. Naming convention: tmmssuf999n where: Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. The program name must be approved by the Team Lead before you create the program object.Terminology Adherence The following terms will be used throughout this document to define the degree to which your adherence to a listed standard is required: • • • • Shall/Will/Must Should/May Assume Recommend A Standard. A Guideline. but only if these updates can be made relatively easily and in a timely fashion. whenever you are in the process of updating a custom application. you should also update the application to bring it up to standard.doc Page: 2 of 65 . PROGRAM ELEMENTS This section defines the development standards for the following ABAP Program Elements: • • • • • • • Program Name Attributes Source Code Text Elements Messages Variants Program Documentation Program Name The program name shall be determined based upon the naming convention below. you should also check the application to ensure that it conforms to the standards set forth in this document.

Material Management Submodules. SD = Sales and Distribution.. EC = Enterprise Controlling. mm.Type. SC = Security. IM = Investment Management.. CT = Change Transport System. SP = Special Ledger.. BW = Business Information Warehouse. Y = Data conversions which are one-time loads... AM = Asset Management. AC = Activity Based Costing.. AR = Accounts Receivable. Z = Applications and permanent interfaces. Controlling Submodules... and example programs used for demonstration. CO = Controlling.. depreciation). PA = Profitability Analysis. WM = Warehouse Management. PS = Project System.. SM = System Monitoring... IC = Investment Control (sale of assets).. XX = Not specific to any one application module.. TP = Temporary (local object).... PA = Personnel Management. FI = Financial. MD = Basic Data. OM = Internal Orders. Logistics General Submodules.... TA = Technical Asset Accounting (replacement.... None defined at this time.... PO = Procurement.. PM = Plant Maintenance... Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. TM = Technical Asset Management & Plant Maintenance. BC = Basis. AA = Asset Accounting.Application Module.. MM = Material Management.. Asset Management Submodules.doc Page: 3 of 65 . IM = Investment Management.t... AP = Accounts Payable.. CC = Cost Center Accounting... HR = Human Resources..Application Submodule... PP = Production Planning..... CA = Cross Applications.. Basis Submodules. ss. XX = Not specific to any one submodule. PC = Product Cost Financial Submodules. Business Information Warehouse Submodules. LO = Logistics General. GL = General Ledger.

... Q = Quarterly.. f. P = Accounting Period. 999.. BI = Billing. B = Bi-weekly C = Conversion Only.. BD = Basic Data. C = Conversion. N = Include.. E = Enhancement. M = Monthly.. PC = Product Costing..Intended Program Run Frequency. SU = Subscriptions. I = Interface. R = Report. HR = Human Resources. PR = Pricing SI = Sales Information System. A = Annually..Personnel Management Submodules. PE = Production Execution... n Open. W = Weekly.. OP = Order Processing. O = On Demand. U = Utility.. SP = Sales Pricing... u.... Sales and Distribution Submodules....... Project System Submodules.... D = Daily.Numeric for unique identifier (lowest sequential # available)... Production Planning Submodules... Plant Maintenance Submodules. Attributes Following are the individual attributes that you should set for a given program: Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. PS = Production Scheduling.Program Use... P = Processing.... May be used to add descriptive text to program name.. DP = Delivery Processing.. N = Include (not a stand alone program with its own frequency).doc Page: 4 of 65 . SM = Service Management. QC = Quality Control.... CU = Customer. PM = Project Management Information System.. B = Bolt-on.

create the authorization group. deliveries. you must create it as a “local object” (same as assigning development class “$TMP” to the program). Status Although not required by SAP. Type As required by SAP. As the need for new development classes arises they will be added to this list. RF.doc Page: 5 of 65 Subscription Maintenance (Add. If the program is not to be transported. Below are the development classes to which every development object should be associated. Development classes help organize our development environment. transfer.) Passwords Federal Government Billing – both Westlaw and Print/CD WL Pricing Front-end Pricing processes and formulas Ship and Charge Warehouse management. Development class You must assign a development class to any program that is to be transported. this title will also be displayed as the title of the report when used in conjunction with the West Group standard header function Z_HEADER_ROUTINE. Naming convention: Standard and EDI ZOTC Order to Cash ZOTC_SUBS ZOTC_PSWD ZOTC_FEDGOV ZOTC_BILLING ZOTC_WLPRICING ZOTC_PRICING ZOTC_SC ZFIN ZPUB Finance No breakdown currently needed Pub/Man ZPUB_WM Archiving No breakdown currently needed Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. The team leads will request the new development class from Basis and Basis will add the class along with security to the new class. and test the program level security. For reporting programs. etc. it is recommended that you enter an appropriate non-blank value into this field. lapse. The development class will be required on all technical specs. etc. Work with Basis / SAP Security Administrator to identify the required authorization group. The title shall not contain all CAPS and shall not contain a period. ZARCH . Authorization group You should use this field only if the Functional Team requires authorization at the program level. Application As required by SAP.Title The title you assign to a program shall reflect the functionality of the program.

You should break them down into smaller modules or forms. you should use structured coding techniques. All of your source code should be developed in a maintainable form. Within all non-interactive programs. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. never branch backward within your procedural source code). Source Code Coding Guidelines When developing ABAP source code. Example: Standard: move g_vkorg to gt_sites-vkorg.doc Page: 6 of 65 • • • . you should adhere to the following guidelines whenever possible: Readability • • • Within all programs. You should always leave it on. When coding a complex statement such as a call to a function module or a statement with multiple additions. You should never combine multiple statements on the same line. Less code is not necessarily better.e. Each form or module should support one basic program function. Whenever possible. You should code each new ABAP statement on a separate line. Whenever possible. you should avoid using large blocks of code in one module or form. you should import the associated ABAP Editor “Pattern” for the statement into the source code. you should avoid using rarely used coding techniques that will be difficult to understand by another developer. you should use a top-down design (i.ZBAS ZBWDEV Basis No breakdown currently needed Business Warehouse extractors No breakdown currently needed Finance reports OTC reports Pub/Man reports Customer Self Service ZREPORT Reporting ZREPORT_FIN ZREPORT_OTC ZREPORT_PUB ZECOMM E-Commerce ZECOMM_CSS ZCRSAPP Cross Application ZCRSAPP_SAPI SAPI application ZTEST Example Code No breakdown currently needed Fixed point arithmetic This attribute is turned on by default when the program is created.

). CONSTANTS) that are declared globally and declare them at the beginning of the program . data: g_datab_limit g_event_param g_item_cnt " Change pointer " Change document " Customer hierarchies type d. type d. like tbtco-eventparm. such as DATA. Chaining is acceptable for declarative elements. type i. so you may code them together. Example: Standard: tables: bdcp. For example. like tbtco-eventparm.g. value ' '. Example: Standard: move p_vkorg to g_vkorg. You should avoid chaining identical ABAP procedural statements together using the statement keyword with a colon (the exception being the WRITE statement).g. Non-standard (DO NOT USE!): move g_vkorg to gt_sites-vkorg. constants: gc_article_price_ref gc_article_ref_to_new_var • value 'p'. constants: gc_false gc_article_price_ref gc_article_ref_to_new_var Non-standard (DO NOT USE!): data: g_datab_limit g_event_param constants: gc_false data: g_item_cnt type i.before any procedural code. PARAMETERS and SELECT-OPTIONS are considered one in the same. cdpos. TABLES. value ' '.doc Page: 7 of 65 Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 . • append gt_sites. aligning their associated additions (start them in the same column). You should code all global DATA statements consecutively within the program. DATA. knvh. File name: /opt/scribd/conversion/tmp/scratch6126/59492316. each on a separate line. you should code five separate MOVE statements. value 'o'. You should group together all common declarative elements (e. when five consecutive “moves” need to be executed. value 'p'.append gt_sites. (e. value 'o'.

Non-standard (DO NOT USE!): move: p_vkorg to g_vkorg. Example: select wkfil from zrzn1 into wl-werks where vkorg and vtweg and matnr and zz_zone = = = = gt_worklist-vkorg gt_worklist-vtweg gt_wl_mat-matnr gt_acclevel-zz_zone. and style of the original source code (providing this code adheres to the coding standards set forth in this document). Indentation: • You must indent each ABAP statement addition from the statement keyword(s) when coding the additions on subsequent lines. • • • You should use blank lines whenever necessary to enhance readability. • When coding a looping structure (LOOP…ENDLOOP. • When updating source code. Example: loop at gt_kvgr where kvgr1 = l_kvgr1 and kvgr2 = l_kvgr2. you should not start them in the same column as the additions to the main keyword if coding each addition on a separate line. • It is recommended that you use SAP’s “Pretty Printer” function to indent and align your source code. gt_sites-vtweg to g_vtweg. you must code the new logic to conform to the modularity. Two or four characters per indentation is a good guideline. DO…ENDDO. you must align each addition (start in same column). When coding the statements between the two keywords. When coding multiple additions for one statement on subsequent lines.doc Page: 8 of 65 Last changed on: 2/3/2006 11:58:00 AM . move s_werks-low to g_werks. you must align the main keyword with its associated ENDxxx keyword and indent all statements between these two keywords. append gt_worklist.. s_werks-low to g_werks. Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.move gt_sites-vtweg to g_vtweg.) or any other logic block that is defined by a main keyword and its associated ENDxxx keyword. gt_worklist-werks = gt_kvgr-werks. “Pretty Printer” can be found in the ABAP editor under Menu path – ProgramPretty Printer. endloop. structure. You should place comments within the program wherever necessary to enhance the understanding of the code. etc.

See the “Tables” chapter of the “Data Dictionary Elements” section of this document. When coding commonly used functionality. You should never code literals (text between quotes) within any procedural code. you should use ABAP Open SQL whenever possible.back to the drawing board. Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. you should confer with your Team Lead before making any changes to that object. • • • • • • Performance • • Is the program using SELECT * statements? You should convert them to SELECT column 1 column 2 or use projection views. Do SELECTs on non-key fields use an appropriate DB index or is the table buffered? You should create an index for the table in the data dictionary or buffer the tables if they are read only or read mostly. then access it from the internal table. or an internal table access statement. Frequently used data elements occurring within multiple related programs should be defined within an INCLUDE module or program. When accessing the database. you should select the appropriate data from the database and load it into an internal table. you would use “g_vkorg” to name a global variable for storing the sales organization field. MKPF. Functionality • If an object to be updated is already being edited by another developer. and each program should access this INCLUDE module. yet concise object names. Are there SELECTs without WHERE condition against files that grow constantly (BSEG. Changing that object will cause another task to be created under the CTS (Change and Transport System) request for that object. As always. use a function module or include program if multiple programs could use the functionality. a database table access statement.• When naming declarative elements (except for CONSTANTS). you should use a FORM if the functionality is to be used only by that program. You should declare all literals as either text symbols within the text elements of your program or as constants (using the CONSTANT statement) within the data declaration area of your program. you should use an associated Data Dictionary table field name after the standard naming convention prefix whenever possible. Otherwise. DB joins or SELECT… FOR ALL ENTRIES IN ITAB. For example. When naming other declarative elements and/or other types of development elements. You may only use Native SQL under extraordinary circumstances and only with approval from your Team Lead. This will increase your program’s efficiency by eliminating multiple database reads and reducing network traffic. When necessary to access database table data repetitively or continuously. (You must go through the proper approval procedures before creating or updating any table indexes or table buffering. and this is not always the desired result.doc Page: 9 of 65 • • • Last changed on: 2/3/2006 11:58:00 AM . you should use meaningful. VBAK)? Your program design is wrong . Are CHECK statements for table fields embedded in a SELECT…ENDSELECT loop? You should incorporate the CHECK statements into the WHERE clause of the SELECT statement and re-write the statement to no longer use ENDSELECT.) Is the program using nested SELECTs to retrieve data? You should convert nested SELECTs to database views (see Views in the Data Dictionary section of this document). You should always check the return code (SY-SUBRC) after executing a function module call. be sure to check if one already exists.

no duplicate accesses with the same key)? You should buffer accesses to master data fields within your program by storing the data in an internal table and accessing the table with the READ TABLE… BINARY SEARCH method. Is the programming doing calculations/summations that can be done on the database via SUM. unless there is an appropriate index for the “order by” fields. You may use either of these keywords when creating an ABAP program. AVG. Note: It is recommended that you create all new programs via the Repository Browser instead of using the ABAP Editor directly. Is the program using SELECT… APPEND ITAB… ENDSELECT techniques to fill internal tables? You should change the processing to read the data immediately into an internal table (SELECT VBLEN AUART… INTO TABLE IVBAK…) Is the program using SELECT ORDER BY statements? You should read the data into an internal table first and then sort it. MIN. Basically. When a program is created via the Repository Browser. Is the program inserting/updating or deleting data in dialog mode (not via an update function module)? You should make sure that the program issues COMMIT WORK statements when one or more logical units of work (LUWs) have been processed.e. and standard formats for other program elements and Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. you should sort the tables and change the table accesses to use BINARY SEARCH method.• Are SELECT accesses to master data files buffered (i. this is everything that is not logic or procedural code. MAX functions for the SELECT statement? You should use the calculation capabilities of the database via SELECT SUM… Are internal tables processed using the READ TABLE itab WITH KEY… BINARY SEARCH technique? If not. the standard format for the REPORT statement. • • • • • Declarative Elements The term "Declarative Elements" is used to describe the programming elements available to you for defining the internal environment the program will run under. the terms “report” and “program” along with their associated keywords "REPORT" and "PROGRAM" are used interchangeably. This template consists of comment lines for entering a program description. a source code template is created for the entire program.doc Page: 10 of 65 . This section defines the development standards for the following Declarative Elements: • • • • • • • • • REPORT/PROGRAM TABLES TYPES SELECT-OPTIONS PARAMETERS DATA CONSTANTS RANGES FIELD-SYMBOLS REPORT/PROGRAM In the ABAP development environment.

keywords (only comment lines for now. The NO STANDARD PAGE HEADING addition inactivates the standard SAP report header and allows for the use of the West Group standard report header instead. enabling you to reference it from anywhere within your program. TABLES When coding the TABLES statement. starting the REPORT keyword in column 1. immediately following the REPORT statement in your program. and NO STANDARD PAGE HEADING additions to this statement (they are already included in the REPORT statement template(Need to create it)). Example: *----------------------------------------------------------------------* * ZFIGLRA001_SITE_MID_YEAR_BUDGET .Site mid-year budget report by * * quarter. Always include the MESSAGE-ID. indenting each consistently to the right of the REPORT keyword. * *----------------------------------------------------------------------* report zfiglra001_site_mid_year_budget no standard page heading line-size 132 line-count 65 message-id zfiap. wholesale * * * * This program creates the Site Mid-Year Budget Report by Quarter * * for a wholesale site. you must: • • • • Start the TABLES keyword in column 1. For example. you should use the “Program Name” you assigned to the program when you created it.doc Page: 11 of 65 Last changed on: 2/3/2006 11:58:00 AM . Naming convention: When declaring the REPORT/PROGRAM name. This template is not provided when you create a program directly from within the ABAP Editor. When coding the REPORT statement. Declare each database table on a separate line immediately after the TABLES keyword. Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. all programs written for the SAP Financial functional group in the Accounts Payable area (program name ZFIAPxxxxx) shall use message ID (message class) ZFIAPxxxxx. need to create the rest). you must: • • • • Declare it as the first executable statement in your program. Declare all “global” tables together under one TABLES statement. LINE-COUNT. plus the “end of report” line. A “global” table is defined as a table declared outside of a FORM subroutine or function module. Consistently indent each declared table name to the right of the TABLES keyword. Update the MESSAGE-ID addition with the West Group message class associated with the SAP functional group for which the program is written. You can then make the necessary changes to this template using the ABAP Editor. Declare each statement addition on a separate line. The West Group standard header function Z_HEADER_ROUTINE will control the formatting of all report headings. See the “REPORT/PROGRAM OUTPUT” section of this document for more information about function Z_HEADER_ROUTINE. LINE-SIZE.

"Cost Totals "Statistical "Cost Center "Cost Center . Declare all “global” types together under one TYPES statement. you must display a “possible values” box when the user places the cursor on either the low or high range field. Naming convention: You must code each TYPES name with a standard prefix of z. a Data Dictionary field that points to a domain that has an Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. csks. in which case you must code it on the following line and indent it to the right of the SELECTION-SCREEN keyword.You may order the tables any way you like. Consistently indent each declared type to the right of the TYPES keyword. although alphabetizing is recommended. Example: types: zamt zdept(3) type p decimals 2. Consistently indent each declared selection option to the right of the SELECT-OPTIONS keyword (when declaring on the following line). Declare each user-defined type on a separate line immediately after the TYPES keyword. you must code the associated FOR field of the SELECT-OPTIONS statement as either a Data Dictionary field that points to Check Table. Including the table description as an in-line comment is optional. Declare only one individual selection option on a given line. immediately following the TABLES statement in your program.doc Page: 12 of 65 . It is recommended that you include the SELECT-OPTIONS keyword for each declared selection option. SELECT-OPTIONS When coding SELECT-OPTIONS statements. enabling you to reference it from anywhere within your program. type c. Example: tables: cosp. • • If you are declaring a select option field that has a set number of possible values. Consistently indent each associated addition for a given selection option to the right of the SELECTOPTIONS keyword. you must: • • Start the SELECT-OPTIONS keyword in column 1 unless it is subordinate to a SELECTIONSCREEN statement. you must: • • • • Start the TYPES keyword in column 1. cskt. You may declare the selection option either on the same line as the SELECT-OPTIONS keyword or on the next line following the SELECT-OPTIONS keyword.External Postings Ratio Totals Master Texts TYPES When coding the TYPES statement. cosr. A “global” type is defined as a type declared outside of a FORM subroutine or function module. To accomplish this.

PARAMETERS When coding PARAMETERS statements. in which case you must code it on the following line and indent it to the right of the SELECTION-SCREEN keyword. for wkbp-werks. a Data Dictionary field that points to a domain that has an associated “values” list. Examples: Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. Examples: select-options: s_vkorg select-options: s_vtweg select-options: s_werks -. See the “Selection Screens” chapter of the “REPORT/PROGRAM OUTPUT” section of this document for more information on “possible values” boxes. Naming convention: You must code each SELECT-OPTIONS name with a standard prefix of s_.or -select-options: s_vkorg s_vtweg s_werks for wkbp-vkorg default ‘3276’ obligatory. To accomplish this. you must code the associated LIKE field of the PARAMETERS statement as either a Data Dictionary field that points to Check Table. for wkbp-vtweg. for wkbp-werks. See the “Selection Screens” chapter of the “REPORT/PROGRAM OUTPUT” section of this document for more information on “possible values” boxes. you must display a “possible values” box when the user places the cursor on that field. for wkbp-vkorg default ‘3276’ obligatory. you must: • • • • Start the PARAMETERS keyword in column 1 unless it is subordinate to a SELECTION-SCREEN statement. or an internal table field in which the table contains all possible values for the field. If you are declaring a parameter field that has a set number of possible values.associated “values” list. Consistently indent each declared parameter to the right of the PARAMETERS keyword (when declaring on the following line). You may declare the parameter either on the same line as the PARAMETERS keyword or on the next line following the PARAMETERS keyword. Naming convention: You must code each PARAMETERS name with a standard prefix of p_.doc Page: 13 of 65 . or an internal table field in which the table contains all possible values for the field. Consistently indent each associated addition for a given parameter to the right of the PARAMETERS keyword. Declare only one individual parameter on a given line. for wkbp-vtweg. It is recommended that you include the PARAMETERS keyword for each declared parameter.

doc Page: 14 of 65 . Declare each individual work field or include structure belonging to this data structure/internal table on a separate line following the statement containing the BEGIN OF variant. When declaring an internal table or data structure. You may list the declared fields within a given DATA statement in any order. You may consider the TYPE and LIKE additions as one in the same for alignment purposes. If you code it on the following line. Do not use the INCLUDE STRUCTURE keywords. Align all similar additions for each individual work field together within a given DATA keyword grouping (e. you must indent it to the right of the DATA keyword.or -parameters: p_vkorg p_vtweg p_count like wkbp-vkorg. Consistently indent each declared field to the right of the DATA keyword. Code one DATA statement using the LIKE (structure name) addition when declaring an internal table to be loaded with database table data (for repetitive processing) and all of the database table fields are to be accessed. You may declare the DATA keyword multiple times to create logical groupings of work fields for clarity and readability purposes. VALUE). This is defined as a data work field or structure declared outside of a FORM subroutine or function module. You are able to reference it from anywhere within the program.parameters: p_vkorg parameters: p_vtweg parameters: p_count like wkbp-vkorg. like wkbp-vtweg. Code one DATA statement using the LIKE (structure name) addition when declaring a data structure that is identical to a Data Dictionary structure. • Local variable.g. type I default 50 obligatory. Align the END OF variant with the BEGIN OF variant. like wkbp-vtweg. you must: Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. When declaring individual work fields. This is defined as a data work field or structure declared within a FORM subroutine or function module. you must: • Start the DATA keyword in column 1 if it is a “global” variable. TYPE. You are only able to reference it from within that form or function. Code the BEGIN OF variant either on the same line as the DATA keyword or on the following line. DATA When coding DATA statements. Use the LIKE addition whenever possible to reference a Data Dictionary field. Code the END OF variant on a separate line after the last declared individual work field or include structure of the data structure/internal table. or column 3 if it is a “local” variable. type I default 50 obligatory. Indent each individual work field consistently to the right of the BEGIN OF variant. you must: • • • • • • • • • • • Declare each field on a separate line immediately after the DATA keyword. -. • Global variable.

Use the standard prefix plus the associated Data Dictionary field name or system variable.) within an individual work field name. . . like wkbp-vtweg. Examples: Individual work fields (global variables): data: g_vkorg g_vtweg g_count like wkbp-vkorg. Do not include this prefix for individual work fields declared within a structure or internal table. data: l_vkorg like wkbp-vkorg. Otherwise. when naming an individual work field.or -data: begin of gs_orglevel. l_vtweg like wkbp-vtweg. whenever possible. Naming convention: When declaring DATA names. each using the LIKE (table field) addition when declaring an internal table to be loaded with database table data (for repetitive processing) and only a subset of the database table’s fields are to be accessed. endform. Include a standard prefix of lt_ for each local internal table. Set the OCCURS value for internal tables (used to define their size) to 0 if the table will contain more than 8K-bytes of data. Do not include this prefix for individual work fields declared within a structure or internal table. estimate the actual table size and set the OCCURS value accordingly. vkorg like wkbp-vkorg. werks like wkbp-werks. Include a standard prefix of gt_ for each global internal table. Individual work fields (local variables): form newform. Never include a hyphen ( . Data structures (global): data: begin of gs_orglevel. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.doc Page: 15 of 65 value 20. end of gs_orglevel. type i value 20. Include a standard prefix of l_ for each local individual work field. you must: • • • • • • • • Include a standard prefix of g_ for each global individual work field. -. Include a standard prefix of gs_ for each global structure.• • Code a group of individual data fields. Include a standard prefix of ls_ for each local structure. You may include underscores ( _ ). l_count type i . vkorg like wkbp-vkorg. . vtweg like wkbp-vtweg.

werks like wkbp-werks. like kna1. . . vtweg like wkbp-vtweg. vtweg like wkbp-vtweg. data: g_cust Data structures (local): form newform.doc Page: 16 of 65 like kna1. . form newform. vkorg like wkbp-vkorg. end of ls_orglevel. -. vkorg like wkbp-vkorg. end of gs_orglevel. endform. werks like wkbp-werks. . . vtweg like wkbp-vtweg. werks like wkbp-werks.or -form newform. data: begin of ls_orglevel. endform. . data: begin of lt_cust occurs 0. Internal table (local): form newform. werks like wkbp-werks. . vkorg like wkbp-vkorg. end of gt_cust. end of ls_orglevel.or -data: begin of gt_cust occurs 0. . end of gt_cust. -. vkorg like wkbp-vkorg. . data: begin of ls_orglevel.vtweg like wkbp-vtweg. endform. vtweg like wkbp-vtweg. data: l_cust . Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. werks like wkbp-werks. Internal table (global): data: begin of gt_cust occurs 0.

This is defined as an individual field or structure declared outside of a FORM subroutine or function module. • Local constant. end of lt_cust. . . you must: Last changed on: 2/3/2006 11:58:00 AM . Declare each field on a separate line immediately after the CONSTANTS keyword. end of lt_cust. Consistently indent each individual constant field consistently to the right of the BEGIN OF variant. Consistently indent each declared field to the right of the CONSTANTS keyword. • Global constant. or column 3 if it is a “local” constant. . you must: • Start the CONSTANTS keyword in column 1 if it is a “global” constant. This is defined as an individual field or structure declared within a FORM subroutine or function module. Declare each individual constant field belonging to this structure on a separate line following the statement containing the BEGIN OF variant. Use the LIKE addition whenever possible to reference a Data Dictionary field. endform. VALUE). If you code it on the following line. You are only able to reference it from within that form or function. You may declare the CONSTANTS keyword multiple times to create logical groupings of constant fields for clarity and readability purposes. you must indent it to the right of the CONSTANTS keyword. . Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. Code the BEGIN OF variant either on the same line as the CONSTANTS keyword or on the following line. werks like wkbp-werks. werks like wkbp-werks. You are able to reference it from anywhere within the program. TYPE. You may consider the TYPE and LIKE additions as one in the same for alignment purposes.doc Page: 17 of 65 When declaring individual constant fields. vtweg like wkbp-vtweg. Code the END OF variant on a separate line after the last declared individual constant field of the structure. You may list the declared fields within a CONSTANTS statement in any order. . Align all similar additions for each individual constant field together within a given CONSTANTS keyword grouping (e. vtweg like wkbp-vtweg.g. .or -form newform.vkorg like wkbp-vkorg. vkorg like wkbp-vkorg. data: begin of lt_cust occurs 0. -. CONSTANTS When coding CONSTANTS statements. endform. you must: • • • • • • • • When declaring a constant structure.

value ‘4844’.). you must: • • • • Include a standard prefix of gc_ for each global individual work field or structure. or column 3 if it is a “local” range. concise field name. value ‘01’. Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. constants: lc_sales_org_wg lc_dist_chan_01 lc_max_entries .doc Page: 18 of 65 Last changed on: 2/3/2006 11:58:00 AM . like wkbp-vkorg like wkbp-vtweg type i value ‘4844’. -. Examples: Individual fields (global): constants: gc_sales_org_wg gc_dist_chan_01 gc_max_entries Individual fields (local): form newform. value 100. you must: • Start the RANGES keyword in column 1 if it is a “global” range.• • Align the END OF variant with the BEGIN OF variant. value ‘01’. Do not include this prefix for individual work fields declared within a structure or internal table. You may include underscores ( _ ). RANGES When coding RANGES statements. value 100. Structures (global): constants: begin of gc_orglevel. . Never include a hyphen ( . Use the LIKE addition whenever possible to reference a Data Dictionary field. Naming convention: When declaring CONSTANTS names. sales_org_wg like wkbp-vkorg dist_chan_01 like wkbp-vtweg site_4422 like wkbp-werks end of gc_orglevel. value ‘4422’.or -constants: begin of gc_orglevel. value ‘4844’. Use the standard prefix plus a descriptive. Include a standard prefix of lc_ for each local individual work field or structure. Do not include this prefix for individual work fields declared within a structure or internal table. . endform. like wkbp-vkorg like wkbp-vtweg type i value ‘4844’ value ‘01’. value ‘4422’. sales_org_wg like wkbp-vkorg dist_chan_01 like wkbp-vtweg site_4422 like wkbp-werks end of gc_orglevel. value ‘01’.

for wkbp-vtweg. . Start each new INSERT statement in column 1. Examples: Global: ranges: gr_vkorg gr_vtweg Local: form newform. giving each group a meaningful name. Consistently indent each declared range to the right of the RANGES keyword. Use the standard prefix plus the associated Data Dictionary field name or system variable whenever possible. This is defined as a range declared outside of a FORM subroutine or function module. Naming convention: When declaring RANGES names. You are only able to reference it from within that form or function. • Local range.• • • • Global range. You may list the declared ranges within a given RANGES statement in any order. Declare each individual insert field on a separate line immediately after the INSERT keyword. Declare each individual group on a separate line immediately after the FIELD-GROUPS keyword. ranges: lr_vkorg lr_vtweg . Never include a hyphen ( . FIELD-GROUPS When coding FIELD-GROUPS statements. Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. you must: • • • • Include a standard prefix of gr_ for each global range. Always name the first group “fg_header” (available sort fields) and follow it with the remaining groups. endform. You are able to reference it from anywhere within the program. you must: • • • • • • • Start the FIELD-GROUPS keyword in column 1. for wkbp-vtweg.doc Page: 19 of 65 Last changed on: 2/3/2006 11:58:00 AM . for wkbp-vkorg. . Align all FOR clauses underneath each other for each declared individual range within a given RANGES keyword grouping. Consistently indent each declared group to the right of the FIELD-GROUPS keyword. You may include underscores ( _ ). Include a standard prefix of lr_ for each local range. This is defined as a range declared within a FORM subroutine or function module. You may declare the RANGES keyword multiple times to create logical groupings of ranges for clarity and readability purposes. Follow the FIELD-GROUPS declaration with the appropriate INSERT statement required to insert field names into each field group. for wkbp-vkorg. Declare each range on a separate line immediately after the RANGES keyword.).

you must: • • • Include a standard prefix of fg_. You may include underscores ( _ ). Use the standard prefix plus a descriptive. You may declare the FIELD-SYMBOLS keyword multiple times to create logical groupings of field symbols for clarity and readability purposes. you must: • Start the FIELD-SYMBOLS keyword in column 1 if it is a “global” field symbol. • Global field symbol. Use a corresponding Data Dictionary field. fg_detail. when declaring an insert field. This is defined as a field symbol declared outside of a FORM subroutine or function module. • Local field symbol. You are only able to reference it from within that form or function.). you must: • • • • Include a standard prefix of gfs_ for each global field symbol. or column 3 if it is a “local” field symbol. Never include a hyphen ( . • • Naming convention: When declaring FIELD-SYMBOLS names. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. Consistently indent each declared field symbol to the right of the FIELD-SYMBOLS keyword. You may list the declared field symbol within a given FIELD-SYMBOLS statement in any order. FIELD-SYMBOLS When coding FIELD-SYMBOLS statements. insert wkbp-werks wkbp-matnr into fg_detail. This is defined as a field symbol declared within a FORM subroutine or function module.• • Consistently indent each declared insert field to the right of the INSERT keyword. concise name. Never include a hyphen ( . whenever possible. Include a standard prefix of lfs_ for each local field symbol. Declare each field symbol on a separate line immediately after the FIELD-SYMBOLS keyword.). You may include underscores ( _ ). concise name. Use the standard prefix plus a descriptive.doc Page: 20 of 65 . Examples: field-groups: fg_header. insert wkbp-vkorg wkbp-vtweg into fg_header. Naming convention: When declaring FIELD-GROUPS names. You are able to reference it from anywhere within the program.

field_symbols: <lfs_fieldname>. . you should code the events in the order that they will be executed.doc Page: 21 of 65 . This section defines the development standards for the following Event Elements: • • • • • • AT SELECTION SCREEN START-OF-SELECTION END-OF-SELECTION AT USER-COMMAND AT PFn TOP-OF-PAGE AT SELECTION-SCREEN ON psel You should use the AT SELECTION-SCREEN event with the ON psel addition. When applicable. <gfs_save_fieldname>. Local: form newform. endform. . where psel is a parameter or select-options field. you should edit the parameter or select-options field within a stand-alone AT SELECTION-SCREEN event (without any additions). you must start them in column 1. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. when editing selection screen input for an individual field. You will generate field help using other methods (see the “Selection Screens” chapter of the “REPORT/PROGRAM OUTPUT” section of this document).Examples: Global: field_symbols: <gfs_fieldname>. Event Elements The term "Event Elements" is used to describe the programming elements available to you for designating a set of statements to be executed at a certain point in time or upon the occurrence of a specific event during execution of your program. START-OF-SELECTION You must code the START-OF-SELECTION event in all your ABAP reporting programs. <lfs_save_fieldname>. When coding event element keywords. If the validity of a parameter or select-options field is dependent upon the value of another parameter or select-options field. . ON HELP-REQUEST You shall not use the ON HELP-REQUEST addition.

AT PFn You shall not use the AT PFn event. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. AT USER-COMMAND You shall use the AT USER-COMMAND event within interactive programs to interrogate user selections via function key or the command field. ELSEIF (when used). All standards that apply to TOP-OP-PAGE will also apply to TOP OF PAGE DURING LINESELECTION. See the “REPORT/PROGRAM OUTPUT” section of this document for more information on function module Z_HEADER_ROUTINE. Within this event.END-OF-SELECTION You must code the END-OF-SELECTION event in all your ABAP reporting programs. you shall print the standard report header lines (imported via function module Z_HEADER_ROUTINE). you must: • Align the ELSE (when used). you shall print the “end of report” line (imported via function module Z_HEADER_ROUTINE). This section defines the development standards for the following Control Elements: • • • IF CASE ON CHANGE OF • • • • • DO WHILE LOOP FORM (SUBROUTINES) CALL (FUNCTION MODULES) IF When coding an IF statement. and ENDIF keywords with the IF keyword. Control Elements The term "Control Elements" is used to describe the programming elements available to you for controlling the flow of your program within some type of processing block of logic. See the “REPORT/PROGRAM OUTPUT” section of this document for more information on function module Z_HEADER_ROUTINE. Within this event. TOP-OF-PAGE You must include the TOP-OF-PAGE event in all your ABAP programs that produce list report(s). DURING LINE-SELECTION You must include the TOP-OF-PAGE event with the DURING LINE-SELECTION addition in all your ABAP programs that will contain “drill-down” online reporting capability. Use the AT USER-COMMAND event instead. except for testing purposes.doc Page: 22 of 65 . Do not use the AT PFn event for this purpose.

when gc_rec_type_b or gc_rec_type_c. If no action is to be taken when branching to the WHEN OTHERS clause. Align the ENDCASE keyword with the CASE keyword. you must: • • • • • • Code each WHEN clause on a separate line and indent each WHEN keyword consistently to the right of the CASE keyword. Example: case g_rec_type. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. perform process_military. perform process_invoice. Alternatively. perform process_report_3. elseif g_vkorg = gc_vkorg_rc. The CASE statement is more efficient than the IF statement in this situation. you should use PERFORM and CASE statements. Code each logical expression for a given WHEN clause on a separate line after the WHEN keyword and consistently indent it to the right of the WHEN keyword. When you need to check the same data field repeatedly for particular values. endif. Alternatively. endcase. Code all WHEN clauses in the order that they are most likely to occur (most likely will go first). when gc_rec_type_d. perform process_header_rec. perform process_vkorg_rc. Code the ELSE keyword as the only word on that line (when used). you would not code any procedural statements underneath it. perform process_report_2. perform invalid_rec_type.• • • Consistently indent to the right of the IF keyword all other statements between the IF and ENDIF statements that do not contain one of these keywords. if g_rec_type = gc_header_rec. elseif g_vtweg = gc_vtweg_military. when others. you should use a CASE statement instead of an IF statement. you may use PERFORM statements. when gc_rec_type_a. You should start all statements associated with a particular ELSE clause on the line following the ELSE keyword and consistently indent them to the right of the ELSE keyword.doc Page: 23 of 65 . CASE When coding an CASE statement. Examples: if bkpf-belnr = g_invoice_nbr. else perform check_document_nbr. Keep nested IF statements to a minimum for readability. endif. Keep nested CASE statements to a minimum for readability. Always use the WHEN OTHERS clause. perform process_report_1.

Whenever possible. write: g_letter1. do 5 times varying g_letter1 from g_word1 then g_word3 varying g_letter2 from g_word2 then g_word4. enddo. enddo. you must follow the coding indentation rules as stated in the “Coding Guidelines” previously mentioned in this section of the document. Examples: do. g_letter2. LOOP When coding the LOOP control element. g_letter2. write: g_letter1. you must follow the coding indentation rules as stated in the “Coding Guidelines” area of this chapter of the document. Examples: while g_cnt < 10. WHILE When coding the WHILE control element.doc Page: 24 of 65 . Whenever possible. endwhile. while g_cnt < 10 vary g_letter1 from g_word1 next g_word3 vary g_letter2 from g_word2 next g_word4. perform main_process. you should use a WHILE loop instead of a DO…ENDDO construct because it is slightly more efficient. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. You must always code the DO control element with a controlled exit point (such as a TIMES variant or an EXIT statement) to avoid a continuous loop. you should use a WHILE loop instead of a DO…ENDDO construct because it is slightly more efficient. add 1 to g_cnt. read dataset pinfile into g_rzone_h. you must follow the coding indentation rules as stated in the “Coding Guidelines” area of this chapter of the document with the following exception: the FROM and TO additions may be on the same line. endwhile. endif. if sy-subrc <> 0. exit. add 1 to g_cnt.DO When coding the DO control element.

loop at lt_mara from 1 to 10. you must follow the coding indentation rules as stated in the “Coding Guidelines” area of this chapter of the document. you should not duplicate the same code in multiple programs.doc Page: 25 of 65 Last changed on: 2/3/2006 11:58:00 AM . When declaring FORM parameter names (in the USING addition without the VALUE clause).). you should consider either putting the subroutine logic into a function module or an “include” program. endloop. concise names. Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. which will place the form at the end of the program. The use of internal subroutines are imperative in developing well-structured programs. you must: • • • • Use meaningful. append lt_zrbpw. Naming convention: When declaring FORM names. As an alternative. You may include underscores ( _ ). This is because the entire parent program of the external form will get pulled into runtime memory. You should always code a FORM subroutine after its associated PERFORM statement to give the program a “top-down” design. Never include a hyphen ( . You must code all FORM subroutines after the END-OF-SELECTION event and order them according to their execution sequence. Examples: loop at lt_mara. lt_zrbpw-matnr = lt_mara-matnr. append lt_zrbpw. There are two ways to import a FORM pattern into the source code: by double-clicking on the associated PERFORM statement. or by importing the FORM pattern using “Other Patterns” at the bottom of the “Pattern” dialog box. lt_zrbpw-matnr = lt_mara-matnr. This will ensure that a standard comment box for the form will be imported into the source code. not using the WHERE addition) and first sort the internal table in the order that the internal table fields are declared. endloop. you may get unpredictable results. Whenever possible. you should place logically associated command statements into subroutines within your program.e. Wherever possible. Unless you loop through the entire internal table (i. You should use the ABAP Editor “Pattern” when coding the FORM statement. which will place the form at the cursor position. you must: Include a standard prefix of f_ for each individual work field. Include a standard prefix of ft_ for each internal table. It is recommended that you do not call a FORM subroutine from within your program that has been declared in another program (external subroutine). lt_zrbpw-matnr = lt_mara-matnr. FORM (SUBROUTINES) When coding the FORM control element.Warning: You should use the AT additions at your own risk. endloop. descriptive. append lt_zrbpw. loop at lt_mara where mchl3 = g_mchl3.

descriptive.• • • Excluding the standard prefix. append lt_zrbpw. You may include underscores ( _ ). B000. Example: call function 'job_close' exporting event_id event_param jobcount jobname importing Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 = = = = 'R_BGP_VKPB_JOBSTART' g_event_param g_jobnr f_jobname Page: 26 of 65 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. loop at lt_mara where matkl = g-matkl. “ LOCK_TABLE_W CALL (FUNCTION MODULES) It is strongly recommended that you use the appropriate ABAP Editor “Pattern” when coding the CALL statement to ensure that you include all associated parameters for the given function module. zrbpl-vtweg = f_vtweg. you may consider adding a prefix to each FORM name in the format X999.).doc .e. A200. “ ADD_WL_MAT_MC Example of USING addition (without the VALUE clause): perform lock_table_w using svkorg-low pvtweg. etc. Never include a hyphen ( . You must always check the return code (SY-SUBRC) after executing a CALL to a function module. use a name that is identical to the respective parameter name listed in the USING addition of the corresponding PERFORM statement. form lock_table_w using f_vkorg f_vtweg. then place the FORM subroutines within the program in alphanumeric sequence (i. modify zrbpl. A000. endform. Tip: To quickly find a particular FORM subroutine within your program. especially a hard copy. where X is any alphanumeric character and 999 is any number. endform. commit work. lt_zrbpw-matnr = lt_mara-matnr. C000. *----------------------------------------------------------------------* form add_wl_mat_mc. Examples: NOTE: Use the Pattern for the FORM statement via the ABAP Editor. Use meaningful. endloop. concise names. A110. B100.). A100. zrbpl-vkorg = f_vkorg. You may delete any unused parameters from the CALL statement to enhance readability. *----------------------------------------------------------------------* * Form ADD_WL_MAT_MC *----------------------------------------------------------------------* * Select all articles for a given merchandise category.

when 0.job_was_released exceptions cant_start_immediate invalid_startdate jobname_missing job_close_failed job_nosteps job_notex lock_failed others case sy-subrc. = g_job_subrc = = = = = = = = 1 2 3 4 5 6 7 8. Operational Elements The term "Operational Elements" is used to describe the programming elements available to you for performing some type of operational action on any of the data elements of your program. This section defines the development standards for the following Operational Elements: • • • • • • • • • • • • CHECK CLEAR COMMIT WORK CONCATENATE DELETE EXPORT…TO MEMORY / IMPORT…FROM MEMORY FORMAT MODIFY MOVE/MOVE-CORRESPONDING READ TABLE (itab) SELECT WRITE CHECK It is recommended that you use the CHECK statement instead of the IF…EXIT…ENDIF structure when determining if a looping structure or routine shall be terminated. when others. endcase. write: text-001.doc Page: 27 of 65 . Use the WHERE addition of the SELECT statement instead and change the statement to no longer use ENDSELECT. message e999 with sy-subrc. You should not use the CHECK statement within a SELECT…ENDSELECT construct to determine which rows should be processed. Examples: Standard method of terminating a looping structure Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.

then you need to issue the Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. g_char = space.form read_itab. . check sy-subrc = 0. CLEAR It is recommended that you use the CLEAR statement for setting a field to its initial value. . move space to g_char. You should issue it in the context of a logical unit of work (LUW). Non-standard methods of initializing field (DO NOT USE!) g_integer = 0. value i. g_char = ‘’. . g_char . COMMIT WORK You should always issue a COMMIT WORK after performing a large number of updates (changes/inserts/deletes) to the database. For example. endif. read table itab where werks = p_werks binary search. Non-standard method of terminating a looping structure (DO NOT USE!) form read_itab. move 0 to g_integer. Standard method of initializing field clear g_integer. . value c. . endform. clear g_char. . the database is not out of sync. if sy-subrc <> 0. such that if the next COMMIT WORK fails. . endform. Examples: data: g_integer . if update A and update B both need to be in the database for it to be logically correct. read table itab where werks = p_werks binary search. exit.doc Page: 28 of 65 . .

Excluding the standard prefix. all FROM MEMORY keywords together.doc Page: 29 of 65 Last changed on: 2/3/2006 11:58:00 AM . Likewise. It is generally more clear and efficient than using a data structure. you should give the individual work field or internal table to receive imported data a name that is identical to the respective memory ID being imported. Examples: Standard method of deleting database table entries with similar characteristics delete table zrbpc where posted = gc_yes or sleeping = gc_yes. endselect. EXPORT …TO MEMORY / IMPORT…FROM MEMORY You should always use the ID addition with the EXPORT or IMPORT statement. DELETE If you need to delete multiple database or internal table entries . and the ID keywords together for each consecutive statement. Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. you must: • • • Include a standard prefix of m_progname_ for each ID identifying an individual work field. CONCATENATE It is recommended that you use the CONCATENATE statement for joining character strings together outside of a looping structure or within a looping structure that will have a minimum amount of loops. If update A and update B are not related and update A could affect a large number of records (say 1000 records) then you should issue a COMMIT WORK following both update A and update B. use a name that is identical to the respective individual work field or internal table containing the data to be exported. where progname is the name of the exporting program. where progname is the name of the exporting program. as opposed to the DELETE statement within a looping structure. Non-standard method of deleting database table entries with similar characteristics (DO NOT USE!) select * from zrbpc where posted = gc_yes and sleeping = gc_yes. This is necessary so that if update B fails you can ROLLBACK update A so that the database stays consistent. Naming convention: When declaring ID names. You should use a data structure when joining character strings within a looping structure that will loop a significant amount of times. You may code the entire EXPORT…TO MEMORY / IMPORT…FROM MEMORY statement. including the ID addition. Include a standard prefix of mt_progname_ for each ID identifying internal table.COMMIT WORK after update B. delete zrbpc.all containing the same characteristics you should use the WHERE addition of the DELETE statement. It is recommended that you align all TO MEMORY keywords together. or if the concatenation involves many fields and incorporating them all into one CONCATENATE statement would become difficult to read. on the same line.

You may code the first addition to this statement on the same line as the keyword FORMAT.doc Page: 30 of 65 Last changed on: 2/3/2006 11:58:00 AM . COLOR COL_TOTAL instead of COLOR 3). thereby not noticeably increasing processing time. by definition. concise names. descriptive. The MOVECORRESPONDING statement is acceptable only if you do not execute it a significant number of times throughout the course of one execution of the program. When executing the READ TABLE (itab) statement using the WITH KEY K1 = F1 and BINARY SEARCH additions. Never include a hyphen ( . from from from from memory memory memory memory FORMAT You should apply the same standards to the FORMAT statement that you apply to the WRITE statement. aligning all additions. ‘mt_zfiglra001_csku’. ‘m_zfiglra001_versn’. For performance reasons. You should code any further additions on subsequent lines. When using the COLOR addition. id id id id ‘m_zfiglra001_year’. ‘mt_zfiglra001_csku’. MODIFY When using the MODIFY dbtab statement to insert or update a database table entry. MOVE/MOVE-CORRESPONDING When moving data from individual fields of a database or internal table to their corresponding fields in another database or internal table. you must: • Sort the internal table by the desired sequence before executing this statement.• • Use meaningful.). You may include underscores ( _ ). ‘mt_zfiglra001_werks’. Example: format color col_total intensified off hotspot. a new entry will be inserted (just like the INSERT statement) if the key does not already exist. Examples: export export export export import import import import g_year l_versn gt_csku lt_werks g_year l_versn gt_csku lt_werks to to to to memory memory memory memory id id id id ‘m_zfiglra001_year’. one addition per line. it is generally recommended that you use individual MOVE statements instead of the MOVE-CORRESPONDING statement because they are more efficient. Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. ‘m_zfiglra001_versn’. READ TABLE (itab) It is highly recommended that the READ TABLE (itab) statement is used with the BINARY SEARCH addition whenever possible to enhance performance. you should use the MODIFY statement only if it is not possible for you to distinguish between using the INSERT or UPDATE option.g. you should use the COL_xxx option instead of the number of the color (e. or the new entry will update the existing entry of the same key (just like the UPDATE statement) if the key already exists. ‘mt_zfiglra001_werks’.

SELECT Note: The “Performance” area of the “Coding Guidelines” chapter of this section contains many guidelines for efficient use of the SELECT statement. See the “Table Indexes” chapter of the “DATA DICTIONARY ELEMENTS” section of this document for more information about creating table indexes. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. even if the entry does indeed exist on the internal table. you may need to incorporate the field into a new index for the table to speed up the table search process. it is recommended that you code one WRITE statement per output line. You should apply the same standards to the WRITE statement that you apply to the FORMAT statement. You should use the UP TO n ROWS addition when checking to see whether a particular value for a key field exists on the table and it is possible that this value could exist on more than one table entry (partial key). for you to “chain” statements together on one line using the statement keyword with a colon. 10 l_prtdd_year 14 sy-vline. 02 l_prtdd_cc 09 sy-vline. 19 l_prtdd_acct 25 sy-vline. color col_normal intensified off. Example: write: /01 sy-vline. color col_normal intensified off. using edit mask '__________' color col_normal intensified off. You should always check the system return code (SY-SUBRC) after execution of a SELECT statement. color col_normal intensified off. When using a non-key field in the WHERE clause. When you are writing to a report.• List all key fields in the WITH KEY addition in the order that the table is sorted. using edit mask '_______' color col_normal intensified off. 15 l_prtdd_period 18 sy-vline. by our standards.doc Page: 31 of 65 . using edit mask '_______' color col_normal intensified off. If you do not. 48 l_prtdd_docno 58 sy-vline. you may get a return code of 4 or 8 (entry not found) after executing this statement. You can find standards for the formatting of report output in the “REPORT/PROGRAM OUTPUT” section of this document. 26 l_prtdd_amt 47 sy-vline. WRITE The WRITE statement is the only procedural statement in which it is acceptable.

the COLUMN HEADER text element will not appear on our reports. You must code all column headers manually as text symbols. List header. endif. You must code all list headers manually as text symbols. Because we do not use the standard ABAP header for our reports. For IF…ELSE…ENDIF structures that contain many lines. You may use both full line (“*” in column 1) and in-line (followed by double quote “) comments as long as you do not detract from the readability of the program. perform e510_add_wl_mat_matnr. When formatting the text description you must: • • Capitalize only the first letter of the first word. Not used. The “Title” text element should be the same as the title defined in the Attributes of the program. At a minimum. you may add an in-line comment to the end of the ENDIF statement to indicate its associated IF statement. . and you should properly document all complex logic. . you should provide the necessary level of documentation required to fully clarify the purpose and functionality of the specific logic.doc Page: 32 of 65 . Column header. This will help identify where the IF construct begins if it is not obvious. Because we do not use the standard ABAP header for our reports. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.Other Source Code Elements This section defines the development standards for the following miscellaneous source code elements: • COMMENTS COMMENTS The amount of internal program documentation to include in your program via comments is mainly up to you. elseif not gt_aclvl-matkl is initial. ) or colon ( : ). Selection texts You must include an appropriate text description for each selection text field (selection options and parameters). perform e530_add_wl_mat_mchl3. For this reason it is unnecessary to enter a “Title” text element. Not used. as SAP will default to the title defined in the attributes. the LIST HEADER text element will not appear on our reports. . Example: if not gt_aclvl-matnr is initial. perform e520_add_wl_mat_matkl. Never end it with a period ( . “ not gt_aclvl-matnr is initial Text Elements Titles and headers Title. elseif not gt_aclvl-mchl3 is initial.

miscellaneous report texts. you should refer to Chapter 11 of the “SAP Style Guide”. audit report line item descriptions. you may use any combination of alphanumeric and/or special characters. Naming convention: When declaring a Text Symbol ID. Text symbols You must code any language text to be used as output from a program (excluding Titles and headers and Selection texts) as a “text symbol”. This includes such things as report headers. and the “Selection Screens“ chapter of the “REPORT/PROGRAM OUTPUT” section of this document.doc Page: 33 of 65 .For more guidelines on selection text formatting. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. etc.

This will provide consistency between SAP and custom applications. Similar SAP programs for an SAP-supplied message. if appropriate. There are six types of messages: ‘I’ . or message class ZX if the message is generic-enough to be used by multiple application modules. you should create a new message. Create associated “long text”.Information. it is recommended that you use an existing message. If the message’s message class (mc) is identical to the message class designated in the MESSAGE-ID addition of the REPORT statement. You should check the following areas in the order listed to determine if a suitable message exists: 1. You should make sure the existing message AND its associated “long text” are both appropriate for the given situation. ) or colon ( : ). For message class standards. Never end it with a period ( . 4.Success. you can omit the message class (mc) in the MESSAGE statement. you should refer to “Texts” of the “SAP Style Guide” (Help > Application help > BC – Basis Components > BC – SAP Style Guide > Texts).Abend. Capitalize only the first letter of the first word. transaction terminated ‘X’ . enter to continue ‘W’ . You shall not use the MESSAGE statement in the format “MESSAGE ID mid TYPE mtyp NUMBER mnr”. Other custom message classes. Examples: message e014 with g_vkorg g_vtweg.Warning. All MESSAGE statements should use the following format: MESSAGE xnnn(mc) where: x nnn mc = message type = message number = message class. This message class is used for custom messages that are function module-independent. correction possible ‘E’ . If a suitable message (with “long text”) could not be found in any of the above areas. 3. 2.Messages When your program must display a message. Custom message class ZXXXX (Need to create it). Program’s default message class (assigned in REPORT statement).doc Page: 34 of 65 .Exit. correction required ‘A’ . transaction terminated with short dump message ‘S’ . you must: • • • • • Define the message within either the program’s default message class (if applicable only to that application module). message on next screen For more guidelines on the format and structure of message texts.Error. When creating a new message. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. you should refer to the “Message classes” area of the “OTHER DEVELOPMENT ELEMENTS” section of this document.

you may delete them from the documentation. A complete list of these section names can be found in table TTDTG. and a VARVALUE (symbol value) field which is the text for the section that appears when you display the program documentation on-line. In addition to the above sections. Program Documentation You are required to create on-line program documentation for each of your ABAP programs (main programs and “includes”) using the ABAP Editor’s program documentation facility. How the system or program has reacted to the event that has caused this message to appear. A complete list of these section names can be found in table TTDTG. The next steps the user should follow in response to this message. although the use of ‘Z’ as a first character is will be mandatory. If any of the above sections will not be used to document the message. you can organize the long text documentation within certain standard sections. Long text You are required to include “long text” with each message. It will be up to them to develop their own standards for the use of variants. you can organize your program documentation within certain standard sections. Work with the Basis group prior to transporting variants. the following sections will appear: VARNAME DESCRIPTION VARVALUE Description Notes Description of the program’s function. During editing. and a VARVALUE (symbol value) field which is the text for the section that appears when you display the program documentation on-line. You should create your documentation to be developer-oriented (as opposed to user-oriented). This is basically a more detailed description of the original message. Each section consists of a VARNAME (symbol name) field which is the name of the symbol that you would code in the documentation input screen (delimited by &). Any prerequisites that must be met before this File name: /opt/scribd/conversion/tmp/scratch6126/59492316. During editing. Each section consists of a VARNAME (symbol name) field which is the name of the symbol that you would code in the documentation input screen (delimited by &). Variants The functional and business users are responsible for the support of program variants in the production environment. When you enter the long text maintenance screen for an individual message the very first time. you may add any other sections from the TTDTG table as needed to further document the message. This should consist of the program description entered as comments in the source code immediately before the REPORT statement. When you enter the program maintenance screen for your program the very first time. as the target client on WRQ is client 399.Message i025(zfiap). the following sections will appear: VARNAME CAUSE SYSTEM_RESPONSE WHAT_TO_DO VARVALUE Diagnosis System response What to do Notes What has occurred within the program to cause this message to appear. meaning that it should consist of any technical information to support the understanding of the program.doc Page: 35 of 65 PRECONDITION Last changed on: 2/3/2006 11:58:00 AM Requirements Last changed by: u0092453 . and Basis will need to know what other clients you would like it to be copied to. Variants are client dependent.

A Data Dictionary field that points to a domain that has an associated “values” list. you may define a new Data Dictionary field and domain for this screen field within the West Group Utility Structure in the Data Dictionary (need to create this). you may add any other sections from the TTDTG table as needed to further document the program. You would most likely use this method if you only need a subset of table values for the “possible values” box. etc. (See the “Selection texts” area of the “Program Elements” chapter of this section for more information on screen field descriptions. In addition to the above sections. reports.OUTPUT EXAMPLE Output Example program can be executed. This section will cover the following selection screen elements: • • • Field Descriptions Possible Values Field Help Field Descriptions You must include an appropriate text description for each screen field. FOR for selection options .doc Page: 36 of 65 .table updates. If an existing domain does not provide these values. REPORT/PROGRAM OUTPUT This section defines the development standards for the following REPORT/PROGRAM output elements: • • • Selection Screens Lists Fonts Selection Screens This section describes all the development standards you are to follow when creating selection screens. To accomplish this. Ergonomic examples of SAP screens can be displayed within the ABAP Workbench by going to the Repository Browser. you must format each selection screen to be ergonomically consistent with other similar SAP screens. you must display a “possible values” box when the user places the cursor on the field. you must code the screen field association . Within this documentation. Any examples of how this program might be used.as one of the following: • • • A Data Dictionary field that points to Check Table. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. you may delete them from the documentation. This description will be displayed next to the input field.LIKE for parameters. menu selection “Environment/Ergonomic examples/Screens”. Any output produced from this program . the term “screen field” refers to each parameter or selection options field. Within each of your custom-developed programs. screens.) Possible Values If you are declaring a screen field that has a set number of possible values. See the “Selection Screens” chapter of the “REPORT/PROGRAM OUTPUT” section of this document for more information on “possible values” boxes. An internal table field in which the table contains all possible values for the field (used in conjunction with the ON VALUE REQUEST addition of the AT SELECTION SCREEN event). If any of the above sections will not be used to document the message.

Field Formats The following sections describe the standard format to be used for certain standard data fields whenever you display them on your custom lists.doc Page: 37 of 65 . Do we need field formats like the following examples?? Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.Field Help You are required to make field help available for each screen field. you must define a new Data Dictionary field and data element for this screen field within the West Group Utility Structure in the Data Dictionary. Function Z_HEADER_ROUTINE prepares this line for use within the list. This section will cover the following list elements: • • • • • Header “End of Report” Line Logos Field Formats Audit Reports *** Place screen print of basic list here when time permits *** Header You must use the custom standard report header as opposed to the standard SAP report header within all custom lists. To create help for a given field. Lists You must format each custom list to be ergonomically consistent with other similar SAP lists. If the screen field does not have an associated data element in the Data Dictionary. See the “Structures” chapter of the “DATA DICTIONARY ELEMENTS” section of this document for more information on the West Group Utility Structure. you must add appropriate text to the screen field’s associated data element documentation in the Data Dictionary. Ergonomic examples of SAP lists can be displayed within the ABAP Workbench (Repository Browser > Environment > Ergonomic examples > Lists). Refer to documentation for the function Z_HEADER_ROUTINE provided within the ABAP Workbench for instructions on how to incorporate the custom standard report header into an ABAP program. Logos You should not print any logos on any ABAP lists or SAPScript reports without first researching its affect on performance. “End of Report” Line You must print the standard “End of Report” line print as the last line of the report within all custom lists. Refer to documentation for the function Z_HEADER_ROUTINE provided within the ABAP Workbench for instructions on how to incorporate the “End of Report” line into an ABAP program. Function Z_HEADER_ROUTINE prepares the necessary header fields for use within the list.

doc Page: 38 of 65 .g. Suppressed UPC's (7 digits) shall always be displayed in their full 11-digit format. Leading zeroes in the units position suppressed. Examples: 12/11. Leading zeroes truncated up to the single dollar digit.00): Format 99/99. Any other vital statistics relevant to the program’s execution.50 0. No dashes. Examples: 14. Return code for the program (if applicable).00 5/ 0.80 UPC Always 11 digits. This information should include: • • • • Record or table entry counts for all of the primary input and output files and tables. Examples: 01234567890 31234567890 04100000105 Audit Reports You are required to produce an audit report for each ABAP non-interactive program that does not generate a user report.Retail price Two decimal places. The audit report shall contain any vital information to indicate what transpired during a given execution of the program.00 shall contain a zero as the single dollar digit.95 2. 3 units for $1. Texts indicating exception records or table entries and why they were handled differently or bypassed altogether. Less than $1.95 3/ 1.99. The format of the audit report shall be ergonomically consistent with other similar SAP lists. *** Place screen print of sample audit report here *** Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.75 Retail price w/multiple units (e. Dollar amount shall follow the same standards as stated above.

Once development is completed. This section defines the development standards for the following ABAP Data Dictionary Elements: • • • • • • • • • • • Tables Structures Views Field Names Data Elements Domains Table Indexes Lock Objects Search Help Type Groups IDOC Segments Tables Table Elements Maintenance Approval Procedure The following procedure must be followed before a table or elements of a table field (field.) on an existing table. or create or update a table field (fields. This font does not control the font for the printed lists. the table maintenance may now be transported to QA. domain) may be added or updated: • If a developer feels there is a need to create a new table. DATA DICTIONARY ELEMENTS NOTE: AS OF 12/14/1999. the Basis group has assumed the development responsibility of all Data Dictionary Objects. If approved by the DBA Representative. You should not change this printer font within the program’s source code. Basis needs to be involved in the functional design meetings.Fonts All SAP users (developers. data element. etc. end users) should set the “Fonts” user option (color palette in upper right-hand corner of SAP screen) for both the fixed font and the variable font to a fixed font (fixedsys). Failure to set this to a fixed font will cause your screen and report columns to be displayed out of alignment. This font setting controls the font for all screens and displayed lists.doc Page: 39 of 65 . data elements. they must document their request and forward this documentation to the DBA Representative for approval. You should use the default font for the given printer when printing lists. the developer will walk through the applicable test cases with the DBA Representative. if possible. • • Naming convention: Ztmmxxxxxx where: Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. but must be involved prior to functional signoff of any development request that requires DDIC work. domains. configurors.

the Basis Representative will explain to the developers satisfaction why the request was denied. 6).Z Constant required for user developed objects. they must discuss their request with the Basis Representative. Application Module. (See Program Name naming convention for possible values. T = Table. If approved by the Basis Representative. buffering. IDOC segments ***Need input from EDI team Naming convention: Z1Edsnn where: Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. Note: Basis Representative’s email group is S&AS – BASIS. t mm xx’s Type. etc. If denied. • Structures Naming convention: Ztmmxxxxxxxx where: Z Constant required for user developed objects. S = Structure.). Table Technical Settings Maintenance Approval Procedure The following procedure must be followed before the technical settings of a table (logical storage parameters. etc. Application Module. t mm xx’s Type.doc Page: 40 of 65 .) Any alphanumeric characters (max. buffering. explaining what they would like to change and why they feel it should be changed. the Basis Representative will perform the requested maintenance on the table.) may be added or updated: • If a developer feels there is a need to create or update the technical settings of a table (logical storage parameters. (See Program Name naming convention for possible values.) Any alphanumeric characters.

if applicable..doc Page: 41 of 65 . Application Module. (In this way it is much clearer to a person looking at the program because there are no 'hidden' selection conditions. A view is a logical table and is not physically stored..g. D or P = Item.Segment Type.. (See Program Name naming convention for possible values.... S or T = Summary.......ZUTILITY The West Group Utility Structure ZUTILITY is a custom structure which stores custom table fields and data elements created for the purpose of providing field help (F1) and field values for a “possible values” boxes for Selection Screen fields that do not associate with any existing Data Dictionary data elements. codes) and the associated text is required. V = View.. K = Header. You can reduce the number of reads in a program by defining a view that contains related data from several tables. nn.Sequential number. a “possible values” box available which are defined at the data element level. Views Do not put selection conditions directly in the database view... The view will contain both the key and text fields. Usually both the key values (e. Naming convention: Ztmmxxxxxxxx where: Z Constant required for user developed objects.......... Each Selection Screen field is required to have field help and. The naming standard for Help views is : Format : Where : ZVTTTTTHFNN ZV Constant required for user developed objects TTTT Table name the view is help for HF Fixed Value NN Sequential number Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316... Selection conditions should be in the where clause in the source code that selects from the view... Exception 1: Help Views are needed when F4 Possible Entries requires more than just the key values stored in a table.s. Verify that the view is bringing back exactly what you expect it to.. t mm xx’s Type....) Any alphanumeric characters.. a new table field with this new data element must be created within the West Group Utility Structure for use by this screen field. West Group Utility Structure ... A view allows an alternative way to retrieve data from a table or groups of tables. If no current data element exists which can be associated with the screen field...

doc Page: 42 of 65 ..Constant required for user developed objects.... Note: Table THLPF is where the association is made between the documentation and the field/screen....Data element type.. Where possible..... This documentation is what will be displayed when a user requests help (F1) for any Selection Screen field that is associated with this data element. use VBELN) Data elements XXX Documentation Documentation is required for every custom data element. use the SAP field names (ex. CHR = Character.. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.......4-digit field number per standard ANSI X12 (include leading zeroes).. name fields so the names are understandable..... Naming convention: Standard Each data element name shall contain a standard prefix of z.. DAT = Date....... Domains Naming convention: Zxxxlll_nnn where: Z. Do not change sales document number to DOCNUM..... except where using SAP pre-defined fields.. xxx. IDOC Need input from EDI team ZEnnnnA where: nnnn.Database Projection Help Field names XXX Naming convention: Each field name appended to a standard SAP table shall contain a standard prefix of zz. Each field included in a custom table should contain no prefix..

• • • Lock objects Lock objects control simultaneous access to a particular table by two update users by means of “locks” which are set and released by calling a function module. nnn.Fixed value nn..... These function modules are known as ENQUEUE and DEQUEUE..... The function module is automatically generated when the lock object is activated...doc Page: 43 of 65 .. lll...Length.... Note: Basis Representative’s email group is S&AS – BASIS....... and the components of the new or updated index....... including how they are planning to access the table.Constant required for user developed objects..... and walk through this documentation with the Basis Representative. document each of the test cases.Application type ttttt..... Once the Basis Representative OK's the test case documentation the index maintenance can then be transported to QA. Table Indexes Table Index Maintenance Approval Procedure The following procedure must be followed before a table index may be added or updated: • If a developer feels there is a need to create or update a table index.......DEC = Decimal............Sequential number... the Basis Representative will notify the developer that testing on this index may proceed............Table name LK.. The Basis Representative will check the request and determine if testing of this index maintenance should proceed in the Development environment... aa.... INT = Integer.. If approved........ and forward this request to their Basis Representative for approval.... Lock Objects : Naming convention: EZ aa ttttt LKnn Where: EZ..... why they feel none of the existing table indexes will work for this access.... The developer will perform thorough tests for this particular access both before and after the index is created or updated.....Sequential number Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. they must document this request.

Search Help
Search help provides additional functionality to input help. The search help objects are part of the ABAP Dictionary.

Search Help Objects :
Naming convention:
Z_SH_nnnnnn Where: Z_SH_.........Constant required for user developed objects. nnnnnn.......Search help name (max. 25).

Type groups
XXX

FUNCTION GROUP ELEMENTS
Frequently used routines can be created as function modules. These are accessed by ABAP programs through the “CALL FUNCTION” statement and may be shared across programs. Function modules are contained within function groups. Technically speaking, a function group is a program with one Include file for each function. When a function is called at runtime, its' function group is loaded into main memory and the called function is executed. Following execution, the function group remains in memory and is available to the main program of the current process. All functions in a function group share the same forms. All functions in a function group share the same global data. This section defines the development standards for the following ABAP Function Group Elements: • • • Function Groups Function Modules Documentation

Function groups
Naming convention: zmmxxxxxx where:
Z..................Constant required for user developed objects.

mm...............Application Module. (See Program Name naming convention for possible values.) xxxxxx.....Any alphanumeric characters.

Last changed on: 2/3/2006 11:58:00 AM

Last changed by: u0092453

File name: /opt/scribd/conversion/tmp/scratch6126/59492316.doc

Page: 44 of 65

Function modules
Unless indicated otherwise, the program elements permissible in the function module environment shall conform to the same standards for program elements defined within this document. Naming convention: Standard Each function module name shall contain a standard prefix of Z_MMSS_XXXX… Where: Z Mm Ss xxx… Constant required for user developed objects Application Module (see program name naming convention for possible values) Application SubModule (see program name naming convention for possible values) Descriptive Text

IDOC Need input from EDI Z_xmmyyy…pppp where:
Z Constant required for user developed objects.

x

Input/Output indicator. Z = User-defined. I = Input O = Output Application Module (See Program Name naming convention for possible values.) Logical Message Type or Descriptive text (for example: ORDER, INVOICE, etc.). 1-22 characters. Process indicator. MAKE = Create EDIT = Change VIEW = Display PROC = Process

mm yyy…

pppp

Documentation
Not yet defined.

MISCELLANEOUS DEVELOPMENT ELEMENTS
This section defines the development standards for the following miscellaneous ABAP development elements: • Transactions
Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.doc Page: 45 of 65

Last changed on: 2/3/2006 11:58:00 AM

• • • • • • • • • • •

Logical Databases SET/GET Parameters (Parameter ID’s) Area Menus Message Classes Jobs PBO Modules PAI Modules Dialog Modules Screens Module Pools Include Programs

Transactions
SAP Transaction Codes are defined in Table TSTC, user defined Transaction Codes are defined in accordance with the following conventions. Naming convention: tmmxxxx where: t Type. Y = Transactions with security requirements applied at the transaction and/or field level. Z = Transactions without security requirements. Application Module. (See Program Name naming convention for possible values.) Any alphanumeric characters.

mm xxxx

Logical databases Logical Database
Naming convention: zmmxxxx where:
Z Constant required for user developed objects.

mm xxxx

Application Module. (See Program Name naming convention for possible values.) Any alphanumeric characters.

Last changed on: 2/3/2006 11:58:00 AM

Last changed by: u0092453

File name: /opt/scribd/conversion/tmp/scratch6126/59492316.doc

Page: 46 of 65

) Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. Line 24 will be used for PFKEYS display and line 23 for issuing dialog messages...e. Example: ZCO (parameter ID for company code) Area menus XXX PF keys • • • The lines 23 and 24 should be reserved for the SAP system when coding interactive reports. mm Application Module.SET/GET parameters (parameter ID’s) Naming convention: Zxx where: xx Unique identifier.' will be used at the end of the PFKEYS text line. This text will be made available when the PFl key is pressed. All PFKEYS will be documented in the PFKEY window. select First Page Last Page PF3 PF22 Back Previous Page PFKEYS assigned to an ABAP report shall be done so with a PFKEYS status. The standard SAP PFKEYS assignment shall be used when programming interactive reports. PF: n=description) The most commonly used PFKEY selection shall be displayed as part of the screen Text. the standard SAP text of '. create a new message following these naming conventions: Naming convention: zmmss_nnnnnnnnnnnnnn where: Z Constant required for user developed objects. The SAP standard PFKEYS are listed below: PFl PF4 PF23 • Help Return Next Page PF2 PF21 PF24 Pickup.. (i. should conform where possible to the SAP standards.. Text used in conjunction with the PFKEY definition. To indicate the availability of more PFKEYS. The SAP system has default settings for these particular PFKEYS. • • • • Message Classes Check existing Message Classes before creating new messages to determine if a suitable message already exists. The command statement SET PF-STATUS 'wxyz' shall be used in the program to reference the correct PFKEY assignments. If no suitable message exists. when defining the PF-status. (See Program Name naming convention for possible values.doc Page: 47 of 65 Last changed on: 2/3/2006 11:58:00 AM .

Dialog modules Not yet defined. Event ID description. Jobs Job names Naming convention: Z_MM_SS_XXXXXXXXXXXXXXXXXXXXXXXX where: Z MM SS XXXX Constant for user defined job names. Y = Data conversions which are one-time loads. Application Module.) Sub-Module.) Other. (See Program Name naming convention for possible values. (See Program Name naming convention for possible values. (See Program Name naming convention for possible values. xxxx Example: Z_START_DISPATCHER PBO modules Not yet defined. Example: Z_SD_PO_PRICING_1 Event ID’s Naming convention: t_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx where: t Type. Z = Applications and permanent interfaces. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. PAI modules Not yet defined. and example programs used for demonstration.doc Page: 48 of 65 .) Job name identifier/description.ss nnnnnnnn Sub Module.

etc. PAI modules INCLUDE Z 0 0 1 I I 0 1 INCLUDE Z 0 0 1 I I 0 2 etc. SCREEN PAINTER The Screen Painter standards apply to those custom developments involving the creation of tables and transactions..Screens Not yet defined.. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. (See Program Name naming convention for possible values. Module pools Naming convention: ZTTMZNNN where: Z TT M Z NNN Constant for locally developed Module Pool..doc Page: 49 of 65 . Application Module. Please name your INCLUDE programs according to the following examples. etc.) Constant indicating a Module Pool. and Global Data PBO modules INCLUDE Z 0 0 1 I O 0 1 O = Process Before Output module INCLUDE Z 0 0 1 I O 0 2 etc. Data module INCLUDE Z 0 0 1 A T O P Data Definitions. An ‘I’ in the 5th position indicates that this is an INCLUDE program. I = Process After Input modules Perform modules INCLUDE Z 0 0 1 I F 0 1 F = Forms INCLUDE Z 0 0 1 I F 0 2 etc. Constant indicating a custom object. Sequential Number Include programs A Module Pool consists entirely of INCLUDE programs. NOTE: The first 4 characters of the INCLUDE program name correspond to the last four characters of the Module Pool name. Table Definitions. the last 2 characters are incrementing sequential numbers. etc.

The processing logic command ON CHAIN INPUT and ON CHAIN REQUEST shall be used to reduce redundant processing. INPUT. This will make the transaction easier to read. The ENQUEUE / DEQUEUE statements shall be used to individually lock data records. shall be written for any database or ATAB table updates. • When dialog messages are issued on a Screen Painter Dynpro that relate to an individual field.• • • • • Dynpro names will always be defined to the data dictionary. It is recommended to not update any SAP database tables with a written program. Example: SET CURSOR FIELD 'LFAl-LIFNR'. MODULE CHECK_VENDOR_9000 ON CHAIN REQUEST. When developing Dynpros the PFKEYS and space bar should be used to make alterations to Dynpro lines. Within this update program. • • • Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. when executed.doc Page: 50 of 65 . The SET SCREEN statement shall be coded for each possible logical path that can be taken in a Dynpros PAI processing logic. there will be a FORM subroutine that. This check will ensure data integrity is maintained. of type 'V'. MODULE PROCESS_PFKEYS_9000 • • The CHAIN command shall be used to group logical fields together before calling a module. Use the SAP transactions to process transactions. An update program. a database update shall be any modification. This will eliminate modules being incorrectly processed. will perform the desired database update. FIELD LFAI-LIFNR. Example: MODULE SET_SCRN_ATTR OUTPUT. Example: CHAIN. (Standard) (Non Standard) • • • The EXIT FROM STEP LOOP statement shall be used where premature termination of Dynpro loop processing is required. Dynpro sequencing shall be controlled dynamically from within the module pool. The commands 'INPUT and 'OUTPUT' will be defined with all respective PAI and PBO modules. ENDCHAIN. SET CURSOR 6 10. the cursor shall by dynamically positioned on the field. This will aid the end user in error corrections. For the purposes of this standard. Transactions that change the SAP databases shall check whether the desired record is free to be changed. A Dynpro can become corrupted if the normal keyboard delete and insert keys are used. as the SAP system assumes each module is a PAI unless specified otherwise. The naming standards regarding Dynpros and module pool shall be found in the document titled 'Naming Standards for SAP'. deletion or insertion of a database record or external table.

xx Name of super business object (If no supertype exists then use the business name of the object) ZCustomer for the sub type of Customer Example: ZsalesOrder for the sub type of SalesOrder Name and Description Xxxxx sub type where: Xx sub type Name of super type business object (If no supertype exists then use the business name of the object) Constant required for sub types of standard business objects Example: “Sales Order sub type” for the sub type of “Sales Order” Program Name ZBO_xxxxx where: ZBO_ Constant required for custom business object programs. (See Program Name naming convention for possible values. xx Name of the business object type.doc Page: 51 of 65 Last changed on: 2/3/2006 11:58:00 AM . mm xx Application Module. Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.BUSINESS OJBECTS Objects created in the business object builder Naming convention: Object Type Zmmxxxx – max 10 characters where: Z Constant required for user-developed objects.) Number or Name of the business object super type (If no supertype exists then use the name of the main table for the object) ZSDKNA1 for the sub type of KNA1 Example: ZSD2032 for the sub type of BUS2032 Object Name Zxxxxx where: Z Constant required for user-developed objects.

Call Transaction Call Transaction provides superior performance over a BDC Session.doc Page: 52 of 65 . DetermineMaterial. BDC SESSIONS / CALL TRANSACTIONS BDC Sessions Batch Data Communication (BDC) sessions are used to execute batch input of SAP transactions. ChangedCredit. (See Program Name naming convention for possible values. For example: Created. They should be named the same as the field label for the referenced data element. Events Events created under a customer business object do not need to begin with Z. ListErrors. Error logging is not as robust in Call Transaction. It will cover the following types of security: Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.Example: ZBO_ZSD2032 for the object type ZSD2032 Methods Methods created under a customer business object do not need to begin with Z. Application Module. but instead should begin with the present tense of a verb and then additional information. etc.) dddddddd Date created (YYYYMMDD). Edit. and for this reason you must create a BDC Session if the Call Transaction fails. 9 Numeric for unique identifier (lowest sequential # available). but instead should begin with the past tense of a verb and then additional information. Capitalize the beginning of each word and do not use spaces or underbars. SECURITY This section defines the development standards for applying security to various ABAP development elements. For example: Create. Capitalize the beginning of each word and do not use spaces or underbars. Naming convention: zttdddddddd9 where: z tt Constant for locally developed BDC Session. Attributes Attributes created under a customer business object do not need to begin with Z. DeletedBlock. DeterminedMaterial. Capitalize the beginning of each word and do not use spaces or underbars. etc.

2 = display. if sy-subrc ne 0. West Group Authorization objects: Work with Basis Representative to create authorization objects. 3 = display) Securing a transaction To secure a transaction you must fill in the field “Authorization object” with the value S_TCODE. Activities: TACTT contains available activities.. Enter tcode screen shot EXTERNAL FILES This section defines the development standards for the following external file elements used within ABAP: • • • Directories Filenames FTP Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. message e208 with 'You are not authorized to maintain this table'. The transaction code must also be entered as the value for the object S_TCODE.• • Securing a program Securing a transaction Securing a program 1) This is how to secure a program that maintains a table: authority-check object 'Z:ZXXMAINT' id 'ACTVT' field '01' id 'TABLE' field 'ZSCXR'.doc Page: 53 of 65 . Most programs use the first three (1 = create. if sy-subrc ne 0. message i000(38) with 'No authority to change' ' the printer status'. endif. 2) This how to secure all other sensitive programs authority-check object 'Z:WEST_RPT' id 'ACTVT' field '02' id 'PROGRAM' field 'ZBASPRN1'.

... UNIX will internally manage the separation of Development.Application Module.... BU = Back up (when appropriate)..... Production). (See Program Name naming convention for possible values..... Application Filenames Not yet defined.. regardless of the SAP platform where the job is running (Development. (See Program Name naming convention for possible values.... Quality Assurance. Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. Filenames Filenames must always be UPPERCASE.File extension.. TXT = Flat file........ (See Program Name naming convention for possible values. Name of the program that this file is related to (< 41 characters)... If you access a UNIX file within an SAP job that is run on the Development platform......doc Page: 54 of 65 . and Production data into unique subdirectories (i........) bb.zzz where: mm.........Duplicate (file dependant).. for temporary input and output files not previously defined The same directory paths above will be used.e.. This naming convention applies to all inbound files...... Directory paths should always be lowercase. It applies to only the outbound files in which there is no restriction for naming the file by the target application that will use the file as input.. for output files to be eventually transferred out of UNIX....... Quality Assurance.) xx.Intended Frequency..... UNIX will read from or write to an internal Development subdirectory).Directories All files will reside in one of the following directories... Naming convention: mmbbufxxdd... for input files currently on UNIX & output files that will stay on UNIX.Use......zzz.... FTP Filenames Not yet defined.Application Submodule.........) f...... dd.. . The following directory structures will be used: /sap/development/conversion /sap/development/interfacein /sap/development/interfaceout /sap/development/temp for input files transferred to UNIX for conversion purposes..Program name........) u. (See Program Name naming convention for possible values.

Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.IDOCS IDOC Type Should be as close to the Basic IDOC Type as possible. Extension Type Not yet defined. Non-EDI Not yet defined. Basic IDOC Type Not yet defined.doc Page: 55 of 65 . In most cases it will be identical.

POPUP_TO_CONFIRM_WITH_MESSAGE .Create a dialog box in which you inform the user about a specific decision point via a diagnosis text. READ_TEXT . FILENAME_GET . Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316.return a list of filenames from a local or network drive. POPUP_TO_DECIDE .doc Page: 56 of 65 . POPUP_TO_CONFIRM_LOSS_OF_DATA .popup to get a filename from a user.To load long text into SAP.Create a dialog box in which you display a two-line message.To load long text into SAP.Create a dialog box in which you make a question whether the user wishes to perform the step. POPUP_TO_DECIDE_WITH_MESSAGE . BP_JOBLOG_READ . READ_TEXT_INLINE – Read SAPScript.Fetch values from a set. EDIT_TEXT_INLINE – Edit SAPScript. RS_REFRESH_FROM_SELECTOPTIONS .Fetch job log executions.download a file to the presentation server (PC).convert an ABAP report (displayed on screen) from OTF to ASCII format.Send message from ABAP/4 program to SAPoffice.Provide user with several choices as radio buttons. CLOSE_FORM . LIST_TO_ASCII . RZL_SLEEP . POPUP_TO_CONFIRM_STEP . MONTH_NAMES_GET . returns blank filename if user selects cancel.Closes layout set. RZL_READ_DIR_LOCAL . HOLIDAY_GET . SCROLLING_IN_TABLE -If you are coding a module pool and using a table-control.year/month/day. EPS_GET_DIRECTORY_LISTING .Trigger an event from ABAP/4 program.Hang the current application from 1 to 5 seconds. G_SET_GET_ALL_VALUES .To load long text into SAP RH_START_EXCEL_WITH_DATA -starts Excel with the contents of an internal table. INIT_TEXT .Create a dialog box in which you make a question whether the user wishes to perform a processing step with loss of data. RZL_SUBMIT . DOWNLOAD .Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object. POPUP_WITH_TABLE_DISPLAY .Provide a display of a table for user to select one. MS_EXCEL_OLE_STANDARD_OLE .It returns all the month and names in repective language.Get the current contents of selection screen.will build a file.To load long text into SAP.FTP XXX APPENDIX Useful Function Modules BP_EVENT_RAISE . RP_CALC_DATE_IN_INTERVAL . SAVE_TEXT . POPUP_TO_CONFIRM_WITH_VALUE . COMMIT_TEXT .Create a dialog box in which you inform the user about a specific decision point during an action.Provides a table of all the holidays based upon a Factory Calendar &/ Holiday Calendar. and automatically start Excel.Opens layout set from an ABAP program.Submit a remote report. with the value of the table line returned when selected.Read a directory on the Application Server. RS_SEND_MAIL_FOR_SPOOLLIST . POPUP_TO_DISPLAY_TEXT . OPEN_FORM .Calculate date +/. you can use this function SCROLLING_IN_TABLE to handle any scrolling.

WS_EXECUTE ..Load Files from the Presentation Server to Internal ABAP Tables. WS_VOLUME_GET . WRITE_FORM . WS_EXCEL .execute a program on a windows PC.SD_DATETIME_DIFFERENCE . Table Compares. WS_FILENAME_GET .convert weights from one UOM to another.Get the label from a frontend device. (Daily) Reorg batch input jobs.upload a file to the presentation server (PC). Remove batch job logs. WS_DOWNLOAD . SO_SPOOL_READ . SO_SPOOL_READ .After running a report. Reorg job statistics (Monthly) Reorg ABAP dumps.Display a popup system message on a specific users screen.Browse printer spool numbers according to user informed. Regenerate all ABAP programs. Logical databases by application area. WS_MSG . List /sapmnt/<SID>/profile directory and allow editing of the profiles. to list all parameters Program _RCCLB101 _RCCLB102 _RCCTB101 _RCOPCA04 Last changed on: 2/3/2006 11:58:00 AM Class KLAS KLAS ATTR Last changed by: u0092453 Short description Batch Input: Create classes Batch Input: Create classification data Batch Input: Create characteristics CO-PCA: Generating standard reports in batch File name: /opt/scribd/conversion/tmp/scratch6126/59492316. Reset all timestamps. Change document log listing all documentation changes. call this function to convert the list output to HTML. UNIX) commands that use STDOUT. Regenerate ABAP loads. (Daily) Programs are contained in /sapmnt/<SID>/exe Program Function Timing sapevt Kick off an event within SAP On demand rscoll00 SAP_COLLECTOR_FOR_PERFMONITOR Hourly rsbpcoll SAP_COLLECTOR_FOR_JOBSTATISTIC Daily rsm13002 SAP_REORG_UPDATERECORDS Daily sappfpar Display profile params and check consistency of shared memory pool configurations as<SID>adm. (Daily) Reorg the spool. Table documents.Call File Selector.Save Internal Table as File on the Presentation Server. List catalog of logical databases. UNIT_CONVERSION_SIMPLE .Fetch printer spool according to the spool number informed. Show logical databases.Delete File at the Frontend..g.Create a dialog box in which you display an one-line message. SO_WIND_SPOOL_LIST .doc Page: 57 of 65 .Start EXCEL on the PC. Show logical databases.. Menu Fixes. Useful ABAP Programs RSPARAM RSPROFIL RSGENLDS SAPMSOS0 RSDBST00 RSDBCATL RSREGEN TOUCHALL SAPRSEUG RSSCD100 RSSDOCTB RSTBPROT RSUBS042 RSBTCDEL RSAVGL00 RSAQLGDB RSDBTREE RSBPSTDE RSSNAPDL RSDBCREO RSPO0041 List default and active parameters in R/3. WWW_LIST_TO_HTML . UPLOAD . WS_UPLOAD .Give the difference in Days and Time for 2 dates.. TH_POPUP . sappfpar check pf=/sapmnt/<SID>/profile/DVEBMGS00 sappfpar all pf=. Regenerate all screen painter entries. Execute system level (e.Writes data to layout set by specifying a certain window. Table Protocol (SCU0). WS_FILE_DELETE .SAPoffice: Read a Spool Entry.

b Batch input for transferring stock data Batch input for transferring storage bins Batch input test data for transferring storage bin Batch input for purchase requistions from another Create sequential dataset for batch input: Purchasing Batch input for purchasing info record Framework for batch input generation: Purchasing I Listing of sequential dataset for batch input: Inf Create sequential dataset for batch input: Info re Generate source list (Batch) Batch input: Create physical inventory docs.Example for batch update Create batch input session for infotype P0001 PM: IBIP . entry of stck._RCOPCA05 _RCPBI005 _RCPBI010 _RCPTRA00 _RCSBI010 _RDDUMF01 _RFBIBL00 _RFBIBL01 _RFBIBLG0 _RFBIDE00 _RFBIDEG0 _RFBIKR00 _RFBIKRG0 _RFBIPPG0 _RFBISA00 _RFBISAI0 _RFBITBTC _RFBITF02 _RFEBBU01 _RFSTAX00 _RGCBDC10 _RGCREC10 _RGUDOCTY _RGUREC00 _RHINTE30 _RIIBIP00 _RISTRA20 _RKABG000 _RKBIKA00 _RKCBINPT _RKDBCOMM _RKEIBDC1 _RKGAL000 _RKGALCO1 _RKIBI001 _RKIBI002 _RKIBI003 _RKKBBG00 _RKKBBR00 _RKKBBR01 _RKKKS000 _RKKP2B02 _RKKPZB02 _RKPBBG00 _RKSBBG00 _RKSBBGO0 _RKSJEX00 _RKSJIM00 _RKZUTG00 _RLBEST00 _RLBEST10 _RLBEST20 _RLMG0000 _RLMG0010 _RLMG0050 _RLMG0051 _RLMG0060 _RLPLAT00 _RLPLAT10 _RM06BBI0 _RM06BBIE _RM06IBI0 _RM06IBI1 _RM06IBIA _RM06IBIE _RM06W005 _RM07IBDC _RM07ICN1 _RM07IE31 Last changed on: 2/3/2006 11:58:00 AM TEST REOR STUE FBIP FBIP FBIP FBIP FBIP FBIP FBIP FBIP FBIP FBTC KORR RFKB RFKD GBAS PP0D IBIP IPMO RKAG RKCU RKCE KGAL KGAL RKEV RKEV RKEV KKB1 KKB1 KKB1 RKKS KKP KKP PRCO RKRK RKRK RKRK RKRK RKZT LTEC LTEC LTEC LTEC LTEC LTEC LTEC LTEC LTEC LTEC MEIN MEIN MBBC MBBC MBBC Last changed by: u0092453 CO-PCA: Generating standard reports in batch Generate file for testing batch input of routings Create routing via batch input Test report for creating input file for batch input Create BOMs via batch input Control program for BATCH-SE02 Batch input documents Batch input documents FBIP Generating report: Batch input for documents Batch input interface for customers Generating report: Batch input for customer master Batch input interface for vendors Generating report: Batch input for vendor master d Generating report: Batch input for preliminary pos Batch input interface for G/L account master data Subroutine pool for initializations of batch input s Batch input routines for RFBITBXX Batch input for RFBITB01 Test report: Submit batch job to post buffer data Creating tax codes using batch input Batch input Batch update RGUREC00 . for c Batch input: Create phys. inv.Batch input utility Maintenance plan date monitoring (batch input IPI0) CO-CCA: Batch input processing for calc. invetory docs for sales File name: /opt/scribd/conversion/tmp/scratch6126/59492316. docs.doc Page: 58 of 65 .Example for batch update RGUREC00 . of imputed cost Create batch input session to create cost elements Batch-input data transfer from file Common_part RKDBATCH_RKXBATCH Create line items: Create batch-input session from Allocations: Report for batch start (General) Allocations: Report for batch start (CO-CCA) Batch input for cost/revenue transfers Batch input for cost allocation Batch input for statistical ratio input Standard reports: Generate in batch Costing: Batch request report for reporting Generator for batch report Batch processing: Variances/WIP orders Batch processing: Calculating variances on cost ob Batch processing: Overheads on cost objects Standard reports: Generate in batch Standard reports: Generate in batch Standard reports: Generate in batch CO reports: Export reports (In batch) CO reports: Export reports (In batch) Batch generation archiving reports Batch input for transferring stock data Test data for batch input for data transfer with m Test data for batch input for data transfer using Batch input for taking over storage bin data Batch input for transferring stock data Batch input for transferring stock data Test data for batch input for init. for cycle cou Batch input: Create phys.

post di Batch input: Create phys. for consignme Display batch where-used list Build up batch where-used list Batch input: Post material document Batch input: Create reservation Batch input: Inventory sampling Read number of next delivery that will be batch-up Include for general data structures for batch inpu Independent requirements batch input Create batch input session: Create/Change material Generation program: Batch input for Create/Change Initialize batch input structures Initialize batch input structure with predefined c Create a seq.doc Page: 59 of 65 . for vend Batch input: Create phys. inv.Store batch input Batch input to evaluate personnel reviews Data definitions for batch input to compensation s Main program for batch input to compensation syste Forms for batch input to compensation system Batch input P0008 Batch input for creating new tax records at beginn Batch input for KUG/SWG Creating wage tax papers at end of year with batch Batch input for changing maximum HI gross amount Batch input: Annual leave New valuation of absence records using batch input Batch input to incentive wages List of all batches for a material END OF DOCUMENT Last changed on: 2/3/2006 11:58:00 AM Last changed by: u0092453 File name: /opt/scribd/conversion/tmp/scratch6126/59492316. docs. file for the batch input independen Batch main program for MPS Create batch input for price change to future pric BATCH structure for MRP run Batch input routines for lowest value determination Maintenance plan date monitoring (Batch input IP10) Batch processor statements INCLUDE for RPCIPO00/RPCIPI00 . ref. inv. inventory docs. to doc. inv. inventory docs. for mat Batch input: Create phys. docs._RM07II31 _RM07II32 _RM07II34 _RM07II37 _RM07II38 _RM07II39 _RM07II40 _RM07IK31 _RM07IO31 _RM07IV31 _RM07IVW1 _RM07IW31 _RM07MCHV _RM07MCHW _RM07MMBL _RM07RRES _RM07SVOR _RMCVNENL _RMM60TOP _RMMM60BI _RMMMBIM0 _RMMMBIMG _RMMMBIMI _RMMMBIMJ _RMMMBPBI _RMMPS000 _RMMR2100 _RMMRP000 _RMNIWEBI _RMSTRA20 _RPBEBA00 _RPCIPO15 _RPIBRT00 _RPICMP01 _RPICMP02 _RPICMP03 _RPICMP05 _RPIJSTD0 _RPIKUGD0 _RPILSKA0 _RPISVRD0 _RPTLEA30 _RPTUPD00 _RPWI0000 _RQEAAS10 MBBC MBBC MBBC MBBC MBBC MBBC MBBC MBBC MBBC MBBC MBBC MBBC MBMB MBMB MBBC MBBC MBBC MCV MDPB MMBC MMBC MMBC MMBC MDPB MD03 BPLA NIWE IPM0 PB00 PC00 PINP PM0I PM0I PM0I PM0I PCD2 PCD3 PCA0 PBAS PT0I PT00 PW00 QRLP Batch input: Create phys. to doc. inventory docs. for normal st Batch input: Block material for physical inventory Batch input: Enter count results with reference to Batch input: Post differences Batch input: Enter count w. post dif Batch input: Enter count w/o reference to document Batch input: Enter count w/o ref. docs for ret. for vend Batch input: Create phys. packa Batch input: Create phys.

Sign up to vote on this title
UsefulNot useful