Calling Methods - E-Commerce - Lecture Slides, Slides of Fundamentals of E-Commerce

Students of Communication, study E-Commerce as an auxiliary subject. these are the key points discussed in these Lecture Slides of E-Commerce : Calling Methods, Enterprise Programming, Object Instantiation, Static Method, Attributes, Static Attributes, Static Methods, Public Attribute, Static Uses, Instance Uses

Typology: Slides

2012/2013

Uploaded on 07/29/2013

sheil_34
sheil_34 🇮🇳

4.4

(14)

129 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Spring 2011 Enterprise Programming
ABAP OBJECTS, PART 2
Discussion Topics
Working with static method and attributes
Object Instantiation
Docsity.com
pf3
pf4

Partial preview of the text

Download Calling Methods - E-Commerce - Lecture Slides and more Slides Fundamentals of E-Commerce in PDF only on Docsity!

Spring 2011 Enterprise Programming

ABAP OBJECTS, PART 2

Discussion Topics

 Working with static method and attributes

 Object Instantiation

Docsity.com

Working with classes in programs

Classes, when instantiated, become objects.

Not all classes need to be instantiated to be used within programs.

Static attributes (CLASS-DATA) Static methods (CLASS-METHODS)

To reference a static public attribute:

classname=>attributename myvar = classname=>attributename

To call a static method: CALL METHOD classname=>methodname. "traditional classname=>methodname( ). "as of Web AS 6.

Static vs. instance: Static uses => Instance uses -> Other syntax elements are the same.

Calling methods

Cannot be a space before opening parenthesis. Must be one after.

If only one importing parameter in method definition, list the actual parameter in the parenthesis by listing data object name only. class=>method( data1 ).

If several importing parameters, parameters must be listed in pairs: formal parameter = actual parameter. class=>method( par1 = data1 par2 = data2 ).

If there are parameters of types other than importing , the type of parameter passing must be listed. class=>method( EXPORTING p1 = d1 p2 = d IMPORTING par3 = data CHANGING par4 = data4 ).

Docsity.com

Let's Practice

Static Rules

Static methods can only access static attributes.

Static method may define local data objects.

Instance methods can access static and instance attributes.

Docsity.com