💻 Using SE38, create a new report called ZABAPOO_TRAIN_XXX where XXX is your trigramme
- Title : My first ABAP OO report
- Type : Executable report
- Status: Test report
💾 save
Write down following code
CLASS lcl_flight DEFINITION.
ENDCLASS.
💡 compile
❓ Why is it compiling ?
💻 Now add the implementation section. (no tips this time)
💡 compile
And this is all it takes to start a class. Well an empty one, but still, you've created your first class.
How do we write it using in the definition of our class ?
💻 start to type PUBLIC and use CTRL + SPACE
to get suggestions from auto completion.
Do it again for PRIVATE
💾 save then 💡 compile (or shorter CTRL + F3
)
Now, your code should look like this
[...]
CLASS LCL_FLIGHT DEFINITION.
PUBLIC SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS LCL_FLIGHT IMPLEMENTATION.
ENDCLASS.
[...]
- What are the keywords to wrap the definition part of a class ?
- Where will you declare attributes that you want to hide from external referential ?
- Where will you declare a behavior ? Where will you define it ?
- What's the word that define the process of giving different visiblity settings to attributes and behaviors ?