cancel
Showing results for 
Search instead for 
Did you mean: 

why I can create the !!PRIVATE!! class object?

Former Member
0 Kudos

Hi, experts,

I want to use the method named SAVE_ACTIVITIES in the private class(CL_TIME_SHEET_CATSXT).

I can create a CL_TIME_SHEET_CATSXT object( named ts ) through GET_INSTANCE method in the CL_TIME_SHEET_CATSXT, and then, I can call method ts->SAVE_ACTIVITIES( ).

I don't think it is right that I can create the object although I have created it successfully!

I am very doubt why I can create the !!PRIVATE!! class in my WDA? I would like to get some private class document for webdynpro for abap.

Do you give me some hint for some document about private class?

Thanks a lot.

Best regards,

tao

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

a private class means you can't create it by yourself with such code 'create object CL_TIME_SHEET_CATSXT'.these class can be create only by themself. In your case,the creation is in the get_instance method.

a protect class can by create by himself or his friends classes.

a public class can by create everywhere.

the public METHOD of a class can be invoked everywhere,SAVE_ACTIVITIES() is a public method so that you can call it.

Regards.

Fisher

Former Member
0 Kudos

Hi,Fisher,

Thanks a lot !

Best regards,

tao

Answers (0)