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

Form

Former Member
0 Likes
527

In Form...Endform.What is the use of changing parameters?How to use that?

4 REPLIES 4
Read only

Former Member
0 Likes
505

Changing helps to change the parameter value and then use the same in main program with changed value.

Sample:

data : val1 type i value 1,

val2 type i value 0.

perform calc using val1 changing val2.

Write / : 'Changing :' , val2.

write / : 'Using :' , val1.

&----


*& Form calc

&----


  • text

----


  • -->P_VAL1 text

  • <--P_VAL2 text

----


form calc using p_val1

changing p_val2.

p_val2 = p_val1 + 100.

*p_val1 = p_val1 + 100.

*Since p_val1 is passed as using,the above is not *permitted

endform. " calc

This link will clear all your Doubts reagrding Perform Statement.

Have a look:

http://help.sap.com/saphelp_erp2005/helpdata/en/9f/db977635c111d1829f0000e829fbfe/frameset.htm

Read only

0 Likes
505

what is the difference betn changing and using(by reference) parameters in form?

Read only

Former Member
0 Likes
505

the parameters that you paas with changing.. whatever changes you make in subroutine also get reflected in the passing parameter as well...

Read only

Former Member
0 Likes
505

hi

good

With the PERFORM statement, you can call subroutines which are coded in the same ABAP program (internal calls), or subroutines which are coded in other ABAP programs (external calls).

You can also specify the name of the subroutine dynamically at runtime, and call subroutines from a list.

Internal Subroutine Calls

To call a subroutine defined in the same program, you need only specify its name in the PERFORM statement:

PERFORM <subr> [USING ... <pi>... ]

[CHANGING... <pi>... ].

The internal subroutine can access all of the global data of the calling program.

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db978335c111d1829f0000e829fbfe/content.htm

reward point if helpful.

thanks

mrutyun^