0% found this document useful (0 votes)
40 views1 page

Abap - Oops Methods

Methods in object-oriented programming (OOP) in ABAP can: 1. Access all attributes of a class and have parameters. 2. Use different parameter types like IMPORTING, EXPORTING, CHANGING, RETURNING, and EXCEPTIONS. 3. Be public and called from anywhere or private and called only within the class. Instance methods can use static and instance attributes while static methods can only use static components.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views1 page

Abap - Oops Methods

Methods in object-oriented programming (OOP) in ABAP can: 1. Access all attributes of a class and have parameters. 2. Use different parameter types like IMPORTING, EXPORTING, CHANGING, RETURNING, and EXCEPTIONS. 3. Be public and called from anywhere or private and called only within the class. Instance methods can use static and instance attributes while static methods can only use static components.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

DIFFERENT METHODS IN OOPS - ABAP 1. METHODS: a) They can access all the attributes of a class.

b) Methods have parameters (Signature). c) IMPORTING, EXPORTING, CHANGING, RETURNING, EXCEPTIONS, RAISING d) Syntax: IMPORTING var Type type, RETURNING VALUE (var) TYPE type, EXCEPTIONS exception RAISING class exception e) Public Methods can be called from anywhere; Private Methods can be called only within the class. f) Instance Methods can use both static and instance attributes and can be called using an instance. They are called using CALL METHOD refvar->instancemethod. You can access instance attributes using <instance>-><instance_attribute>. g) Static Methods also called as class methods can only use static components and can be called using a class. They are called using CALL METHOD classname => classmethod. If you are calling a static method from within the class, you can omit the class name. You can access static attributes using <classname>=><class_attribute> h) => and -> are the component selectors. i) Functional Methods: Methods that have a RETURNING parameter are described as functional methods. These methods cannot have EXPORTING or CHANGING parameters, but has many (or as few) IMPORTING parameters and exceptions as required. You can only do this for a single parameter, which additionally must be passed as a value.

You might also like