Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

OOps question

0 Kudos
406

In class 'CL_CI_TEST_S4H_SEARCH_DB_OPS' the method 'REPORT_FINDING' is private. I am unable to call this method into my report. How should I call this private method in my program?

4 REPLIES 4

nehasaini
Discoverer
281

Hello,

It is not possible to call a private method directly.

Check if this private method is being used by some public method. If yes u can call the public method from your ABAP code.

(Private methods can only be called from another method in the same class. As this class is delivered by SAP you can do nothing with this class if the private method is not called inside any public method.)

Hope it was useful 🙂

Regards.

raymond_giuseppi
Active Contributor
281

basically, Private methods can not be called from outside the class,thats why they are private.

shantraj
Explorer
281

Yes, you cannot call Private methods.

Inside Method "INFORM" Method "REPORT_FINDING" is getting checked, Try calling this method.

check report_finding( ls_finding_infos ) = abap_true.

ThFiedler
Product and Topic Expert
Product and Topic Expert
281

This is an implementation class of a code inspector check. You cannot use these classes stand-alone. Why do you want to do that?

Regards,

Thomas.