09-11-2007 2:27 PM
Hi all,
please give one example about
1.call-by-value
2.call-by-reference.
3.By using both
09-11-2007 2:40 PM
data : a type i.
a = 10.
write 😕 a.
perform call_by_value changing a.
write 😕 a.
perform call_by_ref using a.
write 😕 a.
&----
*& Form call_by_value
&----
text
----
-->P_A text
----
form call_by_value using value(a) .
a = a + 10.
endform. " call_by_value
&----
*& Form call_by_ref
&----
text
----
-->P_A text
----
form call_by_ref using a.
a = a + 10.
endform. " call_by_ref
09-11-2007 2:43 PM
Hi,
here is the SAP Help link
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db984635c111d1829f0000e829fbfe/content.htm
Regards
Sudheer
09-11-2007 2:44 PM
data : a type i, b type i.
a = 10.
b = 20.
write 😕 a.
perform call_by_value changing a.
write 😕 a.
perform call_by_ref using a.
write 😕 a.
perform call_by_val_ref changing a b.
write 😕 a , b.
&----
*& Form call_by_value
&----
text
----
-->P_A text
----
form call_by_value using value(a) .
a = a + 10.
endform. " call_by_value
&----
*& Form call_by_ref
&----
text
----
-->P_A text
----
form call_by_ref using a.
a = a + 10.
endform. " call_by_ref
&----
*& Form call_by_val_ref
&----
text
----
<--P_A text
<--P_B text
----
form call_by_val_ref changing a
value(b).
a = a + 10.
b = b + 10.
endform. " call_by_val_ref
Regards
Vasu