‎2007 Jan 24 2:57 PM
Hi,
I want to execute a program in the background to use this data in the other program.
Best regards.
‎2007 Jan 24 3:02 PM
‎2007 Jan 24 3:39 PM
Hai
Check the following Code
report Zreport.
data: begin of itab occurs 0,
datum type sy-datum,
end of itab.
ranges: r_datum for sy-datum.
create some data in ITAB
itab-datum = sy-datum.
do 10 times.
itab-datum = itab-datum + 1.
append itab.
enddo.
Build the range
clear r_datum. refresh r_datum.
loop at itab.
r_datum-sign = 'I'.
r_datum-option = 'EQ'.
r_datum-low = itab-datum.
append r_datum.
endloop.
<b>submit zreport
with s_datum in r_datum
and return.</b>
Here Zreport1 is other program
‎2007 Jan 24 3:45 PM
Hi!
Yes, you can use the SUBMIT TO MEMORY ID 'VARIABLE' and the IMPORT variable FROM MEMORY ID 'VARIABLE' statements.
Or you can write the data into a file on the SAP server.
Regards
Tamá
‎2007 Jan 24 4:25 PM
Hi,
If you need to program an extensive application, one single program will become very complex. To make the program easier to read, it is often reasonable to divide the required functions among several programs.
As well as external modularization, in which you store procedures in special non-executable ABAP programs like function groups, you can also call independent programs from within an ABAP program.
The following ABAP statements allow you to start an executable program or transaction. You can either exit the calling program, or have the system return to it when the called program finishes running.
Type 1 Program
Transaction
Call (without returning)
SUBMIT
LEAVE TO TRANSACTION
Call and return
SUBMIT AND RETURN
CALL TRANSACTION
You can use these statements in any ABAP program. For example, while processing a user action in the output list of an executable program, you might call a transaction whose initial screen is filled with data from the selected list line.
An interesting remark at this point is that every time you run an executable program, a SUBMIT statement occurs. When you enter the program name in a transaction like SE38 or SA38 and choose Execute, a SUBMIT statement occurs in the transaction. It is therefore a technical attribute of a type 1 program that they are called using SUBMIT, although their principal characteristic from a users point of view is that they are started in the foreground.
Check the below links
<b>Filling the Selection Screen of a Called Program</b>
http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/content.htm
<b>Affecting Lists in Called Programs</b>
http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba50d35c111d1829f0000e829fbfe/content.htm
<b>Program Statements to Leave a Called Program</b>
http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba50035c111d1829f0000e829fbfe/content.htm
I hope this answers your question.
regards,
Vara