cancel
Showing results for 
Search instead for 
Did you mean: 

SD_COND: Identifying obsolete conditions

Former Member
0 Kudos

As we want to only archive conditions which have a deletion flag set, I was wondering how to identify obsolete conditions and mark them for deletion.

My first idea was that any condition having a customer or material which is marked for deletion in it is also to be marked for deletion.

The question now is how to analyze all existing conditions to find out the ones that meet this criteria. In the KONH there is no field for customer or material. In KONP there is one for customer, but it is empty for all our entries.

Can anyone point me in the right direction?

Thanks

Martin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Martin,

Since you have mentioned customer and material I am assuming that you are talking about archiving 'condition records'.

And if I have understood your requirement correctly, you would like to mark all those condition records for deletion, which are not likely to appear in transactions because either the customer or the material may have been marked for deletion.

Search all those condition tables (A901, A902, etc.) which have customer and/or material fields (and which appear in access sequences relevant to those condition types of your pricing procedures) to get condition record numbers (KNUMH) and mark all these for deletion. This is more convenient than to start with KONH, KONP tables as the data for initial consideration will be too huge in this case. Either LSMW or BDC can be used to set the deletion indicator on each of the condition records found. Clarify if your requirement is different.

Cheers,

KC

Former Member
0 Kudos

Hello KC,

you are exactly right with your assumptions. If a condition record contains a material/customer which will be removed by archiving, then (as I understand it) it makes no sense to keep the SD condition record.

Concerning your proposal I just have a follow-up question: is there an easy way to find out which tables to look for in general? I assume that it is not only A9*, because there are only 9 of them in our system, having one with material involved and this one having only 1 entry.

If I also understand you right there is no single/mass transaction for marking SD condition records for deletion (similar to purchasing info records)?

Best regards

Martin

Former Member
0 Kudos

Hi Martin,

The condition tables to search for will be those that are relevant to your pricing configuration. If you want to archive the condition records of base price (PR00 for example) then search the condition tables appearing in the relevant access sequence which is also PR00 is the above example. This has tables 118, 5, 6, 4 and 29 but out of these only 4, 5 and 6 have customer and/or material. So only the tables A004, A005 and A006 need to be searched in this example.

So to start with, check for which all condition types you want to archive records and check all those access sequences and find those tables which have customer and/or material. Hard code these table names in a program and search only these by passing those material and customer numbers which have deletion indicators.

And there is no single transaction to set deletion indicator en masse. MASS transaction doesn't work for condition records. Either LSMW or BDC is also not straight forward as the recording will change for each condition table.

cheers,

KC

Former Member
0 Kudos

Hello KC,

since I am still waiting for feedback of my SD expert, I did some detailed investigating and found SAP Note 677449.

I would assume that this exactly would solve my problem. Do you agree?

Best regards

Martin

Former Member
0 Kudos

Hi,

This seems to be exactly what you require. Executing upto step 5 should show all the relevant records; if validated by functional consultant, the rest of the steps can be executed.

cheers,

KC

Answers (0)