‎2008 Jan 07 11:07 AM
Hai,
How to call one program through another program.
Example.
************
I have two programs 1.ZPROG1 2. ZPROG2.
When i execute ZPROG1 at that time it should call ZPROG2.
‎2008 Jan 07 11:09 AM
Hi,
use
SUBMIT, SET PARAMETER ID/GET PARAMETER ID
commands.
hope this helps.
‎2008 Jan 07 11:10 AM
‎2008 Jan 07 11:10 AM
Hi,
Use below code :
SUBMIT <report name>
VIA SELECTION-SCREEN
USING SELECTION-SET 'VARIANT1'
USING SELECTION-SETS OF PROGRAM 'Program name'
AND RETURN.
Thanks,
Sriram Ponna.
‎2008 Jan 07 11:11 AM
Hi,
check out this link..
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9dd035c111d1829f0000e829fbfe/content.htm
regards,
Goutham
‎2008 Jan 07 11:12 AM
Hi ,
u can use submit statement to call a program .
DATA: text TYPE c LENGTH 10,
rspar_tab TYPE TABLE OF rsparams,
rspar_line LIKE LINE OF rspar_tab,
range_tab LIKE RANGE OF text,
range_line LIKE LINE OF range_tab.
...
rspar_line-selname = 'SELCRIT1'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'EQ'.
rspar_line-low = 'ABAP'.
APPEND rspar_line TO rspar_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'H'.
APPEND range_line TO range_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'K'.
APPEND range_line TO range_tab.
SUBMIT report1 USING SELECTION-SCREEN '1100'
WITH SELECTION-TABLE rspar_tab
WITH selcrit2 BETWEEN 'H' AND 'K'
WITH selcrit2 IN range_tab
AND RETURN.
regards,
Santosh thorat
‎2008 Jan 07 11:17 AM
hi,
for calling program,
e.g.
SUBMIT YPPDAILYUPDATE
with pstngdt in temp
with entdate eq ' '
with posdate eq 'X'
with rdata eq 'X'
with logic eq ' '
with high eq 'X'
with trend eq ' '
AND RETURN
.
or
if u have tcode then,
CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
Regards,
Arpit
‎2008 Jan 07 11:31 AM
If you want ZPROG1 should continue it's processing after ZPROG2 is finished,
use
SUBMIT ZPROG2 and RETURN.
If you want ZPROG1 should transfer it's control to ZPROG2 and processing should not return to ZPROG1, use
SUBMIT ZPROG2.
In case you want to pass other parameters etc using VIA SELECTION-SCREEN and other variant.
Regards,
Mohaiyuddin
‎2008 Jan 07 11:38 AM
Hi Uday,
If your program is executable (Type 1) you can use SUBMIT.If the program has a different type if you use SUBMIT, then the system triggers a runtime error.
syntax: SUBMIT PROG1.
PROG1 must be capital, otherwise a runtime error occurs
Thanks & Regards
Raj
‎2008 Jan 07 12:03 PM
hi,
Let zprog1 be the calling program & zprog2 be the program to be called.
case 1: u want to call zprog2 from zprog1 and don't want the control to return back to calling program(zprog1) after program zprog2 is executed.
Syntax (zprog1):
SUBMIT ZPROG2.
case 2: u want to call zprog2 from zprog1 and also want the control to return back to calling program(zprog1) after program zprog2 is executed.
Syntax (zprog1):
SUBMIT ZPROG2 AND RETURN.
case 3: u want to transfer some data from one zprog1 to zprog2 while making a call.
Syntax (zprog1):
EXPORTING G_DATA1 G_DATA2 TO MEMORY ID 'ANY_NAME'.
Syntax (zprog2):
IMPORTING G_DATA1 TO G_DATA11 G_DATA2 TO G_DATA22 FROM MEMORY ID 'ANY_NAME'.
Regards,
Amit Gupta
‎2008 Jan 08 9:38 AM