Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding Sumit report

Former Member
0 Likes
2,027

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

14 REPLIES 14
Read only

Former Member
0 Likes
1,847

Hi,

You can pass the values in the parameters or select-options of the submit program.

Thanks,

Naren

Read only

0 Likes
1,847

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

Read only

Former Member
0 Likes
1,847

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

Read only

0 Likes
1,847

Variables must be same in both the reports or is there any FM or something else which converts data.

Regards

Chandu

Read only

0 Likes
1,847

>>Variables must be same in both the reports

NO.. but they must of the same TYPE though..

~Suresh

Read only

Former Member
0 Likes
1,847

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

Read only

0 Likes
1,847

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.

Read only

0 Likes
1,847

>>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

Read only

Former Member
0 Likes
1,847

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.

Read only

Former Member
0 Likes
1,847

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

Read only

0 Likes
1,847

Hi

The syntax is like this

SUBMIT <ZPROGRAM> VIA SELECTION SCREEN AND RETURN.

Hope thsi Helps

Anirban

Read only

Former Member
0 Likes
1,847

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.

Read only

0 Likes
1,847

NO, There are with other names but same type.

Regards

Reddy

Read only

Former Member
0 Likes
1,847

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