Application Development 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: 

Parameter not showing default value.

Former Member
0 Kudos

I have a parameter type quan, and I need that it shows the default value (0) when first loading the screen. The problem is that when the value is set to 0, even if the parameter's value is 0 all right nothing appears in the screen. What can I do?

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

As it is P type field, blank or initial means 0. Same is the case with i and n type.

If you declare it as C type and pass '0' to it, then you can see the value 0 on selection screen.

Suggestion: Declare the parameter as charater type and then in the program, pass this value to a quan type local variable.

Regards

Navneet

10 REPLIES 10

0 Kudos

declare it in initialization..

Former Member
0 Kudos

I had already tried that.

It doesn't show it.

varma_narayana
Active Contributor
0 Kudos

Hi..

What is the Data type used to Declare the PARAMETER?

If it is N, I, P Then it will display the 0.

Try this..

PARAMETERS : P_NUM(2) TYPE N DEFAULT '0'.

reward if Helpful.

0 Kudos

I need the type to be like this:

select-options d_verb1 for iverb-verb1 no-extension no intervals
                                       default '0.000' option gt.

0 Kudos

Hi..

Since you are assigning 0 it will not display it Explicitly . But internally it stores 0.

But if u give any other value like below. then it will display. So u need not to worry about displaying the 0 .

<b>select-options d_verb1 for iverb-verb1 no-extension no intervals

default '1.000' option gt.</b>

REWARD IF HELPFUL.

Former Member
0 Kudos

initialization.

var = 0.

Now u can see this on selection screen.

But if u want to default it....then in start of selection.....

if var is initial.

var = 0.

endif.

so that even if user clears the default value in selection screen , this value is considered......

But this will be accoring to ur requirement.

Regards

Vasu

Former Member
0 Kudos

Hi

As it is P type field, blank or initial means 0. Same is the case with i and n type.

If you declare it as C type and pass '0' to it, then you can see the value 0 on selection screen.

Suggestion: Declare the parameter as charater type and then in the program, pass this value to a quan type local variable.

Regards

Navneet

Former Member
0 Kudos

HI

declare the parameter values under the INITIALIZATION EVENT

then it will display

like this

INITIALIZATION.

P_WERKS = '00'.

<b>Reward if usefull</b>

Former Member
0 Kudos

Hi Soledad,

I think 0 is the default value for QUAN type so it is not getting displayed there

Former Member
0 Kudos

Hi,

Try like this

parameters: p_quant1 type labst.

parameters: p_quant2 type labst.

parameters: p_quant3 type labst.

reward if useful.