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

perform routine

Former Member
0 Likes
773

Hi ,

Please can you send me some of the examples

in perform routines with using reference

5 REPLIES 5
Read only

Former Member
0 Likes
583

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

Read only

Former Member
0 Likes
583

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

Read only

Former Member
0 Likes
583

Check the demo program: demo_mod_tech_describe

Read only

Former Member
0 Likes
583

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.

-


Read only

Former Member
0 Likes
583

Hi

Few examples are given in se38

check the reports DEMO_MOD_TECH_* in se38

Regards,

MB