Online Tutorials & Training Materials | STechies.com
Register Login

Naming Conventions and Programming Standard Operating Procedure

|| 0 Download

Naming Conventions and Programming Standard Operating Procedure
Stechies

NCH Development Guidance Naming Conventions and Programming Standards

1. INTRODUCTION

Development programming standards and consistent naming conventions will contribute significant time and resource savings for both the initial construction and long term maintenance of the SAP system. Addressing these standards prior to construction and adhering to them during construction is especially helpful when addressing the following:

  • Migration into a production environment
  • Facilitating knowledge transfer for future SAP resources
  • Long-term maintenance/expansion of custom development
  • Future upgrades

Small amounts of effort now will prove beneficial for the overall project and SAP system. The objective of this overview is to define guidelines for SAP developers.

1.INTRODUCTION... 5

2.PREREQUISITES.. 5

3.Object Naming Conventions......................... 6

3.1 General Development Naming logic.......... 6

3.2 Business Unit Codes...................................... 6

3.3 Country Codes........ 6

3.4 Application ID........ 7

3.5 Summary................... 7

3.6 Development Class...................................... 12

3.7 ABAP Programs.... 12

3.8 ABAP Report Variants................................ 13

Zxxxxxxxxxxxxx.. 13

3.9 On-Line Programming................................ 13

3.9.1 Transaction Codes............................... 13

3.9.2 ABAP Module Pools............................ 13

3.9.3 ABAP Module Pool Components..... 14

3.9.4 Dynpros (Screens)................................ 14

3.10 Batch Job Requests................................... 15

3.11 Batch Input (BDC) Sessions..................... 15

3.12 Logical Database...................................... 15

3.13 Menus................... 16

3.14 ABAP Dictionary 16

3.14.1 Transparent Tables, Pool Tables, Structures........................ 17

3.14.2 ATAB/Control Tables....................... 17

3.14.3 Cluster Tables..................................... 17

3.14.4 Domains...... 18

3.14.5 Data Elements.................................... 18

3.14.6 Table Fields. 18

3.14.7 Search Help. 18

3.14.8 View.............. 19

3.14.9 Lock objects 19

3.15 Function Library 19

3.15.1 Function Groups................................. 20

3.15.2 Function Modules.............................. 20

3.16 SAPscript Layout Sets............................... 20

3.17 Message Classes 21

3.18 EDI / ALE Objects...................................... 21

3.18.1 IDOC Segment Type......................... 21

3.18.2 IDOC Segment Name....................... 21

3.18.3 Basic IDOC Type............................... 21

3.18.4 Enhancement IDOC Type............... 21

3.18.5 Logical Message................................. 21

4. Programming Standards............................ 23

4.1 Overview................ 23

4.1.1 General........... 23

4.2 User Exits............... 23

4.3 Hardcoding........... 24

4.4 Checking Return Codes.............................. 25

4.5 Documentation and Comments................. 25

4.6 Program Structure/Style............................. 28

4.7 Data Definition.... 28

4.8 Text Elements........ 30

4.9 Report Standards. 31

4.10 Batch Program / Interface Standards.... 31

4.11 Online Standards 32

4.12 Messages............. 33

4.13 Subroutines......... 33

5. Efficiency Standards................................... 35

5.1 General.................. 35

5.1.1 General: Dead Code............................ 35

5.2 Reports................... 35

5.2.1 Reports: Control Breaks..................... 35

5.3 Database Access... 35

5.3.1 Database Access: General.................. 35

5.3.2 Database Access: Buffered Tables... 35

5.3.3 Database Access: Select * vs. Select Single *........................ 35

5.3.4 Database Access: Cluster Tables...... 36

5.3.5 Database Access: Selecting one row without the full key.... 36

5.3.6 Database Access: Select * with Check.................................... 36

5.3.7 Database Access: Selecting certain fields............................... 36

5.3.8 Database Access: Range Tables....... 37

5.3.9 Database Access: Views and Inner Joins vs. Nested Selects for Joins....................... 37

5.3.10 Database Access: Index Design...... 38

5.3.11 Database Access: Logical Databases................................... 39

5.3.12 Database Access: Matchcodes....... 39

5.4 Internal Tables..... 40

5.4.1 Internal Tables: Reading a Single Record.............................. 40

5.4.2 Internal Tables: Sorting....................... 40

5.4.3 Internal Tables: Select Into vs. Append................................. 40

5.4.4 Internal Tables: Calculating Totals.. 40

5.4.5 Internal Tables: APPEND vs. COLLECT............................... 41

5.4.6 Internal Tables: Key Fields on Read 41

5.4.7 Internal Tables: Secondary Indexes. 41

5.4.8 Internal Tables: Sorting....................... 41

5.4.9 Internal Tables: Deleting Records..... 41

5.4.10 Internal Tables: Sequential Reads.. 42

5.4.11 Internal Tables: Direct Reads.......... 42

5.4.12 Internal Tables: Adding entries while sorting....................... 42

5.4.13 Internal Tables: Counting Entries... 43

5.4.14 Internal Tables: Loop/Shere vs. Loop/Check..................... 43

5.5 Logic Paths........... 43

5.5.1 Logic: PERFORM decisions............... 43

5.5.2 Logic: Nested ifs................................... 44

5.5.3 Logic: Case vs. If................................. 44

5.5.4 Logic: Optimizing IF AND CASE Structures.......................... 44

5.5.5 Logic: Move-Corresponding.............. 44

5.5.6 Logic: While vs. Do Loops.................. 44

5.5.7 Logic: Testing for Initial Value.......... 44

5.5.8 Logic: Performing Calculations......... 45

5.5.9 Logic: Field Length.............................. 45

6. Tracking SAP Modifications & Enhancements........................... 46

7. Workflow................ 46

7.1 Customizing of the Workflow.................... 46

7.2 Development......... 46

7.3 Roles and Responsibility............................ 46

7.4 Organization structure............................... 46

7.5 Workflow, Task Group, Task, and Role.... 47

7.5.1 Task................ 47

7.5.2 Task Group.... 47

7.6 Monitoring............ 47

7.6.1 Deadline monitoring............................ 47

8. EDI Modifications 48

9. Appendix A. - Return Codes....................... 49

10. Appendix B. - Skeleton Programs........ 54

Basic ABAP List Report..................................... 54

Interactive ABAP List Report........................... 56

Create a Sequential Dataset............................ 58

Read Sequential Dataset and Create a BDC Session........................ 59

CALL TRANSACTION USING Technique...... 62


 Download attached file.

You must be Logged in to download this file