cancel
Showing results for 
Search instead for 
Did you mean: 

How to Clear stock from closed stores (table MARD, MARH...)

Hi all,

Can someone help me out  how to delete old unused stock/plant(store).

I've been searching for days without any luck.

MM_SPSTOCK is used for archiving special stock.

I had a quick look at the object 'MM_SPSTOCK ' and it seems that

table MARD is not archived by this object.

I could be mistaken. TR AOBJ, transaction to verify

the object)

Does this object deletes all stock from closed stores(plants)?

I mean, is selection per plant possible in this object?

MM_MATNR is uses for archiving master material data and deletes only Material in MARD which meets

the archiving critera. Millions of records from closed plants resides in tables like MARD and MARH.

Can someone help me out  how to delete old unused stock/plant(store). Complete stock from closed plants should be removed.

Mvg,

Liaz.

Accepted Solutions (1)

Accepted Solutions (1)

tomasz_domanski
Contributor

Hi Liazed,

You may set deletion flags in Master Data via MM17, I guess it would work the same. Just select the correct table - MARC for plant lvl, MARD for storage location lvl and MARA if the whole material is to be removed.

BR,

Tomek

0 Kudos

Thx Tomasz,

Now we've flagged the table MARD.

We only want to delete the articles @ plant level in table MARD and are still being used for

other plants.

I think that before these lines are archived  from table MARD with object MMA_MATNR , these articles must also  be flagged for deletion in table MARA  or am i mistaken?This is not our goal.

Kind regards,

Liazed.

tomasz_domanski
Contributor
0 Kudos

If you want to remove only storage location level, then only MARD. If also Plant level then MARC & MARD. If you want to remove material as a whole then MARA, MARC, MARD (but to remove it like this system checks all open items containing the material like orders).

Regards,

Tomek

Answers (10)

Answers (10)

Hi,

I'am not speaking about reducing stock to zero so physical inventory is not the issue.

The stores are closed and have zero stock for all materials.

The records still exists in MARD, MARH. It means if you have

more then 200 000 articles , 200 000 records with qty 0 still exist in the database.

Is there a way to delete those records ?

These records are useless when the plant or store is closed.

Kind regards,

Liazed.

Hi,

Thx for the reply.

we have many stores which are closed.

Can you delete all stock via these transactions?

Kind regards,

Liazed.

Former Member

Have  you try with  Physical Inventory .

Do stock adjustment with inventory transaction - MI01, MI04 & MI07.

0 Kudos

Hi,

I've marked them in MARD, but I've tried all possibilities with MM_MATNR.

Can you send me the details because I've no option in that archiving object MM_MATNR to select only records from MARD.

Thx.

tomasz_domanski
Contributor
0 Kudos

Hi Liazed,

I just marked MARD deletion flag and run MM71 with variant specified for this single mtrl. As you can see in below log only MARD was taken into account. I can't run further as the system I used has no archive customizing done for this.

Production Mode: Statistics on Written Data Objects

Archive File Key                            001263-001MM_MATNR

Number of Written Data Objects                                1

Size of Archive File in MB                                0,040

Proportion of Header Data in %                             99,1

  Type                               No.         Description

  MARD                                        1  Storage Location Data for Material

  PRE01                                       1  Help structure for mass access to material

Summary

Archiving Session Number                                  001263

Number of Written Data Objects                                1

Size of Archiving Session in MB                           0,040

Proportion of Header Data in %                             99,1

  Type                               No.         Description

  MARD                                        1  Storage Location Data for Material

  PRE01                                       1  Help structure for mass access to material

  Log (Summary) for MM_MATNR

    Message (Example)                                                      Obj. Disp. Object (Example)

    MARD:  material master record was archived                                      1 TEST_DEL 4761 WRO1

But the preparation log seem to be fine.

So maybe you can share your logs from MM71 job logs for single mtrl ??

BR,

Tomek

0 Kudos

That's the whole issue .

As mentioned before , we know the archiving object MM_MATNR very well, but it's not what we need.

To archive articles via this object, you must flag the articles for deletion in table MARA and that's not an option as it would indeed a whole lot more then just open orders etc....

Regards,

Liazed.

0 Kudos

* check

tomasz_domanski
Contributor
0 Kudos

Hi Liazed,

From what I know, you do not need to do it on MARA level - you can mark it on MARD level only and only this would be archived. Have you actually tried this in MM71 this way?

BR,

Tomek

0 Kudos

Hi,

Thx for the reply.

It's impossible to flag all materials 1 by 1. We're speaking of millions of records as al materials exist per store.

Is there no easy way to mark all articles for deletion by plant or store?

Regards,

Liazed.

tomasz_domanski
Contributor
0 Kudos

Hi Bougoufa,

As I understand you should first use MM06 to mark the materials on the levels you want to archive them (plant & storage locations or just storage locations).

Having done this, SARA for object MM_MATNR (or simply MM71) should enable you to clear the MARD and MARC (if plant is also to be removed).

I do not know what is MARH really, maybe you meant some different table or?

Regards,

Tomek

0 Kudos

Hi,

that's the initial problem.

there's no archiving object for these records as you can see in my question...

archiving object: MM_SPSTOCK

is used for archiving special stock.

I had a quick look at the object 'MM_SPSTOCK ' and it seems that

table MARD is not archived by this object.

I could be mistaken. TR AOBJ, transaction to verify

the object)

Archiving object MM_MATNR

is uses for archiving master material data and deletes only Material in MARD which meets

the archiving critera. Millions of records from closed plants resides in tables like MARD and MARH.

Former Member
0 Kudos

then   go  with  Mass  maintenance  .

please   go through this  document

Former Member
0 Kudos

Closing  means  here  the  stock  will  be  reduced .

Ex :  If  the   stock  is    100 Qty  and  if we   do  physical inventory  we  can increase  to 200  qty  or reduce  to  0  quantity .

For  your case  its  0 qty