2006 Aug 21 11:00 PM
HI,
Could you tell me when calling report using Submit. can i pass variables. If I can, then variables in calling program and passing program must be same or not.
Regards
Reddy
2006 Aug 21 11:01 PM
Hi,
You can pass the values in the parameters or select-options of the submit program.
Thanks,
Naren
2006 Aug 21 11:09 PM
HI,
SUBMIT COSTREV_BUILD
WITH B_PROJ-LOW EQ I_PROJ-GSPID
WITH ENDDAT EQ BUDAT
WITH P_LEGCO EQ BUDAT
AND RETURN.
the 3 variables I_PROJ-GSPID,BUDAT and BUDAT are input values using parameter.
Regards
Reddy
2006 Aug 21 11:12 PM
Hi,
Yes..This might work..If B_PROJ-LOW, ENDDAT and P_LEGCO are declared as parameter or select-options..
Thanks,
Naren
Message was edited by: Narendran Muthukumaran
2006 Aug 21 11:17 PM
Variables must be same in both the reports or is there any FM or something else which converts data.
Regards
Chandu
2006 Aug 21 11:22 PM
>>Variables must be same in both the reports
NO.. but they must of the same TYPE though..
~Suresh
2006 Aug 21 11:23 PM
Hi,
In the submit program the variables should be declared as parameters or select-options..
Details...
REPORT Z_REPORT.
parameters: p_matnr type matnr.
write: / p_matnr.
REPORT Z_CALLING_REPORT.
SUBMIT Z_REPORT WITH P_MATNR = 'ABC'.
Thanks,
Naren
2006 Aug 22 12:14 AM
Hi,
In both the reports the variables passing are of same type. My problem is, how this data is going to compare with the <COSTREV_BUILD> report. It means I am passing ID,date and a flag. Even though same variables have to be given when the <COSTREV_BUILD> program is run individually. Now i am not given any input data in the <COSTREV_BUILD> program. I am just calling the report. Then how it would be EQ.
SUBMIT COSTREV_BUILD
WITH B_PROJ-LOW EQ I_PROJ-GSPID
WITH ENDDAT EQ BUDAT
WITH P_LEGCO EQ BUDAT
AND RETURN.
Regards
Reddy.
2006 Aug 22 12:49 AM
>>I am just calling the report. Then how it would be EQ?
You will have to put I_PROJ-GSPID & BUDAt as sel scr parameters in your custom report & fill them.. only hen the values will be passed on via the SUBMIT statement..
~Suresh
2006 Aug 22 6:40 AM
Hi chandu,
1. using Submit. can i pass variables
NO. We cannot do this directly.
2. There are two available options :
a) if there are parameters in the selection screen
of the SUBMITTED program.
b) using EXPORT in the main program,
and IMPORT in the submitted program.
3. In your case,
use (in the main program)
EXPORT MYVAR TO MEMORY ID 'MYVAR'
In submitted program,
declare the variable of same type, same name,
and use
IMPORT MYVAR FROM MEMORY ID 'MYVAR'
4. This will work fantastic.
regards,
amit m.
2006 Aug 22 10:41 AM
Hi,
SUBMIT COSTREV_BUILD
WITH B_PROJ-LOW EQ I_PROJ-GSPID "ID NO
WITH B_PROJ-LOW EQ BUDAT "date
WITH P_LEGO EQ GP_LEGO "check flag
AND RETURN.
the 3 variables I_PROJ-GSPID,BUDAT and GP_LEGO are input values using parameter in custom program. where as B_PROJ-LOW ,B_PROJ-LOW AND P_LEGO are the input variables with different names but are of same type in the submit program. If we run submit program separately it is working fine. When we pass this variables it is not giving the required output.
plz tell me how the above submit syntax working like.
Regards
Chandu
2006 Aug 22 10:49 AM
Hi
The syntax is like this
SUBMIT <ZPROGRAM> VIA SELECTION SCREEN AND RETURN.
Hope thsi Helps
Anirban
2006 Aug 22 10:54 AM
hi,
SUBMIT COSTREV_BUILD
WITH B_PROJ-LOW EQ I_PROJ-GSPID "ID NO
WITH B_PROJ-LOW EQ BUDAT "date
WITH P_LEGO EQ GP_LEGO "check flag
AND RETURN.
Are B_PROJ and P_LEGO declared with the same name and type in program COSTREV_BUILD?
Regards,
Sailaja.
2006 Aug 22 11:00 AM
2006 Aug 22 11:13 AM
Hey Chandu,
First U need to check passing parameters and assigning parameters are same? R both are select-options OR Parameters?
I will send u sample code, try this
<b>PROG1</b>
TABLES: KNA1.
SELECT-OPTIONS: s_kunnr FOR kna1-kunnr.
START-OF-SELECTION.
SUBMIT ZCK_CHECK WITH S_CUST IN S_KUNNR
AND RETURN.
<b>PROG2 - ZCK_CHECK</b>
TABLES: KNA1, VBAK.
DATA: itab like vbak occurs 0 with header line.
SELECT-OPTIONS: s_cust FOR kna1-kunnr.
START-OF-SELECTION.
break-point.
Select * from vbak into table itab
where kunnr in s_cust.
END-OF-SELECTION.
Loop at itab.
write:/ itab-vbeln.
Endloop.
Test this, if helpful and resolves ur problem,
Reward points.
Rgds,
Chandu