cancel
Showing results for 
Search instead for 
Did you mean: 

Change Costing Lot Size value by default from 1 to 100 in MM03

shahad009
Participant
0 Kudos

Hi Experts,

My requirement is When I enter the T-Code MM03 and give a material number and hit enter. Then in the Costing 1 tab there is field called Costing lot size which value is by default 1.

I want to set it as 100.

How can I achieve that?

Regards

View Entire Topic
venkateswaran_k
Active Contributor
0 Kudos

Hi shahad009

In the BAdi

You will have the interface - method CREATE_MATERIAL.

Implement that method as below example

  method IF_EX_MATERIAL_REFERENCE~CREATE_MATERIAL.
* BREAK-POINT.
IF i_mara-mtart eq 'ZFRT' OR i_mara-mtart eq 'ZSMI'.
e_marcu-losgr = '100'.
ENDIF.
endmethod.

You may modify the if statement as per your requirement.

shahad009
Participant
0 Kudos

Hi venkat,

In my system there is no badi called zbadi_material_referance but there is badi called badi_material_referance.

So, what should I do?

venkateswaran_k
Active Contributor
0 Kudos

Go to SE18

Enter - BADI_MATERIAL_REF - Display

Choose from Menu - Implementation - Create

Enter the new name as you wish - ZBADI_MATERIAL_REF

Press Okay

After that you can go to Interface tab

You will find the create Interface

Implement that.

shahad009
Participant
0 Kudos

hi venkat,

Its not working.. still the costing lot size is 1.

I am attaching two screens image in the below.

sdn2.png

sdn3.png

venkateswaran_k
Active Contributor
0 Kudos

shahad009

It should work...

Did you try creating new material?

If you see MM03 in old material , it will show the old existing value.

This interface will default it to 100 for any new material created hereafter.

Sandra_Rossi
Active Contributor
0 Kudos

shahad009 What means "not working"? Did you debug? Do you reach the line e_marcu-losgr = '100' ?

NB: 1) please embed the screenshots as below, not hyperlinks, 2) code is better shared using text as below rather than screenshot.

  method IF_EX_MATERIAL_REFERENCE~CREATE_MATERIAL.
*    BREAK-POINT.
    IF i_mara-mtart eq 'ZGMT'.
     e_marcu-losgr = '100'.
    ENDIF.
  endmethod.
shahad009
Participant
0 Kudos

hi venkat,

I tried it in sandbox and my mm consultant created a new material with ZGMT material type but still it is showing 1 he is saying.

can you tell me how can i debug this ?

I mean i tried to debug it after giving a material number in mm03 and di '/h' but i am not getting where the value is getting set as 1 or 100.

shahad009
Participant
0 Kudos

Hi sandra,

Can You pls guide me to debug this ?...

I tried to debug using '/H' after giving material in MM03 but not getting any clue.

venkateswaran_k
Active Contributor
0 Kudos

Hi

In the code there is already a statemet called BREAK-POINT.

Either you can uncomment that use BREAK-POINT.

Or you can use BREAK <your user id>.

Once executed - create material ... it will stop there.

Then you can see where it is missing.

Regards,

Venkat