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

subroutines

Former Member
0 Likes
414

Hi,

wht is the syntax for calling a external subroutine.

regards,

kb

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
399

PERFORM <formname> IN PROGRAM <prgname>.

Hi,

wht is the syntax for calling a external subroutine.

regards,

kb

2 REPLIES 2
Read only

Former Member
0 Likes
400

PERFORM <formname> IN PROGRAM <prgname>.

Read only

Former Member
0 Likes
399

Hi,

Please refer to the docu below :

PERFORM form IN PROGRAM prog.

Extras:

1. ... TABLES itab1 itab2 ...

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

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

4. ... IF FOUND

The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas.See Passing SY-REPID not allowed and Receiving SY-SUBRC not allowed.

Effect

External PERFORM. Calls a subroutine form of another ABAP program prog. You can transfer both the subroutine name and the program name dynamically (at runtime); in this case you must enclose form or prog in brackets. The names transferred with form or prog must be in upper case, otherwise a runtime error will occur. If there are no subsequent addtional specifications (for example USING), you do not need to specify the program name after IN PROGRAM; in this case the system searches for the routine in the current program.

Note

If you call a routine of a program prog, the system loads this program prog into the PXA buffer (if it is not already there). For storage space reasons, you should not call too many subroutines belonging to different programs.

Thanks,

Sriram Ponna.