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

Set default value to selection screen for report

Former Member
0 Likes
4,283

Hi All,

I've a report selection screen which has 3 fields from the report category: PNPPERNR, PNPSTAT1, PNPBTRTL. My logical database is PNPCE.

How can I set the default value to the field PNPSTAT1? Means when I first display the selection screen, the value for this field will automatically display '3' in it.

Hope someone can help me on this.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,239

Hi All,

Thanks for reply. But I think I should declare my question clearer.

Actually it's not a parameter.

My problem is when using the logical database, if you define a TABLES: PERNR, then you can see the SAP standard report selection screen. So my selection screen has 3 standard fields which are PNPPERNR, PNPSTAT1, and PNPBTRTL.

I need to set the default value '3' to field PNPSTAT1.

Thanks.

15 REPLIES 15
Read only

Former Member
0 Likes
2,239

in the initialization event

(or)

in the parameters statement u can have an Extension for default, it is 'VALUE'.

Hope this will solve ur problem..

<b><u>Dont forget to reward all the useful replies</u></b>

Sudheer

Read only

Former Member
0 Likes
2,239

hi Sam,

Check out the below example

 Parameter : P_param like mara-matnr default '00000000010'.

Regards,

Santosh

Read only

Former Member
0 Likes
2,239

Hi,

We can set the default values in the initialization event.

Reward points if it is helpful

regards,

Sangeetha.a

Read only

Former Member
0 Likes
2,239

PARAMETERS matnr LIKE mara-matnr DEFAULT '19931224'

Read only

Former Member
0 Likes
2,240

Hi All,

Thanks for reply. But I think I should declare my question clearer.

Actually it's not a parameter.

My problem is when using the logical database, if you define a TABLES: PERNR, then you can see the SAP standard report selection screen. So my selection screen has 3 standard fields which are PNPPERNR, PNPSTAT1, and PNPBTRTL.

I need to set the default value '3' to field PNPSTAT1.

Thanks.

Read only

0 Likes
2,238

Did u try INITIALIZATION event

Read only

0 Likes
2,238

You can use the intialisation event.

before start-of-selection and after selection screen declaration.

write


Initialization.
PNPSTAT1 = '3'.

Regards

Gopi

Read only

0 Likes
2,238

Hi

Just as a guy said you, u can use the INITIALIZATION event:

PNPSTAT1(3) = 'IEQ'.

PNPSTAT1-LOW = '3'.

APPEND PNPSTAT1.

Max

Read only

0 Likes
2,238

Yes, I've tried to define in INITIALIZATION event.

INITIALIZATION.

PNPSTAT1 = '3'.

and

INITIALIZATION.

PNPSTAT1-LOW = '3'.

Both methods also not work.

Read only

0 Likes
2,238

Hi Gopi,

Did you mean I've to declare twice? One before START-OF-SELECTION and one after selection screen declaration.

Read only

0 Likes
2,238

No i dint mean it.

Just declare it after ur selection screen declaration.

Sorry for confusing

Regards

Gopi

Read only

0 Likes
2,238

Hi

Excuse me I forgot a piece of code, this the right code and it works fine for me:

PNPSTAT1(3) = 'IEQ'.

PNPSTAT1-LOW = '3'.

APPEND PNPSTAT1.

Max

Read only

0 Likes
2,238

Hi Max,

It's works

Thanks a lot.

Read only

Former Member
0 Likes
2,238

You can use 'default' clause but u can also use Variants. As once u have created the variant u need not to enter those values again and again. Selecting a particular saved variant will input the same vales as u want.

Cheers, Harsha

Read only

Former Member
0 Likes
2,238

hi irene,

if PNPSTAT1 is a parameter then writewhile declaring as

parameters: PNPSTAT1 like xxxx-yyyy default 3.

if helpful reward some points.

with regards,

suresh babu aluri.