Page tree
Skip to end of metadata
Go to start of metadata

You can create a Material BOM in different ways:

 (warning) Be aware, that you only must use one option above within one system. Otherwise, this may lead to inconsistencies.

1. Automatic creation of BOM 

In  <ECTR installation directory>\customize\config\default.txt set the following values:

# Define how to update a BOM. Set to true, ECTR will update a material BOM 
# on checkin of a document with component references. 
# true:  Update a material BOM on checkin of a document with component references 
# false: BOMs can only be updated manually
plm.bom.updateAtCheckin              = true

So after each checkin of a CAD assembly the material BOM is created, if also a Material exists for the components (Document Info Record).

Material BOM is derived directly from information in CAD system (plm_metainf-cad.xml). The SAP function module CSAP_MAT_BOM_MAINTAIN is called to store the BOM.

2. Manual creation of BOM

a) Via "old" CDESK like Dialog

Simply go to the context menu of a Document Info Record of an assembly an click on "Derive Bill of Material".

b) New BOM Wizard

The context menu entries "Derive Bill of Material 2 .." call a new dialog to create/update Bill of Materials.

You can also launch the new dialog for a specific Solidworks Configuration:

The new dialog shows all BOM headers in the upper section and all BOM items in the lower section. When you click on a BOM header, the lower table only shows the BOM items belonging to the selected header above. 

 

3. BOM creation for AutoCAD

Requirement: BOM creation for AutoCAD (also Inventor if you want to handle virtual components)

Restriction: You have to use the Integration commands to create and update a BOM, not the BOM functions in ECTR as explained above.

Accordingly to SAP Note 2107230 - ECTR: You use the CDESK_BOM_WIZARD function for maintenance of material BOMs you have to implement the method if_ex_cdesk_bom~find_existing_items of the BAdI CDESK_BOM.

Afterwards you will be able to create a BOM via the Integration. However, the BOM will be deleted and recreated each time you trigger an update of the BOM.

To prevent the recreation you can enhance the coding in find_existing_items. Please add the following lines at the end of the function:

DATA: linked_mat    LIKE LINE OF all_linked_materials,
      plm_docs_copy LIKE plm_documents,
      plm_document  LIKE LINE OF plm_documents.

    FIELD-SYMBOLS: <doc>      LIKE LINE OF plm_documents,
                   <doc_copy> LIKE LINE OF plm_documents.

    LOOP AT plm_documents ASSIGNING <doc>.
      READ TABLE plm_docs_copy WITH KEY material = <doc>-material ASSIGNING <doc_copy>.
      IF sy-subrc = 0.
        <doc_copy>-quantity = <doc_copy>-quantity + <doc>-quantity.
      ELSE.
        APPEND <doc> TO plm_docs_copy.
      ENDIF.
    ENDLOOP.

    plm_documents = plm_docs_copy.

    LOOP AT plm_documents ASSIGNING <doc>.
      CLEAR linked_mat.
      linked_mat-objecttype = 'MARA'.
      linked_mat-objectkey = <doc>-material.
      <doc>-guid_ident = sy-tabix.
      linked_mat-tab_index = sy-tabix.
      APPEND linked_mat TO all_linked_materials.
    ENDLOOP.

Existing BOM wil be updated and not recreated, but positions with the same material will be summarized (quantity will be adjusted for this positions).

Example:

3. Preferred Material used to derive BOM

You can have multiple Materials assigned to one Document Info Record. When deriving a Material BOM, especially the BOM item the system needs to know, whichs is the "preferred" Material to be used for the specific item. In ECTR you can mark the preferred Material.

15 Comments

  1. Former Member

    Hi Gerhard,

    Is Derive Bill of Material (Multi - Level) only available for Solidworks? How about other tools like PTC Creo?

    Can this function handle multiple level BOM creation for a whole assembly structure? - e.g. To create assembly BOM and subassembly BOM at the same time.

    Regards,

    Jimmy

    Gerhard

    1. Jimmy,

      "Derive BOM 2 (Multi level) is also available for Bill of Documents derived from other CAD systems than Solidworks.

      Regards,

      Gerhard

      1. Former Member

        Hi Gerhard,

        Can you tell us what's the minimum frontend/backend version of ECTR to support "Derive BOM 2 (Multi level)"?

        Frontend Version: 5.1.7.0 (31.01.2017 14:54:31)
        Backend Version: V 5.01.07.00 - 510 / 0007

        Above is the current version of our system. I have manually add this function to context menu since it's not displayed with standard installation, but it's not working.

        Regards,

        Jimmy

  2. Former Member

    By the way, since this is a guide on how to create BOM, please allow me to ask one more question about BOM creation.

    Standard setting of ECTR only allows to create one BOM at a time. Can "Derive BOM from BOD" works when you select more than one assemblies?

    e.g. Select three assembly DIR, click "Derive BOM from BOD", then three individual BOMs are created.

    As far as I know, BOM can be created when check in assembly, but user do not accept BOM creation in this way. Just want to seek another possibility.

    Thank you.

    Regards,
    Jimmy

    1. Hello Jimmy,

      regarding the question "Can "Derive BOM from BOD" works when you select more than one assemblies?"

      Answer: it depends which function you are calling. "Derive ...2" does only allow single selection.

      Hope this helps.

      Regards

      Gerhard

      1. Former Member

        Hi Gerhard,

        The function I mentioned to derive BOM from material is fnc.mat.bom.complete, is that the same thing we are talking about?

        Regards,
        Jimmy

        1. Hello Jimmy,

          I would recommend, that you install the latest ECTR (or at least 5.1.8). There are a couple of configurations changed (API definition, menu.guidef, language-resources, ...) which are required for the menu entries.

          Hope this helps.

          Regards,

          Gerhard

  3. Former Member

    Hello Gerhard,

    the former CAD-Desktop was able to distinguish on BOM item Level, whether the BOM item is controlled via a CAD System or not. This was done via the CAD flag.

    Is a similar approach considered für the ECTR as well?

     And allow me another question: Is there a function in place to update a BOM from a BOD once the BOM has been derived the first time?

    Where can I find more Information on this subject.

    Many thanks & best wishes,

    Jens

    1. Hello Jens,

      1. yes, when deriving a BOM item from CAD the CAD flag is also set for the BOM item.
      2. Depends on customizing:
        1. if plm.bom.updateAtCheckin (or plm.bom.updateAtCheckin.<DocType>) in default.txt is true, no user interaction required. The BOM is updated right after updating the BOD.
        2. if plm.bom.updateAtCheckin (or plm.bom.updateAtCheckin.<DocType>) in default.txt is false, you can use the "Derive BOM 2" from context menu on DIR.
      3. More details can be found also in <ectr>\customize\config\default.txt

      Hope this helps.

      Regards,

      Gerhard 

  4. Former Member

    Hi Gerhard,

    We just notice both  plm.bom.initStatus in <ectr>\customize\config\default.txt and CDESK_CUS setting has no effect on Derive BOM 2 (Single/Multi level).

    Can you help point out where to configure the default bom header status for the latest API of creating BOM?

     

    Regards,

    Jimmy

    1. Hi Jimmy,

       plm.bom.initStatus

      See comment in default.txt above this setting: 

      # The Material BOM settings which are listed here are used by the legacy frontend
      # process to derive the BOM from the application assembly structure or from the
      # document structure. They are not used by the CDESK_SRV_MBOM and CDESK_BOM_WIZARD
      # features to maintain the BOM.

      The function "Derive BOM 2" is using the FM CDESK_SRV_MBOM_WIZARD. 

      Try to use BADI CDESK_SRV_MBOM to implement this requirement.

      Best,

      Sebastian

  5. Hello!

    I've been trying to get Derive Bill of Material 2 (single-level) to work, and the dialog that opens is just blank.  I've included some of the log detail, below.  I created two new parts, and added them to a new assembly.  I've created new material masters and assigned them, accordingly.

    I see a couple things, in the logs, that could be an issue, but I don't understand why.  It seems that it does not see the Material Master assignment, for the assembly?  It also shows something about 'Cannot determine value for 'CHANGENUMBER_INT'!', but we do not use change numbers this early, in our process.  I've dug through the configuration files, and just cannot seem to find anything that could be the issue.  Any assistance would be greatly appreciated.  Thanks!

    ================================================================================
    #4631 CDESK_SRV_GET_VARIANT
    ================================================================================

    INPUT -------------------------------------------------------------------------


    STRUCTURE: IS_REQUESTED_VAR_DATA (CDESK_SRV_S_REQUESTED_VAR_DATA)
    | VARIANT | VAR_MAT_LINK | VAR_ORIGINALS |
    | X | X | |

     

    TABLE: IT_GENERIC_DOC_KEY (CDESK_SRV_S_VAR_GEN_DOC_KEY) , 1 row(s)
    | GEN_DOC_TYPE | GEN_DOC_NUMBER | GEN_DOC_VERSION | GEN_DOC_PART |
    | SWA | ID0431084 | 01 | 000 |

    TABLES NOT SET: ET_MESSAGE (TABLES), ET_RUNTIME (TABLES), ET_VARIANT_DATA (TABLES), ET_VARIANT_ORIG (TABLES), ET_VAR_MAT_LINK (TABLES), IT_VARIANT_DOC_KEY (TABLES), IT_VARIANT_GUID (TABLES),

    OUTPUT ------------------------------------------------------------------------

     

    TABLE: ET_RUNTIME (CDESK_SRV_S_RUNTIME) , 1 row(s)
    | ACTION | RUNTIME |
    | GET_VARIANT | 13 |


    TABLE: ET_VARIANT_DATA (CDESK_SRV_S_VARIANT) , 1 row(s)
    | VARIANT_GUID | VARIANT_EXTERNAL_ID | VARIANT_TYPE | VARIANT_DESCRIPTION | PARENT_VARIANT_EXTERNAL_ID | PARENT_VARIANT_GUID | GEN_DOC_TYPE | GEN_DOC_NUMBER | GEN_DOC_VERSION | GEN_DOC_PART | VAR_DOC_TYPE | VAR_DOC_NUMBER | VAR_DOC_VERSION | VAR_DOC_PART | CREATED_BY | CREATED_AT | CHANGED_BY | CHANGED_AT |
    | 005056B31E141ED887985E1DAD1B60D3 | 0 | STD | Default | | | SWA | ID0431084 | 01 | 000 | | | | | PLM_ECTR_SW | 20180228200706 | | 0 |


    TABLE: IT_GENERIC_DOC_KEY (CDESK_SRV_S_VAR_GEN_DOC_KEY) , 1 row(s)
    | GEN_DOC_TYPE | GEN_DOC_NUMBER | GEN_DOC_VERSION | GEN_DOC_PART |
    | SWA | ID0431084 | 01 | 000 |

    TABLES NOT SET: ET_MESSAGE (TABLES), ET_VARIANT_ORIG (TABLES), ET_VAR_MAT_LINK (TABLES), IT_VARIANT_DOC_KEY (TABLES), IT_VARIANT_GUID (TABLES),

    ---- START TIME: 01.03.2018 - 08:35:18,305
    ---- END TIME: 01.03.2018 - 08:35:18,346
    ---- ELAPSED TIME: 41 ms

    ================================================================================
    #4634 CDESK_SRV_MBOM_WIZARD (using SAPGui)
    ================================================================================

    INPUT -------------------------------------------------------------------------


    STRUCTURE: IS_DOC_KEY (CDESK_SRV_S_DOC_KEY)
    | DOKNR | DOKAR | DOKTL | DOKVR |
    | ID0431084 | SWA | 000 | 01 |


    STRUCTURE: IS_IGNORE_ATTRIBUTE (CDESK_SRV_S_IGNORE_INST_ATTR)
    | EXCLUDE_AND_KEEP_CHILDREN | EXCLUDE_INCLUSIVE_CHILDREN |
    | | |


    STRUCTURE: IS_MBOM_HDR_KEY (CDESK_SRV_S_MBOM_HDR_KEY)
    | MATNR | WERKS | STLAN | STLNR | STALT |
    | | 2000 | 2 | | 1 |

    | NAME | VALUE |
    | IV_AENNR | |
    | IV_EXPLOSION_SCENARIO | BOM_DERIVE |
    | IV_EXPL_LEVEL | 1 |
    | IV_EXPL_OPT | AS |
    | IV_EXPL_OPT_USER | |
    | IV_EXT_VAR_ID | 0 |
    | IV_FALLBACK_FOR_RELEASED | |
    | IV_SILENT | |
    | IV_SIMUL | |

    TABLES NOT SET: ET_MESSAGE_MBOM (TABLES), ET_RUNTIME (TABLES),

    OUTPUT ------------------------------------------------------------------------

     

    TABLE: ET_MESSAGE_MBOM (CDESK_SRV_S_MSG_MBOM_ACT) , 1 row(s)
    | PARENTID | DOCID | MBOMID | TYPE | ID | NUMBER | MESSAGE | LOG_NO | LOG_MSG_NO | MESSAGE_V1 | MESSAGE_V2 | MESSAGE_V3 | MESSAGE_V4 |
    | 0 | 0 | 0 | E | BCOM_R | 001 | Action canceled by user | | 000000 | | | | |


    TABLE: ET_RUNTIME (CDESK_SRV_S_RUNTIME) , 10 row(s)
    | ACTION | RUNTIME |
    | BADI_DOCUMENT_AUTH01 | 0 |
    | BADI_DOCUMENT_AUTH02 | 2 |
    | AUTHORITY_CHECK | 4 |
    | EXPLODE_DIR | 35 |
    | GET_INSTANCE_DATA | 63 |
    | GET_STRUCTURE | 120 |
    | GET_INST_STRUC | 0 |
    | MBOM_GET_CDESK_CUST | 304 |
    | MBOM_MAP_FROM_BOD | 3 |
    | MBOM_UPDATE | 0 |

    TABLES NOT SET:

    ---- START TIME: 01.03.2018 - 08:35:23,498
    ---- END TIME: 01.03.2018 - 08:35:30,347
    ---- ELAPSED TIME: 6849 ms

     

    [08:35:18.305] OMF-Q ====== OMF ===========================================================
    [08:35:18.305] OMF-Q > cadagent.gui.obr.omf.OmfExpansionPerformed
    [08:35:18.305] OMF-Q > cadagent.proc.variants.PlmProcessVariantGet
    [08:35:18.305] OMF-Q FNCGEN > FuncGeneric: api execute
    [08:35:18.305] OMF-Q Calling: CDESK_SRV_GET_VARIANT [apilog@stateless.txt#4631]...
    [08:35:18.346] OMF-Q Called: CDESK_SRV_GET_VARIANT [apilog@stateless.txt#4631], duration total: 39ms (sap: 13ms, comm: 26ms, data: 1.4kb, rate: 55kb/s)
    [08:35:18.346] OMF-Q FNCGEN < FuncGeneric: api execute, duration: 40 ms
    [08:35:18.346] OMF-Q < cadagent.proc.variants.PlmProcessVariantGet, duration: 40 ms
    [08:35:18.350] OMF-Q < cadagent.gui.obr.omf.OmfExpansionPerformed, duration: 45 ms
    [08:35:18.350] OMF-Q ======================================================================
    [08:35:18.350] OMF-Q
    [08:35:23.358] OMF-Q fnc.api.generic2(CDESK_SRV_MBOM_WIZARD_SINGLE)->fnc.api.generic2
    [08:35:23.358] OMF-Q fnc.api.generic2(CDESK_SRV_MBOM_WIZARD_SINGLE)->fnc.api.generic2
    [08:35:23.358] OMF-Q fnc.api.generic2(CDESK_SRV_MBOM_WIZARD_SINGLE)->fnc.api.generic2
    [08:35:23.359] OMF-Q
    [08:35:23.359] OMF-Q ====== OMF ===========================================================
    [08:35:23.359] OMF-Q > plm.omf.OmfApiGeneric2
    [08:35:23.359] OMF-Q OBSERVER PlmObserver: hibernated...
    [08:35:23.362] OMF-Q > plm.proc.PlmProcessApiGeneric
    [08:35:23.366] OMF-Q METAI Duration to parse the C:\Program Files (x86)\SAP\ECTR\customize\aux-files\api_definitions2.xml: <( 0 ms )>
    [08:35:23.369] OMF-Q METAI Duration to parse the C:\Program Files (x86)\SAP\ECTR\addons\ectrwui\basis\aux-files\api_definitions2.xml: <( 2 ms )>
    [08:35:23.373] OMF-Q METAI Duration to parse the C:\Program Files (x86)\SAP\ECTR\basis\aux-files\api_definitions2.xml: <( 3 ms )>
    [08:35:23.373] OMF-Q Function CDESK_SRV_MBOM_WIZARD_SINGLE found in file C:\Program Files (x86)\SAP\ECTR\basis\aux-files\api_definitions2.xml
    [08:35:23.375] OMF-Q Cannot determine value for 'CHANGENUMBER_INT'!
    [08:35:23.375] OMF-Q Cannot determine value for 'CHANGENUMBER_INT'!
    [08:35:23.375] OMF-Q Cannot determine value for 'CHANGENUMBER_INT'!
    [08:35:23.376] OMF-Q > cadagent.proc.ProcessApiGenerics
    [08:35:23.376] AWT-E SLP Status-Line(1): Executing API...
    [08:35:23.498] OMF-Q Created JCoFunction: CDESK_SRV_MBOM_WIZARD, duration 114 ms
    [08:35:23.498] OMF-Q FNCGEN > FuncGeneric: api execute
    [08:35:23.498] OMF-Q Calling: CDESK_SRV_MBOM_WIZARD [apilog@stateless.txt#4634] (using SAPGui)...
    [08:35:30.346] OMF-Q Called: CDESK_SRV_MBOM_WIZARD [apilog@stateless.txt#4634] (using SAPGui), duration total: 6848ms (sap: 304ms, comm: 6544ms, data: 3.4kb, rate: 1kb/s)
    [08:35:30.347] OMF-Q FNCGEN < FuncGeneric: api execute, duration: 6849 ms
    [08:35:30.347] OMF-Q < cadagent.proc.ProcessApiGenerics, duration: 6970 ms
    [08:35:30.347] OMF-Q < plm.proc.PlmProcessApiGeneric, duration: 6984 ms
    [08:35:30.347] OMF-Q OBSERVER PlmObserver: UN-hibernated...
    [08:35:30.347] OMF-Q < plm.omf.OmfApiGeneric2, duration: 6987 ms
    [08:35:30.347] OMF-Q ======================================================================

    1. Hello,

      I would recommend to create a support incident to solve this issue.

      Thanks,

      Gerhard