‎2007 Feb 28 12:55 PM
Hi ,
Please can you send me some of the examples
in perform routines with using reference
‎2007 Feb 28 1:05 PM
Hello
See this:
PERFORM append_gra_wrttp USING:
c_wrttp_ist_04.
*&---------------------------------------------------------------------*
*& Form append_gra_wrttp
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_C_WRTTP_OBLIGO_BANF_21 text
*----------------------------------------------------------------------*
FORM append_gra_wrttp
USING value(i_f_wrttp) TYPE co_wrttp.
DATA:
lr_wrttp LIKE LINE OF gra_wrttp_obligo.
lr_wrttp-sign = c_sign_i.
lr_wrttp-option = c_option_eq.
lr_wrttp-low = i_f_wrttp.
APPEND lr_wrttp TO <fs_ra_wrttp>.
ENDFORM. " append_gra_wrttp
Vasanth
‎2007 Feb 28 1:05 PM
Hi Ali,
Go through the following:
When we are passing parameter by reference, then a separate copy will not be created. If we are passign by value, a separate copy will be created.
1. Pass by value and pass by reference ( getting result )
a) Pass by value
PERFORM subr USING a1 a2 a3 a4 a5
Click for example: http://help.sap.com/saphelp_47x200/helpdata/en/9f/db979d35c111d1829f0000e829fbfe/frameset.htm
b) Pass by reference
PERFORM subr CHANGING a1 a2 a3 a4 a5
Click for example Example: http://help.sap.com/saphelp_47x200/helpdata/en/9f/db979035c111d1829f0000e829fbfe/frameset.htm
Thanks
‎2007 Feb 28 1:08 PM
‎2007 Feb 28 1:15 PM
data : w_val type i value 20, w_char(5) type c value 'Hello'.
perform test using w_val w_char.
write / : w_val,w_char.
Perform using reference......
form test using p_w_val type i
p_w_char type c.
p_w_char = 'Hi'.
p_w_val = '100'.
endform. " test
-
output is Hi , 100.
-
Perform using by value......
form test using value(p_w_val) type i
value(p_w_char) type c.
p_w_char = 'Hi'.
p_w_val = '100'.
endform. " test
-
output is Hello , 20.
-
‎2007 Feb 28 1:29 PM
Hi
Few examples are given in se38
check the reports DEMO_MOD_TECH_* in se38
Regards,
MB