We know about mass changes.

We can change a field value from mass changes with the given value..

But some business logic needs one field value should be same as a another field.

Here with the help of some coding we can carry mass changes from one field to another field.

Jürgen Sir replied in this thread the exact procedure, which helps me a lot to make the document, its almost help me 90% to make this document.

A lots of thanks to Jürgen Sir.

Lets discuss about requirement and step by step procedure.

Suppose we have two fields in material master.

1. Reorder Point (MARC-MINBE)

2. Maximum Lot Size (MARC-BSTMA).

We have some value in field Maximum Lot Size (MARC-BSTMA)..

ScreenShot.jpg

Here we can see we have a value only field Maximum Lot Size (MARC-BSTMA), bur we haven’t any value in Reorder Point (MARC-MINBE)

Now we have enter the value to Reorder Point (MARC-MINBE) field. But the condition will be that Value should be same as field Maximum Lot Size (MARC-BSTMA) with respective material.

It means for material TUPUCOZ5215, BSTMA value is 500, so the field value of MINBE will be also 500 for this material.

And also for material TUPUCOZ5216, BSTMA value is 600, so the field value of MINBE will be also 600 for this material.

Here we can change the value for field MINBE as respective to field BSTMA.

Use t-code MASS (you can use MM17 directly for material mass changes)

Use the Object Type as BUS1001

You can see the initial screen

Click on the tab Fields, and select the field MARC-MINBE and MARC-BSTMA

ScreenShot.jpg

Now press Execute.

ScreenShot.jpg

Give your all material with respective plant.

Then press execute.

ScreenShot.jpg

You can see the initial screen appear for mass changes.

We can see our two fields Reorder Point and Maximum Lot size.

We can see we have some value in field Maximum Lot Size.

Now we have to fill out the field Reorder Point as copy from Maximum Lot Size with respective material.

Now Move your mouse pointer to Reorder Point, then click on Enter Formula/FORM Routines.

ScreenShot.jpg

Press the option as shown in above figure or you can also find this from Application menu as shown as below screen.

ScreenShot.jpg

Now you can see a pop-up will come which will be like below screen.

ScreenShot.jpg

As we have to change the value for field Reorder Point, so we have to write a code for this field.

Now click on the ABAP which is right side of Reorder point.

Now the screen will be like below.

ScreenShot.jpg

Its a ABAP FORM routine.

We have to just add our own logic here..

As we have to fetch the field value from field Maximum Lot Size (MARC-BSTMA), So we have write as like below screen shot.

ScreenShot.jpg

As you can see I have just entered a line where X value will be as per value of BSTMA.

Don’t forget to give the dot (.)at the last of this line.

Then just press Ctrl+S or you can select Save from table as below screen shot.

ScreenShot.jpg

After press save, you will see the back screen as shown below

ScreenShot.jpg

Then press continue or enter.

You can see a text will come on the Reorder point field.

ScreenShot.jpg

Now our coding part is done.

Now you have to deselect the Maximum Lot Size field. If you continue without deselect this field, then the field value for Maximum Lot Size will remove.

Now press the option ScreenShot.jpg– Carry Out Mass Changes.

ScreenShot.jpg

(Note : Press only one time on Carry Out Mass Changes, if you press twice on this option, then the value will remove)

Now we can see the result.

Our Reorder Point replaced with the same value as Maximum lot Size with respective material.

Now we can save our data.

Press ScreenShot.jpg or you can press Ctrl+S.

Now you can see a success message like as below

ScreenShot.jpg

Now our all data saved.

Lets check the MARC table and the value for Reorder Point and as well as Maximum Lot Size.

ScreenShot.jpg

Here we can see our Reorder Point (MINBE) changed as per Maximum lot Size (BATMA) as per respective material.

Its not only for material master..

It will applicable for all mass changes.

Thanks and Regards

Dev Patra

To report this post you need to login first.

24 Comments

You must be Logged on to comment or reply to a post.

  1. James Farmer

    Cool document  – thanks for sharing… I see you can do even more things like ” IF field X is blank then field Y is ‘ABC’ etc. Might be usefully when doing some specific mass changes.

    (0) 
  2. Peter Pallen

    Nice document.

    I do think that most people will have issues doing this on a production system as you would need S_DEVELOP access and most companies do not allow this directly in production.

    (0) 
    1. Dibyendu Patra Post author

      Yes Sir, that’s true.. Your reply helps me a lot.

      I always made a mistake in coding part, so that my mass changes wasn’t working every time.

      But after your reply, its very clear to me.

      Yesterday evening I thought, it should be a document for step by step procedure.

      Anyway I have mentioned that in this document.

      And about this discussion, Yes, that was my mistake, Even I didn’t know that we can also remove characteristics from mass changes with coding..

      (0) 
  3. Sankar AK

    HI Dev,

             Really good doc and it’s useful. Instead of selecting two fields ( Reorder Point (MARC-MINBE),  Maximum Lot Size (MARC-BSTMA) ), we can choose only the field (MINBE here ) which we have to change/update. So, no need to deselect the other field which we don’t want to update. Whether my understanding is correct? Will it working fine?

    Thanks

    (0) 
    1. Dibyendu Patra Post author

      Yes it will working absolutely fine..

      I have used this just to shows that the quantity is coming same from BSTMA.

      No need to select this field.

      Just your coding part has to be right for the fetching field.

      (0) 

Leave a Reply