Variant Configuration – Disassociate Material Variants

Home / Blog / Variant Configuration – Disassociate Material Variants

This is a fun little trick, that I will probably never use.  This came from my friend Rama.  If you’re like me, when you create material variants, I’m sure you wondered why you cannot disconnect the materials from the KMAT.  For some reason, this field becomes locked as soon you save the material.  In my normal process, I tell businesses to obsolete the material if they screwed it up, assigned the wrong KMAT or just want it to no longer be connected.  Well, it seems that SAP has come up with a  process to disassociate the material from the KMAT.

OSS Note 941004 – FAQ: Configurable materials and Variants in Configuration
Topic 1.  (so this is the SAP “Approved” method to handle this).

THIS PROGRAM DOES DIRECT TABLE UPDATES AND IS FOR EMERGENCY USE ONLY!!!

1) Use SE16 to edit the MARC record in the database.  Change the STDPD to the new KMAT and change the CUOBJ to zero.

 

2) Run the RCU_DEL_CONF_FOR_ARCHMATVAR program to delete the instance from the CBase

 

3) Edit the material master and maintain the material variant configuration

 

OF COURSE you must be careful to avoid creating database inconsistencies

 

ALSO, if there are any existing sales orders for the material variant, then the CUOBJ for those line items must be changed in the database from the old cuobj (of the mv) to the new cuobj (of the mv).  After that, it is necessary to update the pricing for

 

 

 

REPORT zlogic_mv_change_kmat NO STANDARD PAGE HEADING.

 

* Declare variables

DATA: lt_marc type marc occurs 0 with header line.

SELECT-OPTIONS: s_matnr FOR marc-matnr OBLIGATORY,

s_werks FOR marc-werks.

PARAMETERS:     p_stdpd LIKE marc-stdpd.

 

* Select material variants to change the KMAT

SELECT * FROM marc into table lt_marc

WHERE matnr IN s_matnr AND werks IN s_werks and stdpd ne space.

 

 

 

WRITE:/ marc-stdpd, marc-cuobj.

 

IF p_update = ‘x’ OR p_update = ‘X’.

UPDATE marc

SET stdpd = p_stdpd

cuobj = 0

WHERE matnr = marc-matnr

AND werks = marc-werks.

 

SUBMIT rcu_del_conf_for_archmatvar

WITH matnum = marc-matnr

WITH testmode = space

AND RETURN EXPORTING LIST TO MEMORY.

ENDIF.

 

EXIT.

 

ENDSELECT.

Now, for my disclaimer.  While this is a nice trick, I still most likely won’t use this myself.  The process I preach is to disassociate the material number in SAP from any logic, or any reason to worry enough about 1 exact number to go through this hassle.  Make your materials internal only, so they mean nothing to customers, distributors, vendors, etc…  if you do this, you never need to do DB updates to fix things.  Thanks my opinion.

thanks for reading,

As always, thanks for reading and don't forget to check out our SAP Service Management Products at my other company JaveLLin Solutions,
Mike

Leave a Reply

Your email address will not be published. Required fields are marked *