cancel
Showing results for 
Search instead for 
Did you mean: 

Problems at Redefine IP_FROMPRDETAIL from component ContractListStart.

Former Member
0 Kudos

Hello experts, I have redefined the inbound IP_FORMPRDETAIL from component ContractListStart, but when I copy the standard code and paste in the IP_FROMPRDETAIL redefined, give me some errors of methods:

me->create_empty_contracts( EXPORTING ir_col_pods = lr_col_pods

CHANGING cr_col_newcontracts = lr_col_newcontracts ).

me->update_newcontracts( EXPORTING ir_col_pods = lr_col_pods

CHANGING cr_col_newcontracts = lr_col_newcontracts ).

store_selected_contracts( ).

The systems doesn't recognize this methods, and tell me that this methods don't exist or are unkonwn, How I can solve this. How I can call this methods. Instance an object??

Thanks in advance best regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Try to add 'super' to the method call, like this:

super->create_empty_contracts( EXPORTING ir_col_pods = lr_col_pods

CHANGING cr_col_newcontracts = lr_col_newcontracts ).

super->update_newcontracts( EXPORTING ir_col_pods = lr_col_pods

CHANGING cr_col_newcontracts = lr_col_newcontracts ).

Super just refers to the super class, the class from which you inherited. When you copy or enhance a certain object, all the related classes are created in the customer namespace (Z) and thus these Z classes inherit from the 'super' class.

Hope this helps,

Kind regards,

Joost

Former Member
0 Kudos

Hello, thanks for your help, when I use SUPER in IP_FROMPRDETAIL for the method store_selected_contracts(). Like this:

SUPER->store_selected_contracts( ).

And Give me the error: You cannot access private method STORE_SELECTED_CONTRACTS. not allowed.

This methods is in IP_FROMPRDETAIL of Component IUICCON, and view ContractListStart. Can you help me please ?

Former Member
0 Kudos

Hello,

If the method is private you cannot access it from a class that inherits from this class, this behaviour is a key principle of object oriented programming.

To be able to solve your problem:

Try to redefine the STORE_SELECTED_CONTRACTS method and copy paste the code from the class you inherited from. The function is still private (you cannot change the modifier of inherited methods) but has a local definition within your class, so you can access and use it.

Another solution would be to identify if the STORE_SELECTED_CONTRACTS method is used/called in another method of that same class and hope that that class is public (public = can be called by inherited classes)

Hope this helps,

Kind regards,

Joost

Answers (0)