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

How do you document your ABAP code?

Former Member
0 Likes
775

Do you have some kind of special technik or do you use some kind of auto document. I'm just curious to make it easier....

thx

4 REPLIES 4
Read only

Former Member
0 Likes
643

HI,

<b>Documentaion</b> Allows you to write documentation for a particular executable program (report). The system starts the SAPscript Editor, where you can enter the documentation according to the predefined template. When executing the report, the user can display this documentation by choosing System --> Services --> Reporting (Transaction SA38) and Goto --> Documentation. If the report is stored as node in a reporting tree (Transaction SERP), the user can choose Goto --> Display docu. from the tree display to display the documentation.

Thanks

Sudheer

Read only

Former Member
0 Likes
643

Hi

All source code should include a header which details Author, Creation date, Change reference and a brief description of the programs purpose.

It should also contain a change log which details a change reference, date, changed by person and a description of the change. A sample documentation for the report can be given as follows

----


*REPORT NAME *

----


REPORT XXXXXXXX.

----


  • PROGRAM DESCRIPTION *

----


  • This is the SAP template. It is to be copied for all new *

  • programs. Please delete sections that are not relevant. *

----


  • RESPONSIBILITY - ORIGINAL BUILD *

----


  • Author............: *

  • Creation date.....: *

  • Requested by......: *

  • Owner.............: *

  • Project...........: *

  • SAP Release.......: *

  • Logical database..: *

  • Version...........: *

  • *

----


----


  • CHANGE HISTORY - Should be completed in reverse date order *

  • Revised by........: *

  • Change date.......: *

  • Change no.........: *

  • Description.......: *

----


************************************************************************

  • DATA DEFINITION *

************************************************************************

----


  • TYPES *

----


TYPES:

T_XXXX.

----


  • TABLES *

----


TABLES:

XXXX.

----


  • INTERNAL TABLES, STRUCTURES & WORK AREAS *

----


DATA:

BEGIN OF IT_XX.

END OF IT_XX.

RANGES:

R_XXX.

----


  • VARIABLES *

----


DATA: V_XXX.

----


  • CONSTANTS *

----


CONSTANTS: C_XXX.

----


  • FIELD GROUPS *

----


FIELD-GROUPS:

XXXX.

----


  • PARAMETERS & SELECT-OPTIONS *

----


PARAMETERS:

P_XXXXXX.

SELECT-OPTIONS: S_XXXXXXXX.

************************************************************************

  • EVENT PROCESSING *

************************************************************************

----


  • INITIALIZATION AND AT_SELECTION_SCREEN *

----


INITIALISATION.

AT_SELECTION_SCREEN.

----


  • MAIN SECTION *

----


START-OF-SELECTION.

END-OF-SELECTION.

----


  • SCREEN PROCESSING *

----


AT_LINE_SELECTION.

AT_USER_COMMAND.

----


  • PRINT HEADER *

----


TOP-OF-PAGE.

END-OF-PAGE.

************************************************************************

  • FORMS *

************************************************************************

----


  • FORM F_xx. *

  • *

  • <Description> *

  • *

  • Called by: *

  • *

  • Calls : *

----


FORM F_XXXX USING YYYY.

ENDFORM.

The above is for the internal documentation. Coming to external documentation should be having the following

TITLE User understandable program title

i.e. Account balance update program.

PURPOSE Functional purpose of program

i.e. Updates account balances with information receive via an interface.

INTEGRATION How this program fits into specific business processes

i.e. Would be used as part of the month end account reconciliation process to ensure that accounting figures are correct.

PREREQUISITS Any processes and function required before this program can be executed.

i.e. Account balance interface file must have been received.

FEATURES

SELECTIONS Detail of selection screen capabilities.

i.e. Need to enter 8 character input file.

STANDARD

VARIANTS Details of any standard variants set up for batch processing.

OUTPUT Any outputs from program.

i.e. Program produces spreadsheet downloaded to PC containing details of account numbers changed.

ACTIVITIES (OPTIONAL)

EXAMPLES (OPTIONAL)

Cheers

JK

Read only

Former Member
0 Likes
643

Hi,

Documentation cannot be fully automated. But you can try some of the utility codes available on the net and also some utilities like www.Abovesoft.com

Remember nothing is better then the original author documenting his work.

Cheers

VJ

Read only

Former Member
0 Likes
643

Hi,

Generally the Documentation is client specific, and Based on that prepare the template and use it.

Document in such a way that who ever touch the code in future will understand the code with out asking any one.

and Try to proivide inline documentation and comments.

Regards

vijay