cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove stocks from previous period in sales order

0 Kudos

Hi

We could see the value of field KAVLA(Valuated unrestricted-use stock in previous period) in MSKA table is not zero.

Can anyone help how to make it as zero.

I think we have to remove stocks from previous period to make it as zero(understood from the field definition).

I found note 30656 to remove stocks from previous period.

But is there any other easy way to remove them.

Accepted Solutions (0)

Answers (2)

Answers (2)

JL23
Active Contributor
0 Kudos

you wanted an alternative to OSS note 30656, and there is only one alternative: waiting until the current month (August) becomes the previous month, which is after you rolled the period to September., because then the current stock becomes previous period stock. And it has to be assumed that the current period stock is zero, otherwise it does not make any sense to think about archiving.

0 Kudos

Hi Jurgen

Thanks for your help.

We are archiving batches with MM_SPSTOCK.

Since it is directly dependent on sales documents, I took batches which is related to archived sales documents.

And I could not see these batches are not linked to any other sales documents in MSKA table.

But when I try to archive those batches, getting error as dependent sales order exist.

May I know what is causing the error.

FYI, this is done is test system which is a copy of Production system data.

JL23
Active Contributor
0 Kudos

post a screenshot of your selection screen, so that we are able to know if you are archiving special stock (MSKA) or the entire batch (MCHA, MCH1 and MCHB). I currently believe you are doing the latter and thats why it says it can't because you have a MSKA record.

0 Kudos

Hi jurgen

Currently we have given material number, plant and batches as input.

Didn't select consignment or other special stocks.

JL23
Active Contributor
0 Kudos

exact what I assumed.

First archive the special stock, and later the entire batch.

0 Kudos

Thanks a lot Jurgen.

It seems to be working. But all special stocks related to given material number and plant are archived.

Is there any way to restrict.

I am afraid the special stocks which are new also will get archived.

JL23
Active Contributor
0 Kudos

If your batch level is different from plant level, then you must not enter the plant in the selection otherwise everything is selected, which is designed that way: 2072507 - Archiving object MM_SPSTOCK ignores batch selection criteria at plant level

0 Kudos

Hi Jurgen

In our case batch level is unique at material level.

And I got the point Archiving object MM_SPSTOCK ignores batch selection criteria at plant level.

I want to archive special stocks for specific time period.

Is there any way to restrict archive special stock for a time period.

The special stocks which are new must not get archived.

JL23
Active Contributor
0 Kudos

I have not seen any further restriction with special stocks, you may have to check for Badis to have some influence. eventually BADI_MM_SPSTOCK

0 Kudos

Thanks for your comments jurgen.

I will try it.

1) But is it mandatory to archive special stocks before archiving batches.

2) we archived batches without archiving special stocks in Dev system. So what will be the cause here to archive special stocks before doing batches.

JL23
Active Contributor
0 Kudos

didn't you have the error: MCHA: XXXXXXXXX dependent sales order stock records exist.

before you archived the special stocks?

0 Kudos

Hi Jurgen

I understood we are archiving special stocks since there was a error "MCHA: XXXXXXXXX dependent sales order stock records exist" and there is no way to restrict special stocks for archiving.

Will there be any effect if we archive the special stocks completely.

Is it the best practice or mandatory to archive special stocks before archiving batches?.

JL23
Active Contributor
0 Kudos

again, you get the error message "MCHA: XXXXXXXXX dependent sales order stock records exist" when you try to archive batches, so what other evidence do you need that special stock has to be archived prior to the batches itself?

Yes, there will be obstacles if you archive more than you want e.g. in the rare case of a customer return you may get the error message that the batch does not exist, and then you need to create it manually before you can process your customer return. The MB5B report also has wrong results if the user forgets to set the flag for option 'Also Batches w/o Stock Segment' .

0 Kudos

Hi Jurgen

I understand it is the best practice to archive special stocks before archiving batches.

Does this below comment of yours refers to impact of archiving all special stocks?

Yes, there will be obstacles if you archive more than you want e.g. in the rare case of a customer return you may get the error message that the batch does not exist, and then you need to create it manually before you can process your customer return. The MB5B report also has wrong results if the user forgets to set the flag for option 'Also Batches w/o Stock Segment' .

I am just stuck here without understanding the exact impact of archiving MSKA table.

Suppose we have to archive batches till year 2013, We can restrict batches giving retention period. Whereas the special stocks will get archived till 2017 since they can't be restricted.

0 Kudos

Hi Jurgen

Thanks a lot for your answers.They were so helpful.

We were finally successful with archiving batches.

JL23
Active Contributor
0 Kudos

Make sure you have no stock in August and wait until we have September.

0 Kudos

Hi Jurgen

Actually these are old data we are trying to archive in test system.

So we want to make that field as zero to proceed for archiving.

Is there any way to make it zero.

Also I didn't get your point to wait till September.