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: 

HOW TO SET A DEAFULT VALUE FOR A FIELD?

Former Member
0 Kudos

hi friends

i have doubt..how to set a default value for a field..say like in local printer field i always want lp01 to be displayed defaultly..when i click F1 in that field i get the parameter id ..i know there is something dealt with that parameter id..how can i set that default value ..in the case of the default printer value i made in own data settings as lp01 but how to do it normally for other field which has parameter id ??????

thanks and regards

prince

1 ACCEPTED SOLUTION

Former Member
0 Kudos

1. Execute the transaction 'SU3'

2. Click on the 'Parameters' tab

3. Give the parameter ID(obtained from F1 help) in the Parameter ID column and an appropriate value in Parameter value

4. Save the changes

7 REPLIES 7

Former Member
0 Kudos

Hi

In selection screen use like.

PARAMETERS : p1 like i default '10'.

FOR a field use like this.

DATA:p1 like i value '10'.

Former Member
0 Kudos

HI,

For parameter in Report program , at the time of its declaration, You can assign Default value by DEFAULT addition.

For ranges of values in SELECT-OPTIONS use FOR addition.

0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Prince,

u can set the default value in abap as given below

SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

SELECTION-SCREEN SKIP 1.

PARAMETERS : S_BUKRS TYPE BSID-BUKRS OBLIGATORY DEFAULT '1000'.

PARAMETERS : S_BELNR TYPE BELNR_D OBLIGATORY DEFAULT '1600000070'.

PARAMETERS : S_GJAHR TYPE GJAHR OBLIGATORY DEFAULT '2008'.

PARAMETERS : ASON TYPE BUDAT OBLIGATORY DEFAULT SY-DATUM.

PARAMETERS : S_KUNNR TYPE KUNNR MODIF ID GP1.

PARAMETERS : S_LIFNR TYPE LIFNR MODIF ID GP2.

SELECTION-SCREEN SKIP 1.

SELECTION-SCREEN : END OF BLOCK B1.

or

u can give the default value in INITIALIZATION also.

vlue = '1000'.

Former Member
0 Kudos

for SAP program you should use BADI.

Former Member
0 Kudos

1. Execute the transaction 'SU3'

2. Click on the 'Parameters' tab

3. Give the parameter ID(obtained from F1 help) in the Parameter ID column and an appropriate value in Parameter value

4. Save the changes

0 Kudos

excellent rajesh...

points r behind u

this is vat i was looking for

thanks a lot

prince