You are on page 1of 4

Sap memory and ABAP memory

SAP Memory ABAP Memory


SAP memory is global memory, all SAP
GUI sessions have access.
ABAP memory is local memory, all programs
within a session can have access.
SAP memory is a memory area, which
can be accessible by all SAP GUI
sessions. By using SAP memory we can
share data between sessions as well as
SAP programs.
ABAP memory is a memory area, which can be
accessed by all ABAP programs with in internal
session, these data sharing can be processed
by using EP!"#$I%P!"# statements. #o pass
data &rom a program to another program we
have to 'll a memory id using EP!"# and can
be imported by using I%P!"# .
#he data can be e(changed by using
GE#$SE# parameters.
#he data can be e(changed by using
EP!"#$I%P!"# parameters.
#hese parameters can be set either &or a
particular user or &or a particular
program using the SE# PA"A%E#E"
statement. !ther ABAP programs can
then retrieve the set parameters using
the GE# PA"A%E#E" statement. #he
most &re)uent use o& SE#$GE#
parameters is to 'll screen 'elds .
#he most &re)uent use o& EP!"#$I%P!"#
parameters is to share data between
programs.
* +
#he main use o& SAP memory is to call standard screen or custom screens along with
parameters.
Synta( , -A.. #"A/SA-#I!/ 0#+-!1E2.
By using above synta( we can call a transaction 3#+code4, sometimes we may need to
pass parameters to screen elements o& transactions, we use below synta( to pass
parameters to screen 'elds.
Synta( ,
SE# PA"A%E#E" I1 50PA"A%E#E" I1 !6 S-"EE/ E.E%E/#25 6IE.1 507A.UE25 .
-A.. #"A/SA-#I!/ 0#+-!1E2 .
Some times we may need to s8ip input screen and display details directly, synta( &or
this is,
Synta(, SE# PA"A%E#E" 50PA"A%E#E" I1 !6 S-"EE/ 6IE.125 6IE.1 507A.UE25. 9set
parameter value to the screen 'eld
-A.. #"A/SA-#I!/ 0#+-!1E2 A/1 S:IP 6I"S# S-"EE/ .
E(ample o& using SAP memory with call transaction
-all %%;< transaction and display a material &rom ABAP program.
"EP!"# =SAP/>SAP>%E%!"?.
SE# PA"A%E#E" I1 5%A#5 6IE.1 5@A;;;;+;;B5 . 9 5%A#5 is the parameter id o& material input
in %%;<
-A.. #"A/SA-#I!/ 5%%;<5 A/1 S:IP 6I"S# S-"EE/ .
* +
ABAP memory is used to trans&er data between diCerent ABAP programs.
In real+time business operations we may need to call diCerent reports and applications
to e(ecute particular operation.
#he below is the basic e(ample o& passing data &rom one ABAP program to another
ABAP program by using ABAP memory.
SUB%I# :eyword
SUB%I# is a 8eyword which is used to call a e(ecutable program 3ABAP program4 &rom
another program.
Synta(,
SUB%I# "EP!"# /A%E SE.E-#I!/ S-"EE/ !P#I!/S
.IS# !P#I!/S
D!B !P#I!/S
EA/1 "E#U"/F. 9 A/1 "E#U"/ is an addition
"EP!"# /A%E + %ust be a ABAP report name
SE.E-#I!/ S-"EE/ !P#I!/S + USed to supply selection screen values
.IS# !P#I!/S + Used to speci&y page siGe and output medium
D!B !P#I!/S + Used to shedule program &or bac8ground processing.
"E#U"/ + Hhen we use return the control will come bac8 to base program a&ter e(ecution
EP!"# is a 8eyword which is used to e(port a value to a memory id.
I%P!"# is a 8eyword which is used to import a value &rom a memory id .
Using ABAP memory in ABAP programs
In the below e(ample we pass data &rom programB =SAP/>ABAP>%E%!"?B to programI
=SAP/>ABAP>%E%!"?I and display result in programI.
#estB with out "E#U"/ 8eyword.
"EP!"# =SAP/>ABAP>%E%!"?B.
PA"A%E#E"S , P>I/PU# #?PE -JA"B; .
S#A"#+!6+SE.E-#I!/.
EP!"# P>I/PU# #! %E%!"? I1 5#ES#5 .
SUB%I# =SAP/>ABAP>%E%!"?I .
I6 S?+SUB"- EK ;.
H"I#E,$ 5!nly trigger when submit and return5.
E/1I6.
"EP!"# =SAP/>ABAP>%E%!"?I.
1A#A P>I/PU# #?PE -JA"B;.
I%P!"# P>I/PU# 6"!% %E%!"? I1 5#ES#5.
H"I#E ,$ P>I/PU# .
#estI add the 8eyword "E#U"/ to 'rst program.
"EP!"# =SAP/>ABAP>%E%!"?B.
PA"A%E#E"S , P>I/PU# #?PE -JA"B; .
S#A"#+!6+SE.E-#I!/.
EP!"# P>I/PU# #! %E%!"? I1 5#ES#5 .
SUB%I# =SAP/>ABAP>%E%!"?I A/1 "E#U"/ .
I6 S?+SUB"- EK ;.
H"I#E,$ 5!nly trigger when submit and return5.
E/1I6.

You might also like