01-26-2012 2:15 PM
I'm looking for a way to change the "recursiveness allowed" flags in the "Class Recursion" tab of a BOM item in transaction CS02. The flag corresponds with the fiels REKRS in table CLRK. No BAPI or FM found after half a day of searching. The CSAP_* function modules don't seem to cover this data.
01-27-2012 7:03 AM
Hi,
This indicator is automatically set based on the conditions mentioned here [Class Recursiveness|http://help.sap.com/saphelp_470/helpdata/en/ea/e9b54a4c7211d189520000e829fbbd/content.htm]. You can have look at fm CSAI_BOM_MAINTAIN which has that indicator FL_RECURSIVE. As the documentation says
The system recognizes recursiveness for a class item if the following objects are allocated to the class in the class item:
The BOM header material
A material with a BOM which contains the BOM header material as an item
A class to which one of the materials described above is allocated
You can try logics like removing the header material from the item, so that recursiveness is avoided, May be by using CSAP_BOM_ITEM_MAINTAIN. Explode the existing BOM using CS_BOM_EXPLOSION and compare the header & item materials.