Ansicht
Dokumentation

CRM_BP_UIU_DEFAULTS - BAdI: Setting of Attribute Defaults

CRM_BP_UIU_DEFAULTS - BAdI: Setting of Attribute Defaults

Fill RESBD Structure from EBP Component Structure   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

This BAdI enables you to prefill all fields at header level with default values. This is available for both the New and Edit pages. It can be used whenever defaulting of a certain value is required and can be implemented and activated several times in parallel.

The BAdI contains the method GET_DEFAULT_VALUES with the following parameters:

  • CR_ME: Reference to the current view controller
  • IV_FIRST_TIME: Indicates first processing of method DO_PREPARE_OUTPUT of current view

Note that SAP does not delivers an implementation for this BAdI.

To select a default role exclusion group, an implementation of interface method GET_DEFAULT_VALUES (class CL_BP_ROLES_ACCOUNTLIFECYCLE) is called in DO_PREPARE_OUTPUT of the relevant implementation class before calling BADI_CRM_BP_UIU_DEFAULTS. This ensures that any customer implementation of BADI_CRM_BP_UIU_DEFAULTS is processed after the logic provided for determining a role exclusion group.

The delivered implementation of method GET_DEFAULT_VALUES checks if an exclusion group (with roles) has been defined, and returns the exclusion group if exactly one group is defined. If multiple exclusion groups are defined, it selects the first one. In the latter case, a customer implementation could be used to determine the right exclusion group based on any criteria, such as user role or business partner type. The class CL_BP_ACCOUNTLIFECYCLE_SERVICE provides additional service methods that allow a range of roles to be filtered, and removes the current lifecycle stage from the collection of maintained business partner roles and vice versa:

  • GET_SUCCESSORS_FOR_STAGE: Returns all possible transitions (roles) from a given stage.
  • FILTER_ROLES_EXCLUSIVE_STAGE: Filters a collection of roles. All roles which are part of an exclusion group are eliminated.
  • FILTER_STAGE_EXCLUSIVE_ROLES: Filters a collection of roles. All roles which are not part of an exclusion group, or not valid at the current time, are eliminated.





ABAP Short Reference   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 2329 Date: 20240606 Time: 140725     sap01-206 ( 51 ms )