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

Parameters Behaviour, While passing from FM!!

Former Member
0 Likes
1,184

Hi Experts,

When I am passing the parameters from z_FM to a report prog., the parameters behaviour is like(observed in debug mode),

1st case:

I defined NAME as 25 CHAR.

I am passing NAME as KIND of P i.e. Parameter, with value of Nancy so, When its passing, the Nancy is taking 15 <i>SPACES</i> as Prefix(right justifying) and there by the data is not pulling from DB.

So, I fixed it by using CONDENCE NAME, then the data is fetching.

2ns case:

When I am passing DATE field as KIND of 'S' i.e. SELECT-OPTION, I hv given LOW vaue as 20070609; then the data is not pulling (even thogh the the data is there) and the error is Lower value is higher than HIgher value!

So, I moved zeros to HIGH value, then the data is retrieving.

When I enter directly from Selection screen, these both r not happening!

So,

1) Why 'P' (parameter) is taking (15)<b><i>SPACES</i></b> as Prefix in NAME filed?

2) Why DATE field is treating as some value, even though I did not enter any value in HIGH column?

3) OR, Is some thing wrong in my code?

thanq.

Message was edited by:

Srikhar

Message was edited by:

Srikhar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,156

while entering the data in selection-screen ,keep the break point at your code ,see the date format is coming properly,i think you should not pass any value to High .

if you pass high value is 000000 like you may get wrong results.

can i see ur code ?

11 REPLIES 11
Read only

Former Member
0 Likes
1,156

Hi Srikhaar,

1) Why 'P' (parameter) is taking Zeros as Prefix in NAME filed?

When you have a parameter with char 25 and you are filling only 10 places then rest are automatically inserted as space. If you don't want the spaces use CONDENSE, which you are already doing.

2) Why DATE field is treating as some value, even though I did not enter any value in HIGH column? 3) OR, Is some thing wrong in my code?

There must be something wrong in your code. If you are using SUBMIT then while passing Select-options you have to Use IN.

Reward points if useful.

Regards,

Atish

Read only

0 Likes
1,156

ThanQ.

OK, ll figure it out the wrong code. Yes, am using IN operator in selec-options in SUBMIT. anyhow, ll trace out the mistake.

thanq.

Read only

Former Member
0 Likes
1,157

while entering the data in selection-screen ,keep the break point at your code ,see the date format is coming properly,i think you should not pass any value to High .

if you pass high value is 000000 like you may get wrong results.

can i see ur code ?

Read only

0 Likes
1,156

ThanQ Shehsu,

Yes, I did.

I ran the Report prog. from Selction screen (given lower value as 05092007) by keeping the break point in order to observe the higher value in DATE. And I found that, the system is passing the 00000000(I did not entered any thing in Higher, I left it as its) value for HIGHER column!

So, do u think that, problem is in selection screen?

thanq.

Read only

0 Likes
1,156

Okay ,time being keep it like ,if you encounter problem again ,you need to change higher value as default.

I had bad experience about this in 4.6B version ,it was SAP Bug..

Read only

0 Likes
1,156

Time being?

<b>So, no wrong data wuld b pulled, if I move 00000000 in HIGHER column?</b>

SAP Bug?

my DATE/SELECT-OPTIONS/HIGH/00000000 example?

Is it corrected in advanced versions?

thanq.

Read only

0 Likes
1,156

Yep,you will not have any problem

Read only

0 Likes
1,156

Hi Sheshu,

Pls.clarify,

<i>you need to change higher value as default.</i>

<i>U mean MOVE INITIAL VALUES TO DATE-HIGH</i> ??

thanq.

Read only

0 Likes
1,156

Yes ,you are right,keep always default value in High range ( Initial value )

Read only

0 Likes
1,156

Hi Sheshu,

Yes, I moved Initila value to my_DATE-HIGH, its working fine.

So, I hv some other fields(say, my_name), with CHAR, so I dont think its necessory to MOVE INITIAL VALUE to my_name-HIGH i.e. to a CHAR type field!

Is my guess is correct?

thanq.

Read only

0 Likes
1,156

not required to char type field