Comments


Comments

ABAP has 2 ways of defining text as a comment:
  • An asterisk (*) in the leftmost column of a line makes the entire line a comment
  • double quotation mark (") anywhere on a line makes the rest of that line a comment

  1. Line Comment: If you want to comment whole line, you can put * sign in front of the line.
    Example:
    * Comment Line
    WRITE: This is the example for commenting. 
  2. Partial Line Comment: If you want to comment partail of line, you can put " sign in front of the comment text
    Example:
    WRITE: This is the example for commenting.    "Comment Line



Example:
***************************************
** Program: BOOKINGS                 **
** Author: Joe Byte, 07-Jul-2007     **
***************************************
 
REPORT BOOKINGS.
 
* Read flight bookings from the database
SELECT * FROM FLIGHTINFO
  WHERE CLASS = 'Y'       "Y = economy
  OR    CLASS = 'C'.      "C = business
(...

No comments:

Post a Comment