Classes can lead a double life: they can hide in a report source as a local class, or they can sit out in the system's class repository as a global class. Difference ? Nothing internally. There is nothing that you can arrange in a global class that can not be arranged in a local class and the other way around. Local classes are written in abap coding with a
DECLARATION and an
IMPLEMENTATION section. Global classes are created with the class builder (transaction
SE24). If you are writing a report to do a certain task, you can use the local class to profit from OO benefits, without having to worry about the world outside your report. When you are working on a class that may be of interest to other reports as well, consider setting it up as a global class.
Global classes may be available to the world, they don't get to play if they are not called. Actual calls can be done from other classes, but would eventually start from a report call (mostly, for argument sake, rfc function module calls are de-scoped for this article). The report can utilize class functionality, or adjust it via a local class.