cancel
Showing results for 
Search instead for 
Did you mean: 

Redifine method ACTIVATE_SWITCH_MESSAGE, Help with INHERITCED Please

Former Member
0 Kudos

Hello, Thanks for your time,

I have created a subclass ZCL_CRM_IU_SWITCH_MSG_ENTITY inheritced from class ZCL_CRM_IU_SWITCH_MSG_ENTITY, and I have redefined the method ACTIVATE_SWITCH_MESSAGE,

but I have put the new code in this method and doesn't stop in the new redefined ACTIVATE_SWITCH_MESSAGE from class ZCL_CRM_IU_SWITCH_MSG_ENTITY.

Calls the ACTIVATE_SWITCH_MESSAGE from superClass (CL_CRM_IU_SWITCH_MSG_ENTITY),

Is necesary to make more changes in BOL Objects, I think thats CL_CRM_IU_SWITCH_MSG_ENTITY corresponds to isuSwtMsg bol object

A lot of thanks for your answer

Regards

the climber

Accepted Solutions (1)

Accepted Solutions (1)

CarstenKasper
Active Contributor
0 Kudos

Hi Javier,

what type is the runtime instance? Is it of your new class or of the standard one?

If the standard class is instantiated, it is sure the standard methods are called.

As the method you mention is public, there should not be any other problems. My where used list came up empty. So have a look at the call stack at runtime. If there is a call from within the constructur, you have a problem.

cheers Carsten

Former Member
0 Kudos

Thanks for you time and sorry for my poor explanation, I would like to redefine the method ACTIVATE_SWITCH_MESSAGE from class CL_CRM_IU_SWITCH_MSG_ENTITY.

This method is called when I push the button of

component IUICCON

view "IUICCON/ProcessSaveButtonBar",

event EH_ONBT_SAVE_PROCESS.

I have tried to create a subclass and redefine the method ACTIVATE_SWITCH_MESSAGE, and I have put a breakpoint in this redefined method from class ZCL_CRM_IU_SWITCH_MSG_ENTITY but doesn't stop.

When I push the button continue calling the method from standard class .

How I can make this??

call stack of my scen

-


15) Class CL_CRM_IU_SWITCH_MSG_ENTITY Method ACTIVATE_SWITCH_MESSAGE

14) Class CL_CRM_IU_ORDER_ITEM_ENTITY Method IF_CRM_IU_ORDER_TRX_SUBSCRIBER-BEFORE_ORDER_SAVE

13) Class CL_CRM_IU_ORDER_TRX Method IF_BOL_TRANSACTION_CONTEXT-SAVE

12) Class CL_CRM_BOL_CUSTOM_TX_CTXT Method IF_BOL_TRANSACTION_CONTEXT-SAVE

11) Class CL_CRM_IU_PROC_MGR_ENTITY Method FINISH_PROCESS

10) Class CL_CRM_IU_PROC_ENTITY Method EXECUTE

9) Class CL_IUIC_PROCESSMGR_HANDLER Method FINISH_PROCESS

😎 Class CL_IUICCON_PROCESSMGR_IMPL Method SAVE_PROCESS_DATA

7) Class ZL_IUICCON_PROCESSMGR_IMPL Method SAVE_PROCESS_DATA

6) Class ZL_IUICCON_PROCESSSAVEBUT_IMP1 Method EH_ONBT_SAVE_PROCESS

5) Class CL_IUICCON_PORCESSAVEBUT Method HANDLE_EVENT

4) Class ZL_IUICCON_PROCESSSAVEBUT_IMP1 Method HANDLE_EVENT

3) Class CL_BSP_CONTROLLER2 Method IF_BSP_CONTROLLER-HANDLE_EVENT

2) Class CL_BSP_WD_VIEW_CONTROLLER Method IF_BOL_TRANSACTION_CONTEXT-SAVE

1) Class CL_BSP_CONTROLLER2 Method IF_BSP_CONTROLLER-HANDLE_EVENT

-


Best Regards and Thanks

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Javier,

Why do you want to redefine the BOL Class method ??

Is there any specific reason behind this ?? I recommend instead of redefining the Standard BOL method, try making the custom logic at the application layer.

Any framework is a set of classes, and at some places it has been hardcoded that "A kind of object" is called. I mean to say, the caller method always knows which class method it is calling. So, even if you redefine the method, that would not serve the purpose. Can you send me the call stack of your scenario ?

Regards,

Vinay

Former Member
0 Kudos

Hello Nagur Kanna a lot of thanks for your help

You can see the call stack of my scenario in my last post.

What I can do, to redefine the method??

Thanks in advance.

Former Member
0 Kudos

Hello Javier,

Yes, i can find the call stack. if you want to redefine this method and to be sure that this method is called, you wud have to redefine the classes in between from the button process.. This is not a recommended approach.

What code do you want to put in that redefined method..

Probably why dont you explain me the scenarion in more detail so that we can look for other feasible approach.

Thanks,

Vinay

Former Member
0 Kudos

Thanks Naggur Kana

Is there other option??

CL_CRM_IU_SWITCH_MSG_ENTITY corresponds to a object bol,

Can I redefine the object bol or other option for always take the class ZCL_CRM_IU_SWITCH_MSG_ENTITY??

I have created in IUICCON other button and I would like to controlate the switching to left the contract in other new status (request), We need redefine this method.

Redefine all clases is very dificult, do you know other option?? with bol objects ??

I asked to people for other proyect and they say that:

Create a subclass and redefine method, but I have made this, and continue calling to standard class

A lot of thanks

Former Member
0 Kudos

THE SOLUTION:

GO TO THE TABLE CRMC_IU_BOL_IMPL and you asing the Z class for the bol object , and the system get the Z CLASS.

Thanks for your help