‎2006 Jun 14 7:37 AM
hi,
i am using two report programs r1 and r2.
i want to execute the report program r1 inside r2..how can i call that report program...so that when i execute the report r2 i should be able to give the inputs for r1..can anyone solve this plz..
‎2006 Jun 14 7:41 AM
Hi,
See the code below for ur requirement:
suppose u want to call R1 inside r2 .
inside r2:
Call to r1 AND Pass the below mentioned
values
SUBMIT r1 WITH einlesen EQ lc_x
WITH headfile EQ lv_source
WITH bankid EQ lc_bacs
WITH mregel EQ lc_session
WITH pa_mode EQ lc_post_method
WITH valut_on EQ lc_x
WITH pa_xcall EQ lc_x
WITH batch EQ lc_x
WITH spool EQ lc_x
WITH p_koausz EQ lc_x
WITH p_tape_t EQ lc_x
WITH e_option EQ lc_x
WITH m_match EQ lc_x
WITH p_bupro EQ lc_x
WITH p_statik EQ lc_x
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
KEEP IN SPOOL 'X'
AND RETURN.
rgds,
latheesh
Message was edited by: Latheesh Kaduthara
‎2006 Jun 14 7:40 AM
you need to write <b>submit with parameters</b> statement in R2 to call R1.
Regds
Manohar
‎2006 Jun 14 7:40 AM
Satheesh,
You can use SUBMIT. See synaxt below.
SUBMIT REPORT01
VIA SELECTION-SCREEN
USING SELECTION-SET 'VARIANT1'
USING SELECTION-SETS OF PROGRAM 'REPORT00'
AND RETURN.
you can refer ABAPDOC tcode for futher doc.
Rgds
TM
‎2006 Jun 14 7:45 AM
I think this is the version of submit you want, as long as report1 and 2 have identical selection screens:
submit report2 WITH SELECTION-TABLE seltab
Effect
seltab is an internal table with the structure RSPARAMS.
This variant allows you to set the names and contents of the parameters and selection options dynamically at runtime.
You can use the function module RS_REFRESH_FROM_SELECTOPTIONS to read the contents of the parameters and selection options of the current program into an internal table seltab with the structure RSPARAMS. By using SUBMIT ... WITH SELECTION-TABLE seltab, you can then pass these values on directly.
‎2006 Jun 14 7:41 AM
Submit r1 inside the report r2.
SUBMIT Report(r1) VIA SELECTION-SCREEN
AND RETURN
‎2006 Jun 14 7:41 AM
Hi,
See the code below for ur requirement:
suppose u want to call R1 inside r2 .
inside r2:
Call to r1 AND Pass the below mentioned
values
SUBMIT r1 WITH einlesen EQ lc_x
WITH headfile EQ lv_source
WITH bankid EQ lc_bacs
WITH mregel EQ lc_session
WITH pa_mode EQ lc_post_method
WITH valut_on EQ lc_x
WITH pa_xcall EQ lc_x
WITH batch EQ lc_x
WITH spool EQ lc_x
WITH p_koausz EQ lc_x
WITH p_tape_t EQ lc_x
WITH e_option EQ lc_x
WITH m_match EQ lc_x
WITH p_bupro EQ lc_x
WITH p_statik EQ lc_x
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
KEEP IN SPOOL 'X'
AND RETURN.
rgds,
latheesh
Message was edited by: Latheesh Kaduthara
‎2006 Jun 14 7:43 AM
Hi Satheesh,
You can execute a program within another program using the statement SUBMIT.
Suppose you want to provide values for fields in program r1 , you can use the submit statement like this within R2.
SUBMIT R1 WITH FIELD1 = 'VALUE1'
WITH FIELD2 = 'VALUE2'
AND RETURN.
This will provide the values to the fields in R1 and execute the program after that.
If you want to just provide values to the fields in R1 program, you can use VIA SELECTION-SCREEN addition after specifying the R1 program.
SUBMIT R1 VIA SELECTION SCREEN WITH FIELD1 = 'VALUE1'
WITH FIELD2 = 'VALUE2'
AND RETURN.
Regards,
SP.
‎2006 Jun 14 7:43 AM
Hi,
You can do this by using the
Submit r1 via selection screen.
in your r2 program.
Pls reward useful answers.
Regards,
Ram Mohan
‎2006 Jun 14 12:50 PM
Hi sateesh,
suppose if there is selection screen for r2 and u want to pass some values to that parameters u can try this
SUBMIT r1
VIA SELECTION-SCREEN
USING SELECTION-SET 'VARIANT1'
USING SELECTION-SETS OF PROGRAM 'REPORT00'
AND RETURN.
and if there is no selection screen for report r1 even though u want to pass values to particular varibles ussing EXPORT.. ID and u caIMPORT in r1.
and if there is no need to pass pass any values into R1 just simply SUBMIT r1 AND RETURN.
Regards,
Ramesh.