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

Default values to the parameter

Former Member
0 Likes
625

Hi All,

I have a requirement wherin i need to the set the default values to the parameter. The default value is fetched from a table.

Here in my program, i have fetched the value from the table into a variable say, lv_val.

In the selection screen i gave the parameter as below.

parameters: p_val01 type char(4) default lv_val.

When i execute the program i am not gatting any value as default to the parameter, eventhough the variable contains the data.

Can any one please suggest, how to go about this.

Thanks in advance.

Regards,

Durga.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
585

HI,

Thanks for the replies.

But I forgot to mention few points in my requirement.

In first screen i pass some values as input.Based on the values i get from the first screen i am making a call to the sub screen.

In this subscreen i need to get the deafult parameter values.

The select statement i use is deepnding on the values i get from the 1st screen as input.

Regards,

Durga.

4 REPLIES 4
Read only

Former Member
0 Likes
585

parameters:

p_val(4) type c.

set the default value under INITIALIZATION.

INITIALIZATION.

p_val = lv_val.

Read only

faisalatsap
Active Contributor
0 Likes
585

Hi, Ginkala

USE Event INITIALIZATION following way.

PARAMETERS: p_val01(4).

INITIALIZATION.
" do your select here after select

p_val01 = lv_val. " and after select add this line

Faisal

Read only

Former Member
0 Likes
586

HI,

Thanks for the replies.

But I forgot to mention few points in my requirement.

In first screen i pass some values as input.Based on the values i get from the first screen i am making a call to the sub screen.

In this subscreen i need to get the deafult parameter values.

The select statement i use is deepnding on the values i get from the 1st screen as input.

Regards,

Durga.

Read only

0 Likes
585

Hi, Durga

In PROCESS AFTER INPUT of 1st screen you are selecting some value from data base and you want to assign this value to your PARAMETER Simply do the following in PROCESS BEFORE OUTPUT of you SUBSCREEN.

p_val01 = lv_val. " here lv_val is the variable where you have select the Value and p_val01 is your parameter name.

Hope this time it will solve out your problem,

Best Regards,

Faisal