Pages

Thursday, May 1, 2008

Better Aproach - Coding in Abap (Coding Format)

1.One Command Per line

-Each ABAP/4 command line consists of a sentence ending with a period. Each command
should start on a new line (Even though ABAP allows several commands per line). This will
provide the option for easier deleting, commenting and debugging.

Recommended:

IF F_STATUS EQ K_ERROR.

EXIT.

ENDIF.

Not Recommended:

IF F_STATUS EQ K_ERROR. EXIT. ENDIF.

2.Program Comments

Comments should be used to describe the program statements. Half line comments should be used to provide description of data declaration and parameters. Complex or unusual program logic should be documented with full line of comments prior to the statement and leaving one blank line before the comments.



No comments: