2008 May 30 10:32 AM
Can we call a sub-routine from one program to another program
2008 May 30 10:34 AM
Hi!
Yes, if the called program is an include type one, and it is included within the caller program, using the INCLUDE keyword.
Or you can use it like this:
PERFORM form(ZMYOTHERPROGRAM).
Or you can call the other program, using the SUBMIT keyword, but this will start the whole program.
Regards
Tamá
Hi!
Yes, if the called program is an include type one, and it is included within the caller program, using the INCLUDE keyword.
Or you can use it like this:
PERFORM form(ZMYOTHERPROGRAM).
Or you can call the other program, using the SUBMIT keyword, but this will start the whole program.
Regards
Tamá
2008 May 30 10:33 AM
Hi,
yes you can call
these are called external subroutienes
syntax:
perform <form name>(Prog name).
regards
prasanth
2008 May 30 10:34 AM
Hi!
Yes, if the called program is an include type one, and it is included within the caller program, using the INCLUDE keyword.
Or you can use it like this:
PERFORM form(ZMYOTHERPROGRAM).
Or you can call the other program, using the SUBMIT keyword, but this will start the whole program.
Regards
Tamá
2008 May 30 10:34 AM
2008 May 30 10:34 AM
Hi,
PERFORM subroutne IN PROGRAM prg_name IF FOUND.
or
PERFORM subroutne(prg_name).
2008 May 30 10:36 AM
Yes.
use the below syntax
PERFORM <subr>(<prog>) [USING ... <pi>... ]
[CHANGING... <pi>... ] [IF FOUND].
Refer the below link.
[http://help.sap.com/saphelp_nw04/helpdata/en/9f/db978335c111d1829f0000e829fbfe/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/9f/db978335c111d1829f0000e829fbfe/content.htm]
Reward if found helpful
Regards,
Boobalan Suburaj
2008 May 30 10:37 AM
Yes u can do in this way.
PERFORM form IN PROGRAM prog.
Example
DATA: RNAME(30) VALUE 'WRITE_STATISTIC', "Form and program
"names must
PNAME(8) VALUE 'ZYX_STAT'. "be written in
"upper case
PERFORM (RNAME) IN PROGRAM ZYX_STAT.
PERFORM WRITE_STATISTIC IN PROGRAM (PNAME).
PERFORM (RNAME) IN PROGRAM (PNAME).
All three PERFORM statements have the same effect, that is, they call the subroutine 'WRITE_STATISTIC', which is defined in the program 'ZYX_STAT'.
rwrd points if useful
Bhupal
2008 May 30 10:39 AM
Use this:
PERFORM name_form IN PROGRAM name_report
USING ...
CHANGING ....
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |