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

Methods in Abap Oo

Methods in ABAP OO can: 1. Access all attributes of a class. 2. Have parameters known as signatures. 3. Use parameter types like IMPORTING, EXPORTING, CHANGING, RETURNING, and EXCEPTIONS. 4. Be public and callable from anywhere or private and callable only within the class. 5. Be instance methods callable using an instance or static methods callable using the class name.
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

Methods in Abap Oo

Methods in ABAP OO can: 1. Access all attributes of a class. 2. Have parameters known as signatures. 3. Use parameter types like IMPORTING, EXPORTING, CHANGING, RETURNING, and EXCEPTIONS. 4. Be public and callable from anywhere or private and callable only within the class. 5. Be instance methods callable using an instance or static methods callable using the class name.
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

TYPES OF METHODS IN ABAP OO 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