Skip to Content

Naming conventions

Hi,

I'm looking for naming conventions in ABAP programms. Is there any offical document where described how I have to name i.e.

local variables

local structures

local field symbols

ranges

paramters

...

within my ABAP programm.

I'm looking, but I can't find anything. Can anyone help me?

Thanks in advance

Paul

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 17, 2012 at 04:51 PM

    For program variables and others, I usually do:

    Variables: V_Description (ex. V_S1)

    Structures: S_Description (ex. S_CKONV)

    Field symbols: FS_Description (ex. FS_WERKS)

    Ranges: R_Description (ex. R_WERKS)

    Paramters: P_Description (ex. P_FIELD1)

    Internal Tables: I_Description or IT_Description (ex I_TAB1 or IT_TAB2)

    and so on ....

    Check with your client as well. They should have a standards doc, which might explain more.

    Just keep it all consistent if you do the work.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 17, 2012 at 05:06 PM

    Hi,

    thank yopu for your answer, but are there any official guides how to name something. I will define this for a customer, but will take care of SAP standard naming. For example I thought

    local varaiables as lv_name

    gloabal as gv_name

    local structue ls_name

    local references lr_??

    local ranges lr_.??

    Thanks

    Paul

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 17, 2012 at 05:06 PM

    paul, this is not really a forum for this question. Please pick up any R* standard report and check the naming followed by SAP.. there is nothing as official world wide naming standard.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 17, 2012 at 08:30 PM

    If you are looking for a document that lays down a good naming convention practice, you may want to look at [MIT ABAP Review Checklist|http://web.mit.edu/ist/org/admincomputing/dev/abap_review_check_list.htm].

    I used this document as a starting point to lay down a convention and review framework in some of my previous projects. Hope you may find it useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2012 at 06:33 AM

    In my experiences so far, the Naming Conventions depend totally on the Client's guidelines.

    Most clients have their set of Do and Dont's Guide.

    You just got to adapt to these guidelines.

    pk

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2012 at 07:27 AM

    If you are looking for naming conventions refer here...

    <<removed>>

    Edited by: kishan P on Jan 18, 2012 2:19 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2012 at 08:27 AM

    Hello,

    There are no offical guideliness for naming conventions. Even SAP it self is not using that. Like answered by other peoples, every organization has its own guidelines.

    I developed years for SAP IS-H NL and i have written programming guideliness myself.

    I think the problem is not was you use as standard, but it has to be used in an uniform way. Then the coding (at least) within the organization is readable for everyone.

    There is also a book ' SAP Programming Guideliness' from SAP Press, this is a good which can help you this.

    Regards,

    Peter van Alphen

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.