Application Development 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: 

sap abap- perform using....changing....

Former Member
0 Kudos

1. can u explain me about ' perform....using...changing....'

subroutine and how to work with it.

2. how to declare constants (global declarations).

3 REPLIES 3

Former Member
0 Kudos

Hi,

You can declare global constants as below :

constants : gc_bukrs like bsis-bukrs value '1000'.

Find below docu for perform.

PERFORM form(prog).

Extras:

1. ... TABLES itab1 itab2 ...

2. ... USING u1 u2 u3 ...

3. ... CHANGING c1 c2 c3 ...

4. ... IF FOUND

This variant is not allowed in an ABAP Objects context.See PERFORM form(prog) not allowed.

Effect

Calls the subroutine form defined in program prog ("external PERFORM").

Notes

You pass parameters to the external subroutine as described in variant 1.

However, you can also do it using a shared data area (DATA BEGIN OF COMMON PART).

Please consult Data Area and Modularization Unit Organization documentation as well.

You can use nested calls, including several different subroutines in different programs.

When you call a subroutine that belongs to a program prog, prog is loaded into the PXA buffer (if it has not been loaded already). To minimize the possibility of memory problems, try not to use too many external subroutines from a large number of different programs.

Addition 1

... TABLES itab1 itab2 ...

Effect

See variant 1, addition 1.

Addition 2

... USING u1 u2 u3 ...

Effect

See variant 1, addition 2.

Addition 3

... CHANGING c1 c2 c3 ...

Effect

See variant 1, addition 3.

Addition 4

... IF FOUND

Effect

The specified subroutine is only called if the subroutine and its main program exist. Otherwise, the statement is ignored.

Notes

If the program exists but not the subroutine, the program itself is still loaded.

If the specified program contains errors, a runtime error occurs.

You can only find out if the subroutine exists by programming a check yourself (for example, by setting a flag that you pass to it).

Thanks,

SRiram Ponna.

Former Member
0 Kudos

Hi,

If you want to pass the variable as read only then use USING clause and if you want the variable to be read/ write one then you can use Changing clause.

Using changing clause you can retireve values from performs. that is pass a vriable as changing and assign value to it in FORM then you can read the same variable in calling routine.

Regards,

Satish

Former Member
0 Kudos

hi

good

go through this link this will give you complete idea about the form....perform as well as using and changing.

http://help.sap.com/saphelp_nw70/helpdata/en/9f/db979035c111d1829f0000e829fbfe/content.htm

thanks

mrutyun^