BOM Specific integration spot and methods (SMC)

For the BOM specific object type relations exists following integration points:

MAST-MAST

/PCH/SMC_STR_MAST_MAST

MAST-PRST

/PCH/SMC_STR_MAST_PRST

PRST-PRST

/PCH/SMC_STR_PRST_PRST

PRST-MAST

/PCH/SMC_STR_PRST_MAST

IPRS>MAST

/PCH/SMC_STR_IPRS_MAST

Each of this integration points provides following enhancement methods:

Method
Description

Method
Description

ADJUST_BOM
Called before crating and changing bill of materials.

AFTER_CHANGE_BOM
Handling of own data after changing a BOM.

AFTER_CREATE_BOM
Handling of own data after creating a BOM.

AFTER_DELETE_BOM
Handling of own data after deleting a BOM.

CREATE_MATERIAL_VIEWS
When creating plant specific structures and the corresponding plant view does not exists,
then this method is called. This integration point is used by SMC itself to, for integrating MMS.

BUILD_BOM_DATA_FROM_PROD_STRUC
Only available for IPRS>MAST.
Allows to fill own BOM data depending on the iPPE product structure data. Below an example for
filling the item number and sort string depending on characteristic values assigned to PVS nodes.
Note that all fields in the target item structure can be filled via the structure data table,
using as key <structure name>\<field name>.
See example.

METHOD /pch/if_smc_str_badi_iprs_mast~build_bom_data_from_prod_struc. CONSTANTS: c_char_item_no TYPE atnam VALUE 'ZBM_POSNR' , c_char_sort_string TYPE atnam VALUE 'ZBM_SORTP' . DATA: lv_value TYPE string , ls_data TYPE /pch/ippe_additional_data . FIELD-SYMBOLS: <ls_struc> TYPE /pch/ippe_prod_struc_info , <ls_iprs> TYPE /pch/ippe_prod_struc_info , <lv_data> TYPE any . . "wir setzen folgende Felder: " /PCH/SMC_MAST_ITEM_FIELDS-ITEM_NO > aus Klassifizierung übergeordneter "Sicht(PVS)" " /PCH/SMC_MAST_ITEM_FIELDS-SORTSTRING > dito LOOP AT ct_prod_struc_bom ASSIGNING <ls_struc> WHERE applobj_type = /pch/cl_ippe_prod_struc_srv=>c_ppe_const-ppe_objtype-component. "Positionsnummer und Sortbegriff READ TABLE it_prod_struc_ippe ASSIGNING <ls_iprs> WITH KEY record_id = <ls_struc>-record_id. CHECK sy-subrc = 0. WHILE sy-subrc = 0. "hoch bis Gliederungsknoten IF <ls_iprs>-sub_type = 'S_VW'. EXIT. ENDIF. READ TABLE it_prod_struc_ippe ASSIGNING <ls_iprs> WITH KEY record_id = <ls_iprs>-parent_id. ENDWHILE. CHECK <ls_iprs>-sub_type = 'S_VW'. TRY. /pronovia/cl_classif_services=>get_char_value_single( EXPORTING iv_char_name = c_char_item_no iv_class_type = '053' iv_object_type = 'PNODID' iv_object_key = <ls_iprs>-guid IMPORTING ev_char_value = lv_value ). IF lv_value IS NOT INITIAL. ls_data-key = '/PCH/SMC_MAST_ITEM_FIELDS\ITEM_NO'. CREATE DATA ls_data-data LIKE lv_value. ASSIGN ls_data-data->* TO <lv_data>. <lv_data> = lv_value. INSERT ls_data INTO TABLE <ls_struc>-data. ENDIF. /pronovia/cl_classif_services=>get_char_value_single( EXPORTING iv_char_name = c_char_sort_string iv_class_type = '053' iv_object_type = 'PNODID' iv_object_key = <ls_iprs>-guid IMPORTING ev_char_value = lv_value ). IF lv_value IS NOT INITIAL. ls_data-key = '/PCH/SMC_MAST_ITEM_FIELDS\SORTSTRING'. CREATE DATA ls_data-data LIKE lv_value. ASSIGN ls_data-data->* TO <lv_data>. <lv_data> = lv_value. INSERT ls_data INTO TABLE <ls_struc>-data. ENDIF. CATCH /pronovia/cx_invalid_object ##no_handler. ENDTRY. ENDLOOP. ENDMETHOD.

© ProNovia AG | Imprint | Data Protection