cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CRM: Opportunity Save BADI

Former Member
0 Kudos

When Trying to find a BADI so as to implement error message

when saving Opportunity on WEB UI screen, I have kept Break point in

CL_EXITHANLDER Class, GET_INSTANCE Method to know the BADI Name.

What I found was when I click on Save button on Opportunity Screen in UI

I can find several badi's names are populated in EXIT_NAME variable,

Can I know which one we should consider, for our application,

how to justify/determine the same, My Requirement is to

check whether Item Product details are not updated or not in Opportunity

if not raise an Error messagge using global message service on Web UI Screen,

Can any one provide clear steps and information for the same.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

What is the difference of implementing using BADI or in EH_ONSAVE method of Overview set. Is there any difference/advantage with respect to both the approaches. Like BADI applicable for all users or EH_ONSAVE applicable for specific user with role config key etc.. Your thoughts are highly appreciated.

praveen_kumar194
Active Contributor
0 Kudos

yeah your understanding is correct. code in ON_SAVE event handler is specific to its component and BADI is generic, means, not only opportunity , badi implementation will be triggered for reamaining transactions as well.

like if i create implementation for ORDER_SAVE, then implementation will be called when you press save on opportunity or contract or order. but still you can control it to execute for only specific transactions (based on transaction type, business category).

and also take code size into consideration. using very complex logics , longer code in event handlers is not suggested.

hope it helps.

Former Member
0 Kudos

Hi Srinivas ,

You can also place the logic in EH_SAVE method of overview set of opportunity component. Place your validations and then raise error messages and exit if they fail.

Regards,

Nithish

Former Member
0 Kudos

What is the difference of implementing using BADI or in EH_ONSAVE method of Overview set. Is there any difference/advantage with respect to both the approaches. Like BADI applicable for all users or EH_ONSAVE applicable for specific user with role config key etc.. Your thoughts are highly appreciated.

praveen_kumar194
Active Contributor
0 Kudos

you can save  order_save badi and create one implementation for it. in the method CHECK_BEFORE_SAVE, you will get guid of opportunity and do your validations. use CRM*MESSAGE*COLLECT fm to raise your messages.

hope it hleps you.

Former Member
0 Kudos

What is the difference of implementing using BADI or in EH_ONSAVE method of Overview set. Is there any difference/advantage with respect to both the approaches. Like BADI applicable for all users or EH_ONSAVE applicable for specific user with role config key etc.. Your thoughts are highly appreciated.