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

submit program with parameters

Former Member
0 Likes
1,477

Hi,

I have the following problem :

I have program A calling program B and need to pass a parameter. I have the following code currently :

programA :

...

data lv_dataset TYPE string

...

SUBMIT programB WITH s_con IN lt_p_con

WITH dataset = lv_dataset

.....

programB

PARAMETERS: dataset TYPE string.

....

However, i need to know what type to declare lv_dataset to as i get the error

"Wrong type passing parameters to "DATASET""

at runtime when i execute programA.

Please help as i cant see whats wrong!

3 REPLIES 3
Read only

Former Member
0 Likes
453

.

Edited by: GTREN on Sep 8, 2009 6:17 PM

Read only

Former Member
0 Likes
453

Hi Samir Vora ,

Try this:

data lv_dataset TYPE SY-DSNAM

...

SUBMIT programB WITH s_con IN lt_p_con

WITH dataset = lv_dataset

.....

programB

PARAMETERS: dataset TYPE SY-DSNAM.

And i recommend changing the name of the parameter "dataset" because it is a reserved word.

Hope this information is help to you.

Regards,

José

Read only

Former Member
0 Likes
453

Hi ,

You need to keep the datatype of parameters of report A and B same.

Also , parameters should be passed by EQ OR = and select option by using IN.

That's the basic rule.