Shared Top Border

Enterprise Resource
Planning Portal

 

Advertise | Founder BLOG

ERPGenie.COM ABAP Tips and Tricks Database

THE ultimate
ERP website

 

Forums | Vote for us |

Google    Other Search Options

Login

Login to view more content!!!





Lost Password?
No account yet? Register

Registered Access

Poll

What area of ABAP are you interested in?
 
Home arrow Tips and Tricks arrow ABAP Reports arrow Naming convention suggestions
Naming convention suggestions PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Anon.   
Thursday, 15 March 2007
The following is a suggestion of possible naming standards for your ABAP environment:

SAP developed R/3 object names must not be changed.  Changing any SAP R/3 object names may result in unpredictable results when new SAP releases are implemented.

Application IDs : The application ID is derived from the SAP Modules.

  • SD    Sales and Distribution                       
  • FI    Finance  (GL, AR, PS)
  • CO    Control Management
  • MM    Material Management
  • PP    Production Planning
  • CA    Cross Application
  • SI    System Implementation
  • TA    Technical Architecture
  • BW    Business Warehouse 

ABAP Program Development Object Name List

Below are the definitions of the variables used in the naming conventions.  ALL constants are indicated in BOLD and UPPERCASE.

  • “a” indicates the application ID (from above Section)
  • “b” indicates the Client
  • “c” indicates type of correction
  • “d” indicates developer’s initials
  • “e” indicates the system (ie., SAP, EDI, etc.)
  • “f” indicates frequency
  • “i” indicates version indicator (numeric begin with 01)
  • “k” indicates the purpose of the program
Valid Values:
  • C = Conversion
  • B = Batch Program
  • D = Include
  • E = SAP BW Extractor Programs
  • G = System Generated Data Load Programs
  • I = Interface
  • R = Report
  • S = SAPScript/Forms
  • T = Training
  • U = Utility
  • X = Template
  • “n” indicates a numeric value
  • “o” indicates SAP Delivered Program Object Name
  • “p” indicates production/test flag  (Valid Values: P or T)
  • “r” indicates the original IDOC name.
  • “s” indicates system id
  • “w” indicates a numeric value starting with 01
  • “x” indicates a freeform area for making your object names descriptive
  • “y” indicates the IDOC Segment  - Valid Values:
  • K = Header
  • P = Item
  • S = Summary
  • “#” indicates sequential number assigned by system. (i.e. system generated)

SAP Object Type

Length

Naming Convention

Applications Log Objects

    Sub-objects

4

10

Zxxx

Zxxxxxxxxx

Area Menu

20

Zaaxxxxxxxxxxxxxxxxx

Batch Input Session

12

Zaapfxxxxxxx

Change Document Object

15

Zxxxxxxxxxxxxxx

Context Object

20

Zaax…x

Correction Numbers

10

sssc9#####

Development Class

30

Zaax….x                                          See Appendix E

Dialog Module

30

Z_aa_x….x

Dialog Module Pool

 

 

 

 

 

 

40

SAPDZaax….x

 Include module names generated by the Workbench:
            DZaax….xTOP   - Data declarations
            DZaax….xO## -           PBO modules
            DZaax….xI##  -           PAI modules
            DZaax….xF##  -           Subroutines

Enhancement Project

40

Zaax….x

Form Module Pool             (subroutines)

40

SAPFZaax….x

Include module names generated by the Workbench::
FZaax….xTOP   -           Data declarations

FZaax….xE##  -           External Subroutine

FZaax….xF##  -           Internal Subroutines       

Function Groups

26

Zaax….x

Function Keys
(GUI Status)

20

xxxxx….x

Function Modules

    30

Z_aa_x….x

Memory ID

    20

ZZx….x                                         

Message Class (aka Message ID)

    20

Zaax….x                                          See Appendix F

Messages Number

    3

nnn

Number Range

    10

Zaaxxxxxxx

Programs, Includes and Reports

40

Zaakx….x


Local private objects: (Note:  Never create Local objects for production usage.)

Ydddx….x

SAP Modifications (copy of SAP program):

Zoooo..oo     

 

Note: ABAP  Queries must end with _query.  ABAP Queries should not be used in production.  Please see the ABAP Queries section for more information.

 

Screens

4

nnnn

Screen Module Pool

    (transactions)

 

 

 

 

 

40

SAPMZaax….x

Include module names generated by the Workbench::
MZaax….xTOP  -          Data declarations
MZaax….xO## -          PBO modules
MZaax….xI## -          PAI modules
MZaax….xF##  -          Subroutines

Title Bar         

20

Zx….x  

Transaction Code

20

Zaax….x 
Zaa_<tab_name>           Table Contents
                                    display via SE16

Type Pools

5

Zaann

Update Program Module Pool

 

 

8

SAPUZaax….x

Include module names generated by the Workbench:
            UZaax….xTOP   -          Data declarations
            UZaax….xO## -           PBO modules
            UZaax….xI##  -           PAI modules
            UZaax….xF##             -           Subroutines           

Variables

30

Variable names should be descriptive and include the following prefixes:

C_                    Constant

K_                    Context Variable

V_                    Variable

P_                    Parameter Field

Rx_                All Local Parameters in a                       
                Subroutine have to use                 the following naming

                convention:
                        x=  S:   Structure
                              T:   Internal table
                              V:   Variable

                NOTE: Variables within                         the subroutine must be                         named with the normal                                     prefixes (C_, K_, V_ etc).

O_             Select-Options Field

R_              Ranges

S_             Structure

T_             Internal tables

T_BDC_            BDC Table

TYPE_         Type Declaration

X_              Control

OBJ_          ABAP Object

 

In SAP delivered programs e.g. FORM-Userexits, use ‘ZZ_’ as an additional prefix.    

 

Recommendation:

Variable names can be up to 30 characters long. Use the '_' character to separate words within variable names unless space doesn't allow it.
Use meaningful and be verbose when creating variable names. Always use words to add meaning. Short descriptive names will be accepted.

 

ABAP Data Dictionary Development Object Name List

SAP Object Type

Length

Naming Convention

Data Element

30

Zaax….x (for data elements used in tables & views)

 

Zaa_x….x (for data elements used in structures IF the element does not exist in the list of data elements used in tables and views)

Data Element Supplement

4

nnnn

Domains

30

Zaax….x (for domains used in tables and views)

 

Zaa_x….x (for domains used in structures IF the domain does not exist in the list of domains used in tables and views)

Logical Database

20

Zaax….x
Logical database program (SAPDBZaax….x)

Lock objects

16

EZxx….x

Parameter ID

20

Zaax….x          

Search Help

30

Zaax….x          

Structures

30

ZSaax….x

Screen Structures

30

ZSaaSCRx….x

Structure Fields

30

Custom Structures:  xxxx…x

Append structures in SAP tables: ZZx….x

Tables

16

ZTaax….x

Table Fields

30

Custom Tables:  xxxx…xx

Append structures in SAP tables: ZZx….x

Table Indices

3

Zxx

Views

16

ZVaax….x

 
 

Integration Objects

SAP Object Type

Length

Naming Convention

ALE IDoc Segments - Custom

27

Z1EDyx….x

ALE IDoc Segments – Automatically Generated

27

Take the SAP automatically generated name

ALE IDoc Segments – via BAPI create transaction

27

Z1Zx….x

ALE IDOC Type

30

Zr…r

ALE IDOC Extension

30

ZXr...r

ALE Logical System

10

SAP:  eeesssbbb

Non-SAP:  eeexxxxxxx

ALE Message Type

30

Zx….x

x =  Copy of SAP message type, otherwise open

ALE Partner Profiles

10

For ALE:  Logical System name

For EDI:  Partner Name

ALE Process Codes

30

Zx….x

x =  Copy of SAP message type, otherwise open

BDC Session

12

Zaax…x

Business Object

10

Zx….x

x =  Copy of SAP message type, otherwise open

Logical Filenames

60

Zaakx…x

Logical Filepaths

60

Zaax…x

RFC Destination

32

g….g
 

ABAP Objects

SAP Object Type

Length

Naming Convention

ABAP Classes

30

ZCLaax….x

ABAP Interfaces

30

ZIFaax…..x

ABAP Methods

61

x……x

Attributes

 

T_     Internal tables

S_        Structures
V_        Variables

Events

 

x……x

Types

 

TYPE_x…..x

Protected Attributes

61

T_     Internal tables

S_        Structures
V_        Variables

Private Attributes

61

 

T_     Internal tables

S_        Structures
V_        Variables

 

Table Types

30

ZPaax….x

 

Objects

 

OBJ_x…….x

 

Object References

 

REF_x………x

 

Importing

30

IM_x…..x

Exporting

30

EX_x…..x

Changing

30

CH_x…..x

Returning

30

RT_x…..x

Table Types

30

ZPaax….x

BADI Definition

20

Zaax………x

BADI Implementation

20

Zaax………x

 
 

Non-Programming Objects

SAP Object Type

Length

         Naming Convention

    Authorization

      10