cancel
Showing results for 
Search instead for 
Did you mean: 

Problem on archieving Material Master

former_member287204
Participant
0 Kudos

Hi Experts,

I would like to ask something related to archieving Materials as below -

http://scn.sap.com/thread/828320

http://scn.sap.com/thread/1448884

After running "Test Mode" for a Material in Object - "MM_MATNR" of transaction - "SARA", found the error in the Log as below -

"

MARC: 89xx use in sales and distribution

Message no. W4012

Diagnosis

The material is used in sales and distribution.

Possible distribution types are:

  • Sales order
  • Request for quotation
  • Quotation
  • Outline agreement (scheduling agreement, contract)

Procedure

Delete open sales and distribution documents or archive already completed documents.

"

I found that the related Quotations were already "Completed" & converted to Sales Order Items which were also deleted with the "Reject Reason" selected. In changing Quotations (VA22), the "Reject Reason" could not be selected to delete the Quotation items. 

Q1) To archieve the Material Master, is it mandatory to archieve the Quotations first even if these items were already "Completed" in staus ? Is it also required to archieve the Sales Order items as well which were deleted ?

Q2) If Q1 is required, could you explain the processes of archieving Sales Documents in details ? The following link can have some info. but not in details -

http://scn.sap.com/thread/1867807

Q3) For archieving the related documents such as Sales documents / Purchasing documents / Production orders etc, is the archieving at Header level or Item level ? In a document, there should be some items which Materials are not required to archieve. If it is at Header level, does it mean that the whole document with those unrelated document items will also be archieved and deleted permanently in system ?

Many Thanks,

KH Fong

Accepted Solutions (1)

Accepted Solutions (1)

JL23
Active Contributor
0 Kudos

these are actually very basic questions.and you could find the answers to your questions yourself by looking into Archiving Material Master Records (LO-MD-MM) (SAP Library - LO�� Logistics General)

Just use google, enter the archving object and search the help.sap.com site, here an example for sales orders, just copy this string to Google:

SD_VBAK site:help.sap.com

Former Member
0 Kudos

Yes i agree with these are basic questions and you can get more information on help.sap and SCN forum. Also i suggest you to have a look at these SAP note for material archiving, it describes in details of all MM_MATNR related error messages during Archiving.

900537 - FAQ: Error messages when archiving materials

former_member287204
Participant
0 Kudos

Dear both,

I had already gone thr the link - "Archiving Material Master Records (LO-MD-MM) (SAP Library - LO�� Logistics General)" before raising my above questions. Also, this link & the note - "900537" cannot answer my above questions 1-3 exactly, and I didn't find related forums relevant to my above 3 questions, especially the Q1 & Q3. If you or other experts can find the relevant forum(s) or can exactly answer my above questions, pls kindly help to advise me.

Many Thanks,

KH Fong


JL23
Active Contributor
0 Kudos

the first sentence under the header line INTEGRATION behind the link says:

Before a material master record can be archived and deleted, other objects (such as purchasing documents) that refer to this material must themselves be archived.

does this not answer your Q1? how can this sentence be more exactly as it is?

former_member287204
Participant
0 Kudos

For the Q1, is the "header line INTEGRATION behind the link says" also applied for the related deleted documents (e.g. converted Sales Order items as above) ?

If Q1 is a must, is there any info. or advice that can answer the Q3 ?

Many Thanks,

JL23
Active Contributor
0 Kudos

there are many indicators that can give you the answer when reading documentation conscientiously .

  • the archiving object name, it contains VBAK, not VBAP. VBAK is the header table for sales orders
  • the docu always speaks about sales orders, not about sales order items
  • archiving is only done for closed business cases, 1 order = 1 business case
  • and then just the logical sense of order. if you store your bicycle for the winter time in a cellar, do you then disassemble it and keep one wheel  in the hallway?
former_member287204
Participant
0 Kudos

Thanks for your answers. Now, found a problem relevant to archieving Sales Documents -

When trying to archieve the related Quotations with "Test Mode", found the Job - "ARV_SD_VBAK_WRI20140221111642" was "Cancelled" in the Job Overview and the error in the Job Log was - "Internal error: DYNSQL_GENERATE_WHERE_CLAUSE(4)". In the created Variant, I just inputted the Sales Document (Quotation) nos., "Detail Log = X", "Log Output = 2" & inputted "Archiving Session Note". Could you advise how to fix this problem ?

Many Thanks,

former_member287204
Participant
0 Kudos

Seems got the info. from the following link -

http://scn.sap.com/thread/1226859

I found there is no setting in the VORA. Is the error due to this reason ?

Tks,

JL23
Active Contributor
0 Kudos

I hope you will check if there is water in the pool before you jump from a springboard.

Honestly, you have to do some homework before you start. And this homework is at least reading the big docu SAP Library - Introduction to Data Archiving (CA-ARC)

Already the thickness of this docu can give you the impression that archiving is not just a single transaction which is just running by itself.

of course you need to do some customizing, archiving is not a transaction to make an entry error invisible, archiving is used to KEEP oboslete data for audits etc. outside the production data base.

Archiving is a process, archiving needs a project as it is not just a technical activity. you need a sense for the data, for your processes, for the legal requirements.

the link you referenced had itself mentioned an OSS note.

Instead of asking this question you could have checked this OSS note and would have found the answer yourself.

Apropos OSS notes, from my point of view are the OSS notes one pillar of archiving. It is essential to have your programs up to date before you start archiving to avoid any unrepairable surprise.

former_member287204
Participant
0 Kudos

Dear Diamond

I could then solve the "Internal error: DYNSQL_GENERATE_WHERE_CLAUSE(4)" according to the link found by me as above. Regarding your above advised info. -

  • "archiving is only done for closed business cases, 1 order = 1 business case.". Then, if the open orders or any open order items are "Deleted" without proceeded, is it required to archieve such kind of orders so as to be able to archieve the Material ?

Just have this uncertain question (related to my Q1 at the beginning) and wish to be able to directly get the answer from you.

In fact, the discussion forum is used to share knowledge & experience from your experts instead of asking the questioner to walk across a big circle and then search / observe the solution. It can be feasible if time is available.

Thanks for your general advice and info. anyway.

Regards,

JL23
Active Contributor
0 Kudos

Yes, everything else what references a material has to be archived before you can archive a material.
Setting a deletion indicator is a preparation work for archiving. the record stays in the database, the deletion indicator can be removed at any time.

Instead of deletion indicator SAP should have named it "archiving proposal indicator" then we had less misunderstandings.

Of course the discussion forums are made for knowledge exchange, but we do not need to exchange knowledge which is public accessable and should be basis for professional discussions in the forum.

Honestly it is boring to answer everyday the same question. And it does not help you or any other who wants to search if you find 1000 or 2000 discussions about the same thing. All this basic stuff actually hides the good discussions with valuable content that cannot be found in help.sap.com documentation.

The experience even shows that knowledgable people do less participate in SCN because the quality drops with all the basic questions, and more and more wrong answers are given on complex questions. So you are actually hurting yourself by asking the basic stuff for which you could find the answer by research and documentation, once you know all the basics and have real sophisticated questions then you stay alone and nobody is around to answer it, or you have to trust the misleading answers...

former_member287204
Participant
0 Kudos

Thanks for your answer and suggestion.

former_member287204
Participant
0 Kudos

Dear Jurgen / Experts,

I found two more questions and hope these are real sophisticated questions for you -

Q4) After archieving a Material with "Test Mode", I found error as below -

MARC: 8100 planned order exists

Message no. W4008

Diagnosis

A planned order exists for the material.

Procedure

Delete the planned order. You can then archive the material.

I had checked in MD04 but didn't find any Planned Order for the Material. There were already no refernced documents for this Raw Material such as PO, PR, Info. Rec., Source List & Mat doc. etc.

Besides the above error, also found the following error -

MBEW: 8100 plant is assigned to the valuation area

Message no. W4031

Diagnosis

The material cannot be archived for this valuation area since the material is still used in dependent tables.

Procedure

Delete these dependencies. You can then archive the material for the valuation area.

MARA:  Dependent material master data still exists

Message no. W4134

Could you advise how to check and fix the above problem ?

Q5) Regarding the SAP note 314330 - Enhancements for the selection criteria SO_VBAK, if we would like to customise the variant selection criteria screen for Sales docs. archieving, is it only limited to the fileds in

table - "VBAK" but cannot add the fields from other tables which were also included in the "Database Tables" for the object - "SO_VBAK" under SARA / DB15, e.g. VBUP, VBEP & VAPMA etc. ?

The purpose is to add the Sales doc. item filed from one of these tables in the selection criteria screen so that the arichieving can be specified to the item(s) instead of the whole document. Don't know whether it is feasible, could you pls advise ?

Many Thanks,

KH Fong

JL23
Active Contributor
0 Kudos

Let us start with the first error about the planned orders.

Please check in table PLAF if you can see a record for your material.

former_member287204
Participant
0 Kudos

When using the Material no. to search in table PLAF, no record was found. Any other idea ?

Tks,

JL23
Active Contributor
0 Kudos

then you may need to debug, or eventually open a call at SAP.

the place where this is checked is in program WSREO012  in  FORM CHECK_PLANNED_ORDER

the table that is checked there is filled with this code:

select matnr  plwrk

       into (tab_plaf_marc-matnr, tab_plaf_marc-werks)

       from plaf

       where matnr = p_matnr

       group by matnr plwrk

       order by matnr plwrk.

hence you have to search table PLAF with material number and planning plant. 

If there is nothing in this select and still SAP issues this error then it must be a bug


former_member287204
Participant
0 Kudos

Tks Jurgen,

For Q4, Can other errors also be fixed after fixing the 1st error ?

Could you also advise whether it is feasible for my above Q5 (even if it is not) ?


Tks,

JL23
Active Contributor
0 Kudos

Error W4134 is issued from 2 places in the coding. At one time it checks for existing valuation type views. This is a warning and may go away if other errors for this material are resolved.

Make at least sure that all MBEW records for this material have a deletion flag.

And OSS note 561972 explains the reason why and when this message is issued as error message.

re Q5

Archiving cannot be done at item level, please do not even try it you only create inconsistencies.

former_member287204
Participant
0 Kudos

Thanks for your advice.

former_member287204
Participant
0 Kudos

Dear Jurgen / Experts,

Sorry, would like to study one more question from you -

When archieving another Material, found the following errors -

MARC: 8xxx dependent storage location entries exist

Message no. W4007

Diagnosis

There are dependent storage locations with stock for the material and for the plant.

Procedure

No further editing is required for this message. Reduce the stock in the storage locations. Then you can discontinue the material in the plant.

Had checked in MMBE (with "Detailed Display") but found there was already no stock for the plants.

The 2nd error was as below -

MARD: 8xxx 1xxx reservation / dependent requirements exist

Message no. W4017

Diagnosis

A reservation exists for the material or a dependent requirement exists for the material.

Procedure

Delete the reservation or dependent requirement for the material.

Had checked MD04 & MD05 but found no reservation / dependent requirements for the plants.

The 3rd to 4th errors were as below -

MBEW: 8xxx plant is assigned to the valuation area

Message no. W4031

Diagnosis

The material cannot be archived for this valuation area since the material is still used in dependent tables.

Procedure

Delete these dependencies. You can then archive the material for the valuation area

MARA:  Dependent material master data still exists

Message no. W4134

Could you pls advise how to solve this problem ?

Tks,

JL23
Active Contributor
0 Kudos

If I read all these messages, then you are miles away (years away) from beeing able to archive this material.

SAP is checking stocks in current period, previous period and previous year. Use SE16 to check this in table MARD, MBEW and many other stock tables.

In short this just means, if you have had stock for this material in 2014, then you are able to archive it in 2016, because the 2014 stock is the previous year stock when we are in 2015, and all fields will show 0 when we are in 2016.

the long text to error W4007 is much too optimistic and gives a wrong impression.

Reservations are stored in table RESB. Entries from table RESB are archived with other objects like PM_ORDER, PP_ORDER etc.  (check it yourself in transaction DB15)

This again just tells me that you have not archived any dependent data.

talking about the other messages is just academic because they may not even arise if you have done the expected archiving of the other objects.  eg. W4031 could vanish if you archived your costing data with CO_COPC.

and W4134 may just be there because of above messages.

former_member287204
Participant
0 Kudos

Thanks for your advice again.

Regarding the error "W4007", if I could find stocks in tables "MARD", "MBEW" or other stock tables in previous period / year, e.g. 2013, is it possible to manually clear these stocks / data using some program ? or Should we have to wait until next period / year to archieve such kind of Materials ? 

Tks,

JL23
Active Contributor
0 Kudos

I recommend not to cheat the system. Try to get used to the SAP design.

SAP is a highy integrated software. Such ideas can only develop if somebody does not understand the complexity. And once you are experienced enough to know everything that you would be able to do it, then you wouldn't anymore because of your experience.

Why is it so important to get rit of this material master?

former_member287204
Participant
0 Kudos

Thanks for recommendation.

When checking the Material in tables "MARD" & "MBEW", found the latest record was in 2006 period 1 with 0 for all stocks. Why the error was still prompted for this Material ? Any other stock table(s) can also be used to check ?

Tks,

JL23
Active Contributor
0 Kudos

You will be surprised how much stock tables SAP has: Stock Tables and Stock Types - ERP SCM - SCN Wiki

former_member287204
Participant
0 Kudos

This message was moderated.

Answers (1)

Answers (1)

Former Member
0 Kudos

As one of the moderator's for this forum, am closing this thread as Jurgen has patiently answered your many, many questions.

Regards,

Karin Tillotson