Skip to Content
0

Method naming convention in sub classes (inheriting from SAP Standard)?

Nov 28, 2017 at 09:37 AM

37

avatar image

Is there a guideline or naming convention for method names in classes, which inherit from SAP standard classes?

The reason for the question is, that if you have an inheritance "tree" it might be helpful to know if a method is from a customer specific class in the inheritance hierarchy.

Another advantage would be, that through this it might be a little more "upgrade-save", because it should be less likely, that this method name is used in the SAP standard class.

So e.g.:

1. CL_CLASS
1.1. ZCL_PARENT_CLASS
1.1.1. ZCL_SUB_CLASS

If I now want to call a method within ZCL_SUB_CLASS, I will not see directly if the method originates from the SAP Standard CL_CLASS or the customer specific parent ZCL_PARENT_CLASS.

To start such methods with "Z..." or "Y..." is not a good solution in my point of few.

Perhaps an underscore ("_...") may be an option?

It is no problem, more like a coffee corner question... I'd just be interested, if there are already some ideas or concepts regarding this topic.Thanks,Amadeus
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers