Ansicht
Dokumentation

FMDM_USMD_RULE_SERVE - BADI: Define Validations/Derivations

FMDM_USMD_RULE_SERVE - BADI: Define Validations/Derivations

ABAP Short Reference   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the Master Data Governance (CA-MDG) component.

You can use this BAdI to create customer-specific checks on entities, change requests, and editions. You also can use this BAdI to define that certain field values are to be derived from the values of other fields in the master data.

Methods

  • CHECK_ENTITY
When processing a change request, you call this method by choosing the Check function (pushbutton). When the system checks an entity, the system calls this method once for each entity type of the changed master data. In this method, you define all rules for checking the entities in the data model.
Note that error messages can be diminished to warning messages if this is so defined for the respective entity type in Customizing activity Create Change Request Type under Message Output.
If you want to prevent the activation when an error occurs, you need to define the check in the method CHECK_CREQUEST.
  • DERIVE_ENTITY
  • Within the context of a UI, the method is called for entities whose UIBBs are visible at the following event handlings:

A) Floorplan Manager PBO event handling (Process Before Output) to enable defaulting of fields
B) Floorplan Manager PAI event handling (Process After Input) to derive attribute values based on user input
  • In all other contexts, this method is called at least once per entity for all changed entities.

  • While it is possible to change rows and add additional rows to CT_DATA, deletion of rows will be ignored.

Therefore use the BAdI: Derivations Across Entity Types (USMD_RULE_SERVICE_CROSS_ET) for the deletion of entities of storage and usage type 4.
  • When you validate a change request, the system processes the following methods in succession in the background before it activates the change request:
  • CHECK_CREQUEST_START

  • CHECK_CREQUEST (once for each entity type of the changed master data in the change request)

  • CHECK_CREQUEST_FINAL

Validations are called during the following cases:
  • If the UI contains a Validate button and this button is chosen by the user

  • As part of a workflow step

  • When you activate a change request on a BOL/GENIL-based UI using the action 09 (Activate). When you do this, validation is called synchronously from the UI before triggering the workflow. Note: If action 03 (Approve) is used, validation is notcalled.

  • When an edition is checked, the system calls the following methods in succession:
  • CHECK_EDITION_START

  • CHECK_EDITION (once for each entity type of the changed master data in the edition)

  • CHECK_EDITION_FINAL

In the standard delivery, the BAdI implementation USMDZ3_RULE_BADI is activated for data model 0F. The implementation is automatically executed for this data model.

The BAdI is filter-dependent. The data model (MODEL) and the entity type (ENTITYTYPE) serve as filters.

The BAdI is not designed for multiple use.

USMDZ3_RULE_BADI

The BAdI implementation is located in the enhancement implementation USMDZ3_IMP_RULE_SERVICE_BADI.

For information about the implementation of BAdIs in the context of the Enhancement Concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework.

  • BAdI implementation MDG_BS_BP_DESCRIPTION

You use the BAdI method IF_EX_USMD_RULE_SERVICE~DERIVE_ENTITY from the BAdI implementation MDG_BS_BP_DESCRIPTION to derive the business partner description from a business partner's name and address.

To create a customer-specific BAdI implementation for the same filter value (ENTITYTYPE = BP_HEADER), deactivate the BAdI implementation MDG_BS_BP_DESCRIPTION before activating the customer-specific BAdI implementation.

If you want to retain the function of the BAdI implementation MDG_BS_BP_DESCRIPTION as delivered by SAP, and want to ensure that you receive corrections from SAP Notes, you can derive a customer-specific implementing class from implementing class CL_MDG_BS_BP_DESCRIPTION and redefine methods as required.

  • BAdI implementation MDG_BS_BP_TAXJURCODE

You can use the BAdI method IF_EX_USMD_RULE_SERVICE~DERIVE_ENTITY from the BAdI implementation MDG_BS_BP_TAXJURCODE to derive the tax jurisdiction code from the address.

If you want to create a customer-specific BAdI implementation for the same filter value (ENTITYTYPE = AD_POSTAL), deactivate the BAdI implementation MDG_BS_BP_TAXJURCODE before activating the customer-specific BAdI implementation.

If you want to mostly retain the function of the BAdI implementation MDG_BS_BP_TAXJURCODE as delivered by SAP, and want to ensure that you receive corrections from SAP Notes, you can derive a customer-specific implementing class from implementing class CL_MDG_BS_BP_TAXJURCODE and redefine methods as required.

  • BAdI implementation MDG_BS_SUPPL_ACCGRP_ID

You can use the BAdI method IF_EX_USMD_RULE_SERVICE~DERIVE_ENTITY from the BAdI implementation MDG_BS_SUPPL_ACCGRP_ID to derive the account group and the vendor number from the business partner.

If you want to create a customer-specific BAdI implementation for the same filter value (ENTITYTYPE = BP_HEADER), deactivate the BAdI implementation MDG_BS_SUPPL_ACCGRP_ID before activating the customer-specific BAdI implementation.

If you want to mostly retain the function of the BAdI implementation MDG_BS_SUPPL_ACCGRP_ID as delivered by SAP, and want to ensure that you receive corrections from SAP Notes, you can derive a customer-specific implementing class from implementing class CL_MDG_BS_SUPPL_ACCGRP_ID and redefine methods as required.

This BAdI uses the interface IF_EX_USMD_RULE_SERVICE. For more information, display the interface in the Class Builder.






PERFORM Short Reference   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 8010 Date: 20240523 Time: 215026     sap01-206 ( 168 ms )