Application Development and Automation 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: 
Read only

OOps question

0 Likes
1,271

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
Read only

nehasaini
Discoverer
1,146

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.

Read only

RaymondGiuseppi
Active Contributor
1,146

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

Read only

shantraj6
Explorer
1,146

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.
Read only

ThFiedler
Product and Topic Expert
Product and Topic Expert
1,146

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.