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.
Showing results for 
Search instead for 
Did you mean: 

Set default value to a field in MM01

Former Member
0 Kudos

Hi Friends ,

Can anyone tell me that how can set a default value to field "Rounding Value" in tab "MRP1" when i go to transaction "MM01" . I tried to search user exit/Badi for the same but i didn't get OR can say not able to find.





Former Member
0 Kudos


have you tried to check is there any field exit for that field. Look for a field exit it will help you.



Former Member
0 Kudos

Hi Nandakishore,

Go and create the field exit(function module)


Hope this will help you.

Warm Regards,


Allot points if your query solved.

Message was edited by: Vinod Pattaparla

0 Kudos

hi Vinod / Srini / Raj

Can you explore that what code should i write in field exit ( function module ). As per my understanding field exit will trigger only when you press ENTER or TAB after placing the cursor to that field and my requirement is to set the initial value to the fields as you reach to that screen.

Please help me .

Thanks in advance


0 Kudos

Hi Kishor,

You are correct about the field exit. The code in the field exit will only be called when the user performs some action that causes the screen to rebuild. Further more, the user exit will only be executed when that field is designated as an INPUT field. Thus, if the field is not open for input, it won't do anything.

There is an OSS note 29377 that will give you some more details on field exits.

Hope this helps,



0 Kudos

Hi Brent ,

Can you tell me how can i set/change the value to this field at the time of saving MM01/MM02 , regardless of displaying the default value to this field.

Just want to change the value of this field at the time of saving.



0 Kudos

Have you considered the config option in my other response?

Former Member
0 Kudos

Hi Nandkishor,

If the requirement is across all modules, do create field exit with name FIELD_EXIT_BSTRF.

Otherwise go for extensions like FIELD_EXIT_BSTRF_A etc.



Former Member
0 Kudos

In config, there is something called a rounding profile which I think will help you achieve what you want. Here is the path to the config task.

Implementation Guide for R/3 Customizing (IMG)
-->Logistics - General
   -->Quantity Optimizing and Allowed Logistics Units of Measure
      -->Maintain Rounding Profile

Here is the documentation related to that task.

<i>Maintain Rounding Profile

In this step you define rounding profiles for adjusting units of measure to match delivery or transport units.

Rounding profiles can be maintained on a general or plant-specific basis. General maintenance is recommended as this requires you to enter less data.

A distinction is made between static and dynamic rounding profiles.

A static rounding profile comprises the following:

Threshold value

Rounding value

The threshold value is the value from which the system rounds up to the next delivery quantity.

The rounding value is the value to which the system rounds up as soon as the threshold value has been reached.

Several combinations of threshold and rounding values can be defined for rounding profiles.

No logistics units of measure are taken into account with static rounding profiles. This means that the system rounds up statically to the rounding values entered in the profile and not to "full pallets", for example.

Dynamic rounding profiles comprise the following:

Rounding method

Rounding rule

Indicator to show that units of measure are to be condisered only if they are allowed for the vendor or recipient.

The rounding method controls how the system rounds off:

No rounding

Rounding to a multiple of the order or sales unit

Rounding to order or sales unit, and to logistics units

No rounding

You have to define an additional rounding rule if you want your profile to round off to whole logistics units. This rounding rule is the key used for grouping logistics units of measure. The group contains all the units to which the system can round off when using the profile.

You can also have the system include only those logistics units that are allowed for the vendor or recipient. Allowed units of measure are defined in unit of measure groups that can be used at material-vendor level or at material-plant level.


a) Static rounding profile

A material has a base unit of measure of 1 piece. Purchases are made in cases (1 case = 5 pieces) or pallets (1 pallets = 8 cases or 40 pieces).

You maintain the static rounding profile as follows:

From To Rounded to

01 05 05

06 10 10

11 15 15

16 20 20

21 25 25

26 30 30

31 31 35

32 40 40

41 45 45

46 50 50

. . .

66 70 70

71 71 75

72 80 80

81 85 85

. . .

b) Dynamic rounding profile

To procure materials in lower price bands, you define rounding rules containing all pallets and cases that the relevant vendors can deliver. You enter a percentage for every pallet and case category that indicates the level to which a quantity is to be rounded up to the next unit of measure.

Rounding rule 01

Unit of measure Round up as of

Euro pallet 70% full

Pallet category 2 80% full

Case for euro pallet 65% full

Case category 2 75% full

You maintain a dynamic rounding profile using the rounding method "round to whole logistics units" and assign the profile rounding rule 01.

A material has a base unit of measure of 1 piece. Purchases are made in cases (1 case = 5 pieces) or pallets (1 pallet = 8 cases or 40 pieces). The system then rounds an order quantity of 68 pieces (= 40 + 28) to 2 Euro Pallets (= 80 pieces) because the second pallet is already 70% full.</i>

Hope this helps,