Skip to Content
0

How to remove stocks from previous period in sales order

Aug 02, 2017 at 10:11 AM

112

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Jürgen L
Aug 02, 2017 at 10:58 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0
Jürgen L
Aug 02, 2017 at 11:38 AM
0

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.

Show 14 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0

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
Former Member

Hi jurgen

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

Didn't select consignment or other special stocks.

0

exact what I assumed.

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

0
Former Member

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.

0

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
Former Member

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.

0

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
Former Member

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.

0

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

before you archived the special stocks?

0
Former Member

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?.

0

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
Former Member

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
Former Member

Hi Jurgen

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

We were finally successful with archiving batches.

0