SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

Add additional option for forgot password/username for project CRM_UTILITIES_UMC_URM

mantu_kumar
Explorer
0 Kudos

We have one scenario to add business agreement field also a option to forgot password/username.

In forgot password/username, we have option to pass username or email ID.

The project CRM_UTILITIES_UMC_URM have below function import to perform below:

1. When provide Email

/sap/opu/odata/SAP/CRM_UTILITIES_UMC_URM/ResetUserCredentialUsingEmail?UserEmailID='test@gmail.com'

2. When provide UserName

/sap/opu/odata/SAP/CRM_UTILITIES_UMC_URM/ResetUserCredential?UserName='testuser'

Here we want to add additional field e.g. BUAG ID also.

The Standard model class CL_CRM_IU_UMC_URM_MODEL have defined below two function import.

ResetUserCredential and ResetUserCredentialUsingEmail.

Is there any option provided to add additional functional import e.g. "ResetUserUsingBUAG" without extending the standard model class?

1 ACCEPTED SOLUTION

yevgen_trukhin
Advisor
Advisor
0 Kudos

No other options but to extendHopefully, this should help:

Yevgen

View solution in original post

4 REPLIES 4

yevgen_trukhin
Advisor
Advisor
0 Kudos

No other options but to extendHopefully, this should help:

Yevgen

former_member189275
Discoverer
0 Kudos

Hi Mantu,

I have a similar requirement as of yours. Can you kindly let me know what steps did you followed? I need to add two extra fields for validation....business agreement and telephone number along with Email ID and user name ( which are from standard ) for forgot password scenario. ( So it will be a combination of 4 fields all AND condition )

If I follow the document from Yevgen above, do I need to enhance the structure for User Request to add the extra fields i.e. business agreement and telephone ?

I think business agreement is already there only need to define them in the custom class. Please let me know your approach.

Regards.

Abhishek

0 Kudos

Hi Abhishek,

Yes you are correct. You have to enhance the structure and then you have to enhance standard model provider class.to add custom fields in metadata. You have to also enhance the data provider class to write your corresponding logic.

Hope this will help.

Thanks,

Mantu

0 Kudos

Hi Mantu,

Thanks for the prompt reply.

I need to do user verification for forget password with a combination of 4 fields ( in standard we have only user name or email). The fields are USER NAME, BUAG_ID, EMAIL and PHONE_NUM.

Still have few open questions.

1. Will the entity type = UserRequest  work also for forgot password scenario? It is working for creating users in the system as per standard. Even in debug mode in the verification badi, the structure IV_USER_REQUEST_INFO gets populated with the input values.

2. Since I am dealing with standard 4 fields which already exists in the UserRequest entity, do I need to enhance the structure? ( in your use case, you needed BUAG_ID which is a part of the structure, so still you had to enhance the structure?).

3. I have not enhanced the structure at this moment. But have implemented all the steps given in the document by Yevgen. All steps incorporated. Custom model provider class created. Custom service created and added at Gateway and also loaded the metadata. Verification BAadi too implemented.

But its not working throwing error message " User already exists". This message comes when the verification badi triggers during creation of user. In user creation scenario, if the user already exists then it throws this message as part of verification.So wandering what mistakes have been made for forgot password scenarios.

4. Finally what changes need to be done at front end UI5 side? Right now the new custom service has been assigned. ResetPasswordByuserName and resetPasswordByEmail has been commented and instead UserRequestCollection has been passed to resetPasswordByUserName at UI5 end.

Sorry for so many doubts, but really need these input.

Regards.

Abhishek