User Self Service provides the following BAdIs to extend the solution. All these BAdIs are available as IMG activities, the technical names and the corresponding IMG activity names are provided below:
/IWBEP/BD_MGW_URM_VERIFICATION - Verify User Request
/IWBEP/BD_MGW_URM_NOTIFICATION - Define Notification Process for User Request Management
/IWBEP/BD_MGW_UM_USER_MANAGER - Implement User Management
/IWBEP/BD_MGW_UM_NOTIFICATION - Define Handler for User Management Notification
To implement the BAdIs, go to transaction SPRO, open the SAP Reference IMG and navigate to: and choose the relevant IMG activity and click Execute. For more information on the BAdI, click the display icon.
You have the option to extend the UserRequest entity of the USERREQUESTMANAGEMENT OData service with application specific fields like Business partner ID, Meter ID, and so on.
Enhance the UserRequest structure: The User Request table is provided with an include structure /IWBEP/S_MGW_URM_USR_REQ_EXT which can be enhanced and you can add your own include structures as per your requirement.
Extend the UserRequest entity in the model:
Create your own metadata provider class and inherit from the super class /IWBEP/CL_MGW_URM_MODEL.
Redefine the method DEFINE( ).
Inside the method DEFINE( ), first call super->define( ) and then define your own fields for the entity UserRequest using the metadata APIs. See an example code snippet below.
method DEFINE. DATA: lo_entity TYPE REF TO /iwbep/if_mgw_odata_entity_typ, lo_property TYPE REF TO /iwbep/if_mgw_odata_property. super->define( ). lo_entity = model->get_entity_type( 'UserRequest' ). lo_entity->create_property( iv_property_name ='<property_name> iv_abap_fieldname = '<property_abap_field_name>'). "iv_abap_fieldname should be same as present in the field of the structure /IWBEP/S_MGW_URM_USR_REQ_EXT endmethod.
Save and activate.
Maintain the Model: The newly created model provider class has to be maintained using the IMG activity which is available in the system.
Go to transaction SPRO, open the SAP Reference IMG and navigate to:and click the activity icon.
Enter a technical model name and model version.
Enter the name of the model provider class you created above and a description for the same.
Register the Service: The service has to be registered using the IMG activity which is available in the system.
Go to transaction SPRO, open the SAP Reference IMG and navigate to: and click the activity icon.
Enter a technical service name and service version.
Enter a description for the service.
Enter /IWBEP/CL_MGW_URM_DATA in the Data Provider Class field.
Click Assign Model to assign the model that was created in the Maintain model step.
Verify the extended fields: All the extended fields can be verified by implementing the BAdI /IWBEP/BD_MGW_URM_VERIFICATION.
To implement the BAdI, go to transaction SPRO, open the SAP Reference IMG and navigate to: . For more information on the BAdI, click the display icon.