Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

checking wether a program(s) follows stds/naming convenions in new program

Former Member
0 Kudos


We are developing a new program what it does is it need to check all the naming standards/conventions which we follow in our project are in new program (or) not.

In New program we are taking Program Name/Transport request as input.

Once we run this program by giving Existing Program Name (or) transport request we have check wether all the includes/program as per input follows naming standards (or) not.

We need to give message(s) in the output for each Naming convention/standard wether it is successfully implemented that convention/standard one after other.

Now my issue is how can we implement the same.

Is there any standard transaction in SAP where we can add our own naming convention/standard so that once we run that transaction it will take care of all the standards.

If not as per our development first we are takng all the lines in program into one internal table there we are removing all the commented & blank lines and processing other lines.

Now using those remaining lines we need to process to see wether they all following naming conventions and standards.

Ex standards and conventions that need to be followed:

<b>1. The names of components in classes, that is attributes, methods and events, must consist of the characters "A-Z", "0-9" and "_". They should not begin with a number.</b>

<b>Error message in ABAP Objects if the following syntax is used:</b>

DATA: field-name TYPE ...,

1name TYPE ...

<b>Correct syntax:</b>

DATA: field_name TYPE ...,

name1 TYPE ...

<b>2. No LIKE reference to Dictionary types</b>

<b>Error message in ABAP Objects if the following syntax is used:</b>

DATA f LIKE dbtab.

<b>Correct syntax:</b>

DATA f TYPE dbtab.

<b>3. No implicit specification of type, length and decimal places</b>

In the statement TYPES, the type must be specified explicitly with type C, the length with types C, N, P, and X, and the number of decimal places with type P in ABAP Objects.

<b>Error message in ABAP Objects if the following syntax is used:</b>

TYPES: t1,

t2 TYPE p.

<b>Correct syntax:</b>

TYPES: t1(1) TYPE c,

t2(8) TYPE p DECIMALS 0.

<b>4. Incorrect logical operators</b>

The logical operators >< , =< and => are not allowed in ABAP Objects.

<b>Error message in ABAP Objects if the following syntax is used:</b>

... >< ... =< ... => ...

<b>Correct syntax:</b>

... <> ... <= ... >= ...

There are lots of checks as mentioned above we need to implement all of those.

Likewise we need to check wether the program is implementing all the standards & naming conventions.

How can we add all such things[Checks] in my program.

Can anybody help me in this regard.

If anybody who has done such programs please pass on those ideas.

Thanks in advance.

Thanks and Regards,



Former Member
0 Kudos


Check how extended program syntax check is performed


Screen : 0100.

in se38 open your program, select Program->check->Extended program check,

& also check code inspector.



0 Kudos


These things i am aware of.

But here we will not be able to add our own standards/conventions.

Is there any provision in SAP to include/provide our own checks along with SAP's own checks!

Because it is not possible to add our own checks we are developing new program to implement our own checks.

Thanks for your reply.



0 Kudos

SAP Code Inspector Does it for you.

I think transaction SCI is available only from 4.7 whereas in 4.6C you can find it with extended prog check.

Go to trx SCI ->Variants ->Create Variant->Prog Conv -> Naming Convention ->Click on the arrow to set your Naming Convention.

Create inspection ->Associate the program and the variant ->execute ->view results

0 Kudos


Anybody give me clues in to the above posted issue.

I am working in 4.6C version.

That is why we are going for new program in place of SCI.

Thanks for your replies.