2007 May 16 3:05 PM
Hello,
Can anyone help me out giving this answer. How can we call a subroutine of one report from an other report.
2007 May 16 3:21 PM
Hi,
You can use
PERFORM <subr> [USING ... <pi>... ]
[CHANGING... <pi>... ].
OR
PERFORM (<fsubr>)[IN PROGRAM (<fprog>)][USING ... <pi>... ]
[CHANGING... <pi>... ]
[IF FOUND].
OR
SUBMIT
Calls an executable program of type 1.
Syntax
SUBMIT <rep> [AND RETURN] [VIA SELECTION-SCREEN]
[USING SELECTION-SET <var>]
[WITH <sel> <criterion>]
[WITH FREE SELECTIONS <freesel>]
[WITH SELECTION-TABLE <rspar>]
[LINE-SIZE <width>]
[LINE-COUNT <length>].
Calls the program <rep>. If you omit the AND RETURN addition, the current program is terminated. Otherwise, the data from the current program is retained, and processing returns to the calling program when <rep> has finished running. The other additions control the selection screen and set attributes of the default list in the called program.
Regards,
Bhaskar
Hello,
Can anyone help me out giving this answer. How can we call a subroutine of one report from an other report.
2007 May 16 3:07 PM
Hi,
you can use this statement
perform routine(external_program_name).
Kostas
2007 May 16 3:08 PM
PERFORM form IN PROGRAM prog.
do an F1 on Perofrm in your ABAP editor & you will get a help on all the options..
~Suresh
2007 May 16 3:10 PM
Hi,
You can simply write the prog name in () bracket and execute the perform.
e.g.
PERFORM buildt_fieldcat(Z5GJK_BILLING_BLOCK_DETAILS) CHANGING t_fieldcat
Hope this solves your purpose.
Award points if it helps.
-Gaurang
2007 May 16 3:10 PM
Hi,
Subroutine Name (Program in which Subroutine present).
Regards,
Ranjit Thakur.
<b>Please Mark The Helpful Answer.</b>
2007 May 16 3:12 PM
Hi Satish,
Welcome to SDN.
Please check this link for detail information and sample codes.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db978335c111d1829f0000e829fbfe/content.htm
Regards,
Ferry Lianto
2007 May 16 3:14 PM
Hi,
Calling External Subroutines
1 report ztx1811.
2 tables ztxlfa1.
3 data f1(3) value 'AAA'.
4
5 ztxlfa1-lifnr = '1000'.
6 perform s1(ztx1812).
7 write: / 'f1 =', f1,
8 / 'lifnr =', ztxlfa1-lifnr.
-
-
Listing 18.12 Subroutine Called from the Program in Listing 18.11
1 report ztx1812.
2 tables ztxlfa1.
3 data f1(3).
4
5 form s1.
6 f1 = 'ZZZ'.
7 ztxlfa1-lifnr = '9999'.
8 endform.
-
The code in Listing 18.11 produces the following output:
f1 = AAA
lifnr = 9999
Hope this helps.
Reward if helpful.
Regards,
Sipra
2007 May 16 3:20 PM
2007 May 16 3:21 PM
Hi,
You can use
PERFORM <subr> [USING ... <pi>... ]
[CHANGING... <pi>... ].
OR
PERFORM (<fsubr>)[IN PROGRAM (<fprog>)][USING ... <pi>... ]
[CHANGING... <pi>... ]
[IF FOUND].
OR
SUBMIT
Calls an executable program of type 1.
Syntax
SUBMIT <rep> [AND RETURN] [VIA SELECTION-SCREEN]
[USING SELECTION-SET <var>]
[WITH <sel> <criterion>]
[WITH FREE SELECTIONS <freesel>]
[WITH SELECTION-TABLE <rspar>]
[LINE-SIZE <width>]
[LINE-COUNT <length>].
Calls the program <rep>. If you omit the AND RETURN addition, the current program is terminated. Otherwise, the data from the current program is retained, and processing returns to the calling program when <rep> has finished running. The other additions control the selection screen and set attributes of the default list in the called program.
Regards,
Bhaskar
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |