Method Description |
---|
AFTER_READ_STRUCTURES After reading structures. Allows to initialize or read own data. |
CHECK_OBJ_ACTION Checking object actions, such as moving, inserting or removing items in the target structure. |
CHECK_SAVE_STRUC_CHANGES By default, if customer specific commands are executed and the target structure is changed, SMC asks if the changes should be saved. This method allows to suppress this question for own commands. |
COMPARE_STRUCTURE After comparison of the reference and target structure. Example code to send own warning and errors to log: Code Block |
---|
mo_bo_str_rel->mo_comparison_log->add_message(
iv_msgid = '/PCH/SMC'
iv_msgno = '063'
iv_msgty = lv_severity
iv_msgv1 = is_item-external_key
iv_object_type = mo_bo_str_rel->mv_object_type
iv_object_key = mo_bo_str_rel->mv_object_key
iv_object_ext_key = mo_bo_str_rel->get_external_key( )
iv_item_ref = is_item-item_ref
iv_no_confirmation = abap_true ). |
See SET_CONTEXT below for MO_BO_STR_REL. |
GET_COMPARISON_TERM By design SMC allows to compare any structure types. The items are compared using a comparison term. Example: |
GET_SUPPLEMENTARY_FIELD_VALUE If in customizing one ore more supplementary fields with data source set to "Customer enhancement (BADi)" are defined, then for each item and each such field this method is called to determine the field value to show in the corresponding widget. |
GET_VALIDITIES Allows to change or define the validities for the reference or target structure on structure relation header. |
ITEM_FILL_APPL_TYPE Allows to change or define the object type and identification of an object. Default application types are: Material master record: Document info record:
|
ITEM_INSERT_FINALIZE When inserting a new item, either when reading the structures or by executing one of the corresponding functions by the user, this method allows to change the data of the item. For example the object specific icon could be changed. If the insert function allows a dialogue to edit the data, the method is called twice. Once for finalizing the item data after initial inserting, once after user dialogue. |
ITEM_OBJ_ADD_FINALIZE When adding a new sub item to a item, this method allows to change the data of the sub item. If the add function allows a dialogue to edit the data, the method is called twice. Once for finalizing the item data after initial adding, once after user dialogue. |
ITEM_INSERT_PROVIDE Called when the list of available item categories to insert are evaluated. |
ITEM_OBJ_ADD_PROVIDE Called when the list of available sub item type to add are evaluated. |
ITEM_INSERT_SETUP Setting up default values for a new item (before dialogue). |
ITEM_OBJ_ADD_SETUP Setting up default values for a new sub item (before dialogue). |
ITEM_IS_CONVERSION_POSSIBLE Called to determine if a conversion of an item is possible. Parameter IV_CONVERSION_TYPE defines which type of conversion is requested. Conversion types are defined in constant /PCH/CL_SMC_CONSTANTS=>C_CONVERSION_TYPE-*. |
SET_CONTEXT When initializing or changing the SMC business object, the object reference is set to the implementing classes of the enhancement spot by calling this method. The business object reference must be saved in a instance attribute to be used in the other methods. Example attribute declaration: Image Modified Code Block |
---|
private section.
data MO_BO_SMC type ref to /PCH/CL_SMC_BO_STR_RELATION . |
private section. data MO_BO_SMC type ref to /PCH/CL_SMC_BO_STR_RELATION . Example code: Code Block |
---|
METHOD /pch/if_smc_str_badi_cmn~set_context.
mo_bo_smc = io_bo_str_relation.
ENDMETHOD. |
|
VALIDATE_ASSEMBLY_DATA Called after entering / filling assembly data. Allows to check user input. |
VALIDATE_ITEM_DATA Called after entering / filling item data. Allows to check user input. |
VALIDATE_BEFORE_APPLY_TO_TAR Allows own validations of target structure before applying to SAP structures. See also VALIDATE_STRUCTURE. Example code to send own errors to log: Code Block |
---|
cv_error_occurred = abap_true.
io_msg_if->add_message(
iv_msgty = 'E'
iv_msgid = '/PCH/SMC_MMS'
iv_msgno = '001'
iv_msgv1 = ls_main_data-reldefid
iv_object_type = mo_bo_str_relation->mv_object_type
iv_object_key = mo_bo_str_relation->mv_object_key
iv_object_ext_key = mo_bo_str_relation->get_external_key( )
). |
|
VALIDATE_HEADER_DATA Validating the header data when creating or changing a structure relation. |
VALIDATE_STRUCTURE Validate target structure when checking or applying to target. For example of sending own errors to log see VALIDATE_BEFORE_APPLY_TO_TAR. |
SETUP_TARGET_VALIDITY Defining the target validity. Called either when creating a structure relation and the target structure exists or when the structure not exists before applying the structure to the SAP Structures. |
APTS_BEFORE_EXECUTION Event before executing adjustment. There are several execution levels which indicate the processed steps. Possibility to internal data setup. Available execution levels are: Synchronize - Synchronizes the reference structure with the SMC structure Check Target - validates the consistency of the SMC target structure (including the definitions in the control groups) Apply to Target - Apply the SMC target structure to the SAP structure The event is only called once per SMC structure definition and execution, which means that, if the adjustment process runs in execution level "Apply to Target", the event is called once at the start (before the synchronize took place) with the execution level "Apply to Target".
|
APTS_EXECUTION_SUCCESS Event after executing the adjustment without errors in the adjustment process. Can be used to process actions if an adjustment has been executed without errors. Execution Level are identical to the execution levels in APTS_BEFORE_EXECUTION. The event is called analogous to APTS_BEFORE_EXECUTION only once per SMC structure definition and execution at the end of the process. |
APTS_EXECUTION_FAILURE Event after executing the adjustment with errors in the adjustment process. Can be used to process actions if an adjustment has been executed with errors. Execution Level are identical to the execution levels in APTS_BEFORE_EXECUTION. The event is called analogous to APTS_BEFORE_EXECUTION only once per SMC structure definition and execution at the end of the process. |
APTS_EXECUTION_INT_FAILURE Event when the execution has been cancelled due to an internal (unexpected) error. Can be used to process actions if an adjustment has been executed with errors. Execution Level are identical to the execution levels in APTS_BEFORE_EXECUTION. The event is called analogous to APTS_BEFORE_EXECUTION only once per SMC structure definition and execution at the end of the process. |