abapOpenChecks - Installation - Checks - Utilities - Links

CHECK_90 - Constructor visibility must be public

Improve this page
CODE

“In a global class, the instance constructor must always be declared in the public visibility section, for technical reasons. In principle, the constructor can be declared in the same visibility sections as in the table above, however this can cause unexpected syntax errors when the class is used, due to the way it is organized internally.”

https://help.sap.com/doc/abapdocu_753_index_htm/7.53/en-US/index.htm?file=abapmethods_constructor.htm

https://help.sap.com/doc/abapdocu_753_index_htm/7.53/en-US/abeninstance_constructor_guidl.htm

https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public

Configuration

Configuration