cancel
Showing results for 
Search instead for 
Did you mean: 

Event handler redefinition is not called

Former Member
0 Kudos

Hi!

I enhanced the component ICCMP_BP_DETAIL for the view BuPaCreate. I redefined the event handler EH_ONSAVE, but is not called the redefinition always call the standard code.

I need the code redefined is being called. I reviewed the DO_HANDLE_EVENT method and have the following code:

* Eventhandler dispatching
    CASE htmlb_event_ex->event_server_name.

      WHEN 'PARTNERCATCHANGED'.                             "#EC NOTEXT
        eh_onpartnercatchanged( htmlb_event    = htmlb_event
                    htmlb_event_ex = htmlb_event_ex ).

      WHEN 'save'.                                          "#EC NOTEXT
        eh_onsave( htmlb_event    = htmlb_event
                    htmlb_event_ex = htmlb_event_ex ).

      WHEN OTHERS.
        global_event = super->do_handle_event( event           = event
                                               htmlb_event     = htmlb_event
                                               htmlb_event_ex  = htmlb_event_ex
                                               global_messages = global_messages ).

    ENDCASE.


Accepted Solutions (1)

Accepted Solutions (1)

stephenjohannes
Active Contributor
0 Kudos

I assume that you already looked at the viewcluster BSPWDVC_CMP_EXT and validated that the component enhancement for that component exists in the listing of enhancements for your active enhancement set?

Also another basic thing would be are you logging into business role that is assigned to your enhancement set?

It woudl be very strange for the method redefintion to not be called, if you enhanced things the right way and your business role configuration was correct.

OH also make sure you don't have WCF_IGNORE_ENHANCEMENT set on your userid.  That would also cause the code not to run .

Take care,

Stephen

Former Member
0 Kudos

Hi David,

When you keep External Breakpoint in DO_HANDLE_EVENT, are you able to debug?

Can you please check?

Thanks,

Sandeep

Former Member
0 Kudos

Hi Sandeep,

I put an external break point in standard code and in custom code for the method DO_HANDLE_EVENT, and only stops at the standard code...

Thanks,

David

Former Member
0 Kudos

Hi Stephen,

e viewcluster BSPWDVC_CMP_EXT and I validated that the component enhancement for that component exists in the listing of enhancements. I attached one picture about this.

When you say "business role that is assigned to your enhancement set", where is the customizing for do that?

I don't have WCF_IGNORE_ENHANCEMENT set on me user...

Thanks for the help.

David

former_member182421
Active Contributor
0 Kudos

I guess the view BSPWDV_EHSET_ASG is also correclty maintained, right?

If you set a break-point in an any redefined methods of the component BP_HEAD it works?

Can you also add a screenshot of the controller substitution (step 3 in your first screenshot)

Former Member
0 Kudos

Hello Luis!

Thats it's the problem the view BSPWDV_EHSET_ASG it's not mantained. I put the entry and it works!

Thanks for everyone!

Cheers

David

former_member182421
Active Contributor
0 Kudos

Thanks for your feedback

stephenjohannes
Active Contributor
0 Kudos

Ignore the business role assigment and that table that Luis said was what I really meant.  Glad to see that you resolved your issue.  It looks like I need to get rid of some of the rust stuck on my brain when answering questions in the spaces again .

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sandeep,

The event DO_HANDLE_EVENT is redefined and not works properly. I don't what is the reason why the system call the standard code and not call the redefinition.

Any idea?

Thanks,

David

former_member182421
Active Contributor
0 Kudos

Any other redefined methods of the view controller is called? did you try with the DO_PREPARE_OUTPUT? for example

Cheers!

Luis

Former Member
0 Kudos

Hi Luis,

Yeah all the methods redefined never call... I don't know what is the problem...

Cheers

David

former_member182421
Active Contributor
0 Kudos

Then I suggest to follow Stephen's approach and come back to us.

Former Member
0 Kudos

For your information,

We are working with SAP CRM EhP3

Former Member
0 Kudos

Hi David,

Event names are case sensitive. I assume in your case the event name would be 'SAVE'.

So can you redefine your DO_HANDLE_EVENT and modify the code as below:

WHEN 'SAVE'.                                          "#EC NOTEXT

        eh_onsave( htmlb_event    = htmlb_event

                    htmlb_event_ex = htmlb_event_ex ).

I hope that solves your problem.

Thanks,

Sandeep