Ansicht
Dokumentation

CRM_BP_LIFECYCLE - Define Basic Settings for Account Life Cycle

CRM_BP_LIFECYCLE - Define Basic Settings for Account Life Cycle

Vendor Master (General Section)   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

To implement the account life cycle, you must perform a number of steps. Steps 1 and 2 cover the basic functionality, and are therefore required to use this functionality. The remaining steps are optional.

  1. Definition of life cycle, stages, and transitions (required)
  2. Enhancement of screen configuration (required)
  3. Screen control (optional)
  4. Field modification (optional)
  5. Defaulting a life cycle stage (optional)
  6. Searching for accounts by life cycle stage (optional)

Note: For the My Accounts Fiori app, only step 1 is required.

1. Definition of life cycle, stages, and transitions

Note: These settings are valid for the WebClient UI and for the My Accounts Fiori app.

  1. In Customizing for Cross-Application Components, choose SAP Business Partner -> Business Partner -> Basic Settings -> Business Partner Roles.
  2. Define the stages in the activity Define BP Roles.
Technically, stages correspond to business partner roles. We recommend that you create new roles and assign new role categories to these roles, rather than using standard roles as life cycle stages. There are, however, no restrictions on using standard roles.
By creating new roles and roles categories, you ensure that the stages assigned to an account are updated in the application table BUT100.
  1. Define a life cycle in the activity Define BP Role Exclusion Groups.
Technically, a life cycle corresponds to a role exclusion group.
  1. In the same activity, assign the stages to the life cycle.
To do this, select the role exclusion group you have just created and double-click BP Role Exclusion Groups --> BP Roles in the dialog structure. Choose New Entries and add the roles that constitute the individual stages of the life cycle. Note that a business partner role (that is, a stage) can be assigned to only one exclusion group.
  1. In the same activity, define the transitions from one stage to another.
To do this, double-click BP Role Exclusion Groups --> Permitted Transitions in the dialog structure, choose New Entries, and enter the transitions you require.
Note that only the roles assigned to the role exclusion group can be entered in the From BP Role and To BP Role fields.

Although it is possible to define an unlimited number of role exclusion groups, we recommend that you use only one exclusion group to implement the account life cycle. Once a life cycle stage is entered for an account, the role exclusion group (or life cycle) is determined in the background. After this, it is not possible to change to a stage from another life cycle (exclusion group).

To make the Lifecycle Stage field available in the My Accounts Fiori app, see the Extension Guide provided with SAP Note 2016653.

For the WebClient UI, continue with step 2 and the additional optional steps described below.

2. Enhancement of screen configuration

  1. Execute transaction BSP_WD_CMPWB, enter the component BP_HEAD, and choose Display.
  2. In the component structure, double-click the view BP_HEAD/CorpAccountDetailsOV for corporate accounts (for individual accounts the view BP_HEAD/IndDetailsOV, for groups the view BP_HEAD/GroupAccountDetailsOV).
  3. Go to the Configuration tab page and select the configuration in which you intend to display the Life Cycle Stage field. Switch to edit mode.
  4. Show the available fields and select the Lifecycle node.
  5. Expand the node and select the Life Cycle Stage field.
  6. Add this field to the configuration and position it as you like. Enter the text Life Cycle Stage as the field label, if it does not yet exist.
  7. Save your changes.
  8. Repeat these steps for the create and edit views for the relevant account category (corporate, individual, group), for example, the view BP_HEAD/CorpAccountNewEF for the create view for corporate accounts, the view BP_HEAD/CorpDetailsEF for the edit view for corporate accounts, and so on.

The Life Cycle Stage field is now available on the account pages of the WebClient UI and is ready for use.

3. Screen control

Screen control dependent on the life cycle stage enables you to do the following:

  • Display additional assignment blocks that should only be available if the account is in a certain life cycle stage.
  • Hide assignment blocks that should not be available in certain life cycle stages.

You can influence the assignment blocks displayed on the overview page of the account dynamically by implementing the Business Add-In (BAdI) BADI_CRM_BP_UIU_VIEWS from the enhancement spot CRM_UIU_BP_ENHANCEMENT with the filter value BP_HEAD as COMPONENT.

Within the implementation of the interface method IF_UIU_BP_VIEWS~DETERMINE_VIEWS you can evaluate the current life cycle stage, and the corresponding role exclusion group, by the current instance of the custom controller BP_HEAD/Lifecycle.

The custom controller should be retrieved from the referenced view controller passed in the parameter IR_VIEW_CONTROLLER by calling GET_CUSTOM_CONTROLLER() and providing the custom controller name BP_HEAD/Lifecycle.

Note that the custom controller Lifecycleis only available for the component BP_HEAD.

Fill the table CT_DETACH_STATIC_VIEWS and CT_ATTACH_STATIC_VIEWS with views that you intend to detach from and attach to the range of displayed assignment blocks.

4. Field modification

If the account has a certain life cycle stage, you might want certain fields in the account details to be mandatory or hidden. For example, if the account has the Prospectstage, the E-Mail Address field should be mandatory and the Rating field hidden, but for the Customer stage the Rating field should be visible again.

Since the WebClient UI does not provide field modification capabilities, as available in the SAP GUI using the BDT, for technical and conceptual reasons, a separate configuration has to be created for every set or combination of fields (also in terms of field status) for the corresponding UI object type (BP_ACCOUNT and BP_ADDRESS).

If the configuration has to be changed for a certain life cycle stage, the corresponding configuration has to be addressed by the object type and object subtype for which it has been created.

Therefore, if you need to address another configuration based on the current life cycle stage, you can create a new configuration, or copy an existing configuration, which can serve as a template (this is recommended, as the differences in the configurations will be small), and enter the corresponding object subtype.

a) Determination of object subtypes when creating new configuration

When creating or copying a configuration, you must provide the object type and the object subtype. The object type in the above example is DEFAULT/BP_ACCOUNT or BP_ADDRESS, whereas the object has to be defined by the application or customer.

The determination of object subtypes can be done by implementing the BAdI CRM_BP_UIU_CONFIG_CALLBACK from the enhancement spot CRM_UIU_BP_ENHANCEMENT. If you create an implementation of the interface method IF_CRM_BP_UIU_CONFIG~ GET_OBJECT_SUB_TYPES, you can return all required object subtypes in the table CT_SUBTYPE for the object type passed in IV_OBJECT_TYPE.

b) Determination of configuration at runtime

The determination of the configuration to be displayed for the current life cycle stage can be done by implementing the BAdI CRM_BP_UIU_VIEW_CONFIG from the enhancement spot CRM_UIU_BP_ENHANCEMENT.

You implement the interface method IF_CRM_BP_UIU_VIEWS~CHANGE_CONFIG_TYPES for filter values corresponding to the view IDs for which you want to change the configuration. You return the object type and object subtype of the configuration you want to be displayed based on the current life cycle stage (or any other attribute value), which can be evaluated by reading the current life cycle stage, and the corresponding role exclusion group, from the custom controller BP_HEAD/Lifecycle. The current custom controller instance can be retrieved by calling the method GET_CUSTOM_CONTROLLER() of the passed view controller in IR_VIEW_CONTROLLER providing the controller name BP_HEAD/Lifecycle.

Note that the custom controller is only available in component BP_HEAD. The object type BP_ADDRESS is also used (component BP_ADDR), for which no values can be evaluated for the custom controller Lifecycle. If you intend to change address configurations, store the current life cycle stage locally with the object type DEFAULT (or BP_ACCOUNT) if passed to the BAdI implementation. If you want the BAdI to be called for views in the component BP_HEAD also enter the view ID BP_HEAD/AccountDetails as a filter value to get proper custom controller values.

5. Defaulting a life cycle stage

If you want an initial life cycle stage to be defaulted when creating an account, or you want to override the role exclusion group defaulted by the standard (which is the first role exclusion group found in the Customizing table TB003C or TB003E), perform the following steps:

  1. Create an implementation of the BAdI BADI_CRM_BP_UIU_DEFAULTS from the enhancement spot CRM_UIU_BP_ENHANCEMENT for the interface method IF_UIU_BP_DEFAULTS~GET_DEFAULT_VALUES.
  2. For an example of the logic that needs to be implemented in the implementation of the method GET_DEFAULT_VALUES, see the standard implementation (which is processed before calling the BAdI BADI_CRM_BP_UIU_DEFAULTS) in the method CL_BP_ROLES_ACCOUNTLIFECYCLE=> IF_UIU_BP_DEFAULTS~GET_DEFAULT_VALUES.
  3. Within the implementation of method GET_DEFAULT_VALUES, you can retrieve the role exclusion group, which will serve as the current life cycle, from the table TB003C (definition of role exclusion group). Make sure that at least one role is assigned to the role exclusion group in the table TB003E.
  4. Determine the current role exclusion group (and initial stage) and set the corresponding values in the custom controller BP_HEAD/LIFECYCLE. The current custom controller instance can be retrieved from the passed view controller in parameter CR_ME. The parameter IV_FIRST_TIME indicates whether the view is displayed the first time. Bear this in mind if defaulting the initial life cycle stage so as not to overwrite a selected life cycle stage.

6. Searching for accounts by life cycle stage

To enable the search for accounts by life cycle stage within the standard account advanced search and account value help, perform the following steps:

  1. In the component workbench (transaction BSP_WD_CMPWB), enter the component BP_HEAD_SEARCH and choose Display.
  2. To enhance the account advanced search by the search parameter Life Cycle Stage, double-click the view BP_HEAD_SEARCH/MainSearch. For the search help, double-click the view BP_HEAD_SEARCH/SearchHelp.
  3. Go to the Configuration tab page, select the configuration you want to enhance, and switch to edit mode.
  4. From the list of available search criteria, move the search criterion Life Cycle Stage to the list of selected search criteria.
  5. Save your changes.

The search criterion Life Cycle Stage is now available in the account advanced search and value help.






General Material Data   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 13358 Date: 20240523 Time: 155706     sap01-206 ( 227 ms )