Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

abap memory & global class

Former Member
0 Likes
1,767

Both can be used for data transfer between different modules.

Does anyone know something about their difference technically?

Both can be used for data transfer between different modules.

Does anyone know something about their difference technically?

4 REPLIES 4
Read only

Former Member
0 Likes
1,233

Abap memory is used for passing data objects between internal sessions. So what you can do is you can call a report from your program with

Submit <report name> and return.

This creates an internal session. As soon as the report finishes execution control returns to the main program. Now suppose you want to send some data from main program to report. In main program you will do -

export <data object> to memory id <Mem ID>.

In the report you do -

import <data object> from memory id <Mem ID>

and you can use this data object (variable) in the report.

Global classes public static attributes can also be used technically to do the same thing but this is not what it is meant to do. Classes should be used for object oriented programming, reusability (through inheritance) , uniformity (trough use of interfaces) and much more. It is not just a container for accessing objects.

Read only

Former Member
0 Likes
1,233

You are comparing apples and oranges with a common attribute of eating.

Read only

0 Likes
1,233

Hi, in memory level, there maybe some difference in mechanism.

Read only

JuanCarlosDelga
Contributor
0 Likes
1,233

Hi Ming,

As Saurabh said, both are limited to the external session, shared data between internal sessions.

Regards