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

Parameter not showing default value.

Former Member
0 Likes
3,409

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

Former Member
0 Likes
2,062

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

abdulazeez12
Active Contributor
0 Likes
2,062

declare it in initialization..

Read only

0 Likes
2,062

I had already tried that.

It doesn't show it.

Read only

varma_narayana
Active Contributor
0 Likes
2,062

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.

Read only

0 Likes
2,062

I need the type to be like this:

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

Read only

0 Likes
2,062

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.

Read only

Former Member
0 Likes
2,062

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

Read only

Former Member
0 Likes
2,063

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

Read only

Former Member
0 Likes
2,062

HI

declare the parameter values under the INITIALIZATION EVENT

then it will display

like this

INITIALIZATION.

P_WERKS = '00'.

<b>Reward if usefull</b>

Read only

Former Member
0 Likes
2,062

Hi Soledad,

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

Read only

Former Member
0 Likes
2,062

Hi,

Try like this

parameters: p_quant1 type labst.

parameters: p_quant2 type labst.

parameters: p_quant3 type labst.

reward if useful.