25
SAP Development/Support Standards And Guidelines xx Project Name xx

Abap standards

Embed Size (px)

Citation preview

Page 1: Abap standards

SAPDevelopment/Support

StandardsAnd

Guidelines

xx Project Name xx

Page 2: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________

Document InformationRevision: 2002/01/11 2:21 AMFile Name: /tt/file_convert/555be31fd8b42a33078b4ba3/document.doc

_____________________________________________________________________________Page 2 of 20

Page 3: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________

Table of Contents

1 GS1 – SYSTEM ENVIRONMENT............................................................................................................... 4

1.1 SAP GUI................................................................................................................................................... 41.2 SAP SERVERS........................................................................................................................................... 41.3 CLIENT STRATEGY.................................................................................................................................... 51.4 DEVELOPMENT CLASS............................................................................................................................... 5

2 CONVENTIONS FOR DEVELOPMENT AND CHANGES TO SAP PROGRAMS..............................6

2.1 GENERAL GUIDELINES............................................................................................................................... 62.2 CONVENTIONS FOR CHANGES TO SAP PROGRAMS USING SAP USER EXITS.................................................62.3 CONVENTIONS FOR CHANGES TO SAP PROGRAMS USING SAP MODIFICATION ASSISTANT...........................62.4 CONVENTIONS FOR CHANGES TO SAP PROGRAMS USING BUSINESS ADD-INS...............................................72.5 CONVENTIONS FOR CHANGES TO SAP OSS NOTES.....................................................................................72.6 DOCUMENTING CODE CHANGES................................................................................................................ 8

3 PROGRAM SPECIFICATION................................................................................................................ 10

4 NAMING CONVENTIONS...................................................................................................................... 11

4.1 DESIGN SPECIFICATIONS.......................................................................................................................... 114.2 PROGRAM NAMES................................................................................................................................... 11

4.2.1 Abap Program Names:.................................................................................................................. 124.2.2 ABAP Function Names.................................................................................................................. 124.2.3 Table Names................................................................................................................................. 124.2.4 Transaction Codes......................................................................................................................... 134.2.5 General Naming conventions for other SAP objects.......................................................................13

5 IMG CONFIGURATION DOCUMENTATION.....................................................................................17

5.1 TRANSPORT REQUESTS............................................................................................................................ 175.2 MENU PATH............................................................................................................................................ 175.3 USE OF IMG TO DOCUMENT CONFIGURATION..........................................................................................17

6 DEVELOPMENT KEY / SAP OBJECT REGISTRATION...................................................................18

7 MANAGING DEVELOPMENT CHANGES...........................................................................................19

7.1 STEPS TO MANAGE DEVELOPMENT CHANGES...........................................................................................197.2 NOTES.................................................................................................................................................... 19

8 OTHER TOPICS...................................................................................................................................... 21

_____________________________________________________________________________Page 3 of 20

Page 4: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________

1 GS1 – System Environment

1.1 SAP Gui

SAP 4.6B Gui must be installed first before you can use version 4.6B.

1.2 SAP Servers

The logical names for SAP 4.6 systems are:

For GS1 production supportDevelopment - GSD (gs1gsd), G2D Sandbox - GSS (fibssb)QA - GSQ (gs1qas)Prod - GSP ( Application server: gs1hap1p,

gs1hap2p,gs1hap3p

Database server: gs1hdb1p)

Data Directories for conversion and interface:

PM conversion and interface - /ftpdata/pmftp/FPR/10MM conversion and interface - /ftpdata/mmftp/FPR/10PS conversion and interface - /ftpdata/psftp/FPR/10FI/CO conversion and interface - /ftpdata/fiftp/FPR/10HR conversion and interface - /ftpdata/hrftp/FPR/10FA conversion and interface - /ftpdata/faftp/FPR/10AP conversion and interface - /ftpdata/apftp/FPR/10AR conversion and interface - /ftpdata/arftp/FPR/10EH conversion and interface - /ftpdata/ehftp/FPR/10

For GS1 projectsDevelopmnet - G2DQA - G2QSandbox - G2S

Data Directories for conversion and interface:(to be developed)

_____________________________________________________________________________Page 4 of 20

Page 5: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________1.3 Client Strategy

Standard is client: 010.For setting other client, please follow the specification in \\CLIENTTCHDAT01\DFS\CLIENT\System Optimization Project\SOP Team Documents\Standards\04_Client_Strategy_V1.doc

1.4 Development Class

GS1 Standard development classes:

ZXX_IMGZXX_REPORTZXX_INTERFACEZXX_CONVERSIONZXX_SAPMODZXX_DIALOGZXX_SAPSCRIPT

Where XX indicates Module name

New development class will be created for new projects :

ZXX_??????????????????…………

Where XX represents module id; i.e. HR, PM, MM, etc ???? indicates free format up to 26 characters

_____________________________________________________________________________Page 5 of 20

Page 6: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________

2 Conventions for Development and changes to SAP programs

2.1 General Guidelines

For the SAP upgrade or implementation it is the intention to implement a “vanilla” version of the SAP system, i.e., changes to the supplied software are to be kept to a minimum and approval for any changes should be justified by developing a business case scenario.

For the development of new programs or modified versions of SAP programs all changes must be assigned to a development class and hence to a correction for the correction and transport mechanism. This rule may be ignored for test programs which are never going to be moved between SAP systems.

2.2 Conventions for changes to SAP programs using SAP User Exits To change a SAP program or module , you are advised to use sap provided USER EXITS, if a user exit does not exist, you can request SAP to develop an user exit for you via OSS .

Types of user exits:.Menu exitScreen exitFunction Module exitKeyword exit

There are two ways to search an application user exit:

Workbench Menu ->Utilities -> Enhancements -> Project Management Utilities -> SAP Enhancements (SMOD)

Workbench Menu ->Overview -> Appli Hierarchy -> SAP

Note: An add-on project must be created in order to take advantage of the user exits as follows:

Workbench Menu ->Utilities -> Enhancements -> Project Management (CMOD)

2.3 Conventions for changes to SAP programs using SAP Modification Assistant

_____________________________________________________________________________Page 6 of 20

Page 7: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________Starting release 4.5, SAP provides a facility called ‘Modification Assistant’ to make it easier to modify the R/3 system. It automatically registers the changes via an automatic assigned transport number via ABAP editor. The Modification mode can be turned on and off in the ABAP editor.The SAP objects still need to be registered via OSS.

Hints:

SE95, the Modification browser provides a system-wide overview for all the changes that you have made.

Investigate the program using the Modification mode off, and turn it on when you are ready to make the changes, The SAP keeps a repository for all the changes by the Modification Assistant. Modifications using this method can be generally be re-imported during a release upgrade without manual intervention.

If the SAP module or report program requires mass changes, the Modification Assistant may not be a good approach. In this case the SAP program is not modified directly but a copy is made renaming the program by inserting the lead character with “Z”. Any modified include modules or Sapscripts are similarly copied.

Note: Previous registered SAP objects need to be registered again in 4.6.

2.4 Conventions for changes to SAP programs using Business Add-ins

Starting release 4.6, SAP provides a facility called ‘Business Add-ins’ to allow you to insert your own code. This does not constitute a modification to the original object. SAP guarantees the upwards-compatibility of Business Add-ins.The Business Add-ins Interfaces are based on ABAP objects.

2.5 Conventions for changes to SAP OSS Notes

Sometimes, OSS notes require changes to SAP modules or objects. The object being changed must be approved by the team leader before a developer begins to perform the changes:

document the business impact of the changes register the object via OSS make the changes to the object as instructed by SAP OSS Notes (select dev. Class

XXXX ..accordingly) compile, and generate the object ensure all objects associated are generated as well follow the standard transport procedure

Documenting Code Header:

_____________________________________________________________________________Page 7 of 20

Page 8: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________************************************************************************* * Module heading * ___________** Date OSS Note no/Transport No Initial* _______ Reason_______ ______________________________________________** 970112 OSS 42212/ GSSK900010 - VC * General Task List assembly************************************************************************

Documenting Code Body:

Above or every line changed due to the respective OSS note enter the OSS no/Transport no.e.g. OSS 42212/GSSK90011

2.6 Documenting Code Changes

For modifications to SAP or in-house developed programs the usual standard is to insert a modification log at the top of the program, e.g.,

************************************************************************* *Program ??????????????* Written by:* Date:* Purpose: * Requested by:* -----------------------------------------------------------------------------------------* Notes:* * -----------------------------------------------------------------------------------------*Modification History * * Initials Date/Transport no Reason* _______ _______ ______________________________________________** VC Jan,00 GSSK91000 Changes required to split revenue into multiple categories, etc. ************************************************************************code are generally enclosed by the lines:

*VC Transport no - Reason of changes...

*END VC Transport no

_____________________________________________________________________________Page 8 of 20

Page 9: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________

3 Program specificationThe GS1 project will use the standard development templates for all development work.They are located in \System Optimization Project\SOP Team Documents\TEMPLATES

Document Type TemplateConversion GS1 Conversion SpecificationDialog Programs GS1 Dialog SpecificationInterface Programs GS1 Interface SpecificationReport GS1 Report SpecificationEnhancements GS1 SAP Modification and EnhancementData Conversion Plan GS1 Conversion Execution Plan

_____________________________________________________________________________Page 9 of 20

Page 10: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________

4 Naming Conventions

4.1 Design SpecificationsDesign Specification NamesDesign document names should be patterned with the following convention:

XX_DDDD_NN

Where XX denotes the SAP Applications AreaBC Basis area, not application specificHR Human ResourcesPM Plant MaintenancePS Project SystemsMM Material managementFI FinanceCO ControllingMM Materials ManagementAP Accounts PayableAR Accounts ReceivableEH Environment & Health Safety

Where DDDD denotes the type of Design specification:CONV Data ConversionREP ReportDIA DialogINT InterfaceMOD ModificationFCT Function ModuleAUTH AuthorizationCLSS Classes (including attributes, methods, etc.)

NN Design specification sequence ID, a 2 position, numeric identifier used to sequence more than one document with like names to this point. There will always be a “01” sequence ID.

Please refer to the design specification template located in:

4.2 Program Names

All customer programs start with Prefix ‘Z’. The program name length is now 30 characters long.

_____________________________________________________________________________Page 10 of 20

Page 11: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________4.2.1 Abap Program Names:

ZZXX_description(25), whereZZ denotes customer programXX denotes the module area (i.e. FI for Finance, etc.)25 chars underscore + descriptive name for module name

XX generally used to denote the module, as follows: F I FinanceCO ControllingPS Project SystemHR Human resources PM Plant Maintenance MM Material Management CA Cross ApplicationAP Accounts PayableAR Accounts ReceivableFA Fixed AssetsEH Environment & Health Safety

4.2.2 ABAP Function Names

Function are used to centralize reusable code. The naming conventions for Functions are very free-form, but should adhere to the basic structure as follows:

ZXX_[Module Name], where Z denotes customer programXX denotes the module area (i.e. FI for Finance, etc.)27 chars underscore + descriptive name for module name

Note: Function class should be chosen appropriately and recorded.

Example: ZBC_Last_Day_of_Acc_Period

4.2.3 Table Names

Table names are restricted to 16 characters and should adhere to the following convention:

ZZXX_description(12), where

ZZ denotes a customer defined tableXX denotes the module area (i.e. FI for Finance)12 chars description of the table

Note: If the table is EDI specific, EDI should be mentioned in the descriptive comments.

_____________________________________________________________________________Page 11 of 20

Page 12: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________4.2.4 Transaction Codes

Transaction codes are used to identify screens within the SAP system. Each screen has an associated transaction code which relates to an ABAP program.. Transaction codes are 20 characters long, and should use the folowing naming convention:

ZXXdescription(17) , where:ZZ denotes a customer defined tableXX denotes the module area (i.e. FI for Finance)17 chars description of the table

4.2.5 General Naming conventions for other SAP objects

This section provides an overview table of customer name ranges. This table shows: the name lengths SAP table where appropriate Proposed naming standard 4.6 Upgrade or comment

All objects should be encoded with the lead character “Z”.

SAP Naming ConventionsObject Length Customer name rangeApplication log - TAPPLObjectSubobject

410

Z* Z*

Authorization/authorization profile 12 No "_" in second positionAuthorization object 10 Z*Authorization object class 4 Z*Authorization object group 30 Z*CATT procedure 30 ZXX_*Change document object 10 ZXX_*Class 30 ZXX_**

(underscore permitted)Code page 4 9000-9999Data element 30 Z*Development class – tdevc 30 ZXX_* for new project,

Continue to use old ones for report, conv and interface

Dialog module 30 Z* RP_9* RH_INFOTYP_P9*Documentation moduleAuthorization object Authorization profileChapter in a structure (CHAP) Description of a CATT procedure

1012202028

Like object nameLike object name

Z*Z*Z*

_____________________________________________________________________________Page 12 of 20

Page 13: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________Object Length Customer name rangeDialog text General text (TX)Implementation Guide chapterMain chapter in a structure (BOOK) Note on chapter in a structure (NOTE)Release Notes Structure

282020262012

Z*Z*Z*Z*Z*Z*

Domain 30 Z*Enhancement 8 ZXX*Enhancement project 8 ZXX*Enterprise Data Model (EDM)Data model Entity

1010

Z*Z*

Function BuilderFunction module - TLIBG, TLIBV, TLIBT, TFDIRFunction group - TFDIRUser exit function module User exit function module (customer-specific)

302644

Z_*ZXX_*

Z**

IDoc developmentSegment type Segment nameBasic IDoc type Enhancement type Logical message

2730303030

Z1*Z2*Z***

Info type number 4 9000 - 9999Interface 30 Z**

(underscore permitted)LIS (Logistics Information System)EventUnit

22

Z*Z*

Lock object 16 EZ*Logical database 20 ZXX_*Maintenance and transport object 31 ZXX*MatchcodeMatchcode IDMatchcode object

14

0 - 9Z*

Menu 20 Z* +*Message - T100AMessage IDMessage number

203

Z*900 - 999

Module pool - TRDIRModule pool for dialogINCLUDES

3030

8/40

SAPDZ*DZ*

SAPMZ*

_____________________________________________________________________________Page 13 of 20

Page 14: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________Object Length Customer name rangeModule pool for screensINCLUDESModule pool for info typesINCLUDESModule pool for subroutinesINCLUDESModule pool for update programINCLUDES

30303030303030

MZ*MP9*MP9*

SAPFZ*FZ*

SAPUZ*UZ*

Number range document object 10 ZXX_*Pool name/cluster name 10 ZXX_*Printer macro - Z* 9*R/3 Analyzer: Identifier 20 ZXX_*Relation ID 2 Z*Report – TRDIR 30 Z*Report category 4 Z*Report variantTransportable, globalTransportable, localNot transportable

14141

X* CUS&*

Z*

Report WriterReport Report group Library Standard layout

8437

1st place not numeric (0-9)1st place not numeric (0-9)1st place not numeric (0-9)1st place not numeric (0-9)

SAPscriptForm Standard text ID Standard text name Style

164

328

ZXX_*ZZ*

ZXX_*Z*

Screen 4????

9000 - 9999If the screen does not belong to a module pool in the customer name

range.Set 12 1st place not numericSPA/GPA parameter 20 ZXX_*SpoolLayout type Font family Device type Page format System barcode

168888

ZXX_*Z*Z*Z*Z*

Standard role 8 9*Standard task 8 9*Structures/structure fields 30 Z*SYSLOG message ID 2 Z*

_____________________________________________________________________________Page 14 of 20

Page 15: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________Object Length Customer name rangeTablePool and cluster tablesTransparent tables Table field

1016/30

16

ZZXX_* T9* P9* PA9* PB9*PS9* PT9* HRT9* HRP9*

HRI9*ZZ_* (if possible in append)

Z*Transaction code 20 ZXX_* +*Transport layer 4 Continue to use Z001Type (ABAP) 5 Z*ViewHelp view

16/3016/30

ZXX_*H_Z*

View cluster 30 ZXX_*View maintenance dataView content Table content

--

reserved in TRESCreserved in TRESC

Workflow object type 10 ZXX_*

* Free formatA Alphanumeric_ Underscore9 NumericXX Module ID;

HR, MM, etc

_____________________________________________________________________________Page 15 of 20

Page 16: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________

5 IMG Configuration documentation

5.1 Transport RequestsIMG notes and configuration must be assigned to separate change requests, as they must be transported separately. The menu path for configuration is:

5.2 Menu PathChoose Tools Accelerated SAP Customizing Edit ProjectSelect GS1 Project if this is not already defined as the default Project.

5.3 Use of IMG to Document ConfigurationFor details on IMG documentation standards are described in the IMG Documentation document stored on I: \System Optimization Project\SOP Team Documents\BS&BC\Configuration Documents.

_____________________________________________________________________________Page 16 of 20

Page 17: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________

6 Development Key / SAP Object RegistrationAll development keys and SAP object registrations will be coordinated through Development Leader. The TMS Administrator is responsible for creating the keys.

_____________________________________________________________________________Page 17 of 20

Page 18: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________

7 Managing Development Changes

This can be used for SRs and regular projects

7.1 Steps to Manage Development Changes

Development Cycle Step Who Action Evaluate tasks(SR) assignments Project/Team

LeadsReview an SR and assign user status 'V' when done

Work Assignment Project/Team Leads

Assign Work in SR and change SR user status to 'APP'

Develop programs Developers Create Transport request with proper objects and update SR user status to 'D'

Ready for testing (Transport to QA) Developers Update SR user status to Q

QA Testing XXXX Transport the transport request to QA and update SR user status to 'T'

Approve testing results Team leads/Users

Update SR user status to 'P'

Monthly transfer or emergency transfer to Production

XXXX Update SR user status to 'A_PR'

7.2 NotesAll Change Requests will be transported on a Monthly basic except for emergency transportIn the text of the Change Request, please describe the contents of the change request, prefixed by the module name XX (see below). This will assist in tracking transport requests later on in the project.

XX generally used to denote the module, as follows: F I FinanceCO ControllingPS Project SystemHR Human resources PM Plant Maintenance MM Material Management CA Cross ApplicationAP Accounts PayableAR Accounts ReceivableEH Environment & Health Safety

What to include in a change request? A general rule of thumb is to group together all configuration or development that are logically related to a task. The recommended method is to create smaller units of work ( a week or less) in a change request release them after successful

_____________________________________________________________________________Page 18 of 20

Page 19: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________unit testing. With smaller change requests, it will be easier to find specific configuration changes later in the project.

_____________________________________________________________________________Page 19 of 20

Page 20: Abap standards

xxx SAP Development/Support Standards and Guidelines_____________________________________________________________________________

8 Other TopicsTo be developed as required

_____________________________________________________________________________Page 20 of 20