Site menu:

Standard Job Search
Keywords: Country: Advance Search






XXXXXXX is not a method of class: This is one of the common error we see, if you tried to use a Method which is Protected or Private outside the Application Class.

When you define the Methods as Private and Protected they need to be used only in that class.

This is main difference of Private Public and Protected methods of PeopleSoft Application class.

Take look at this code, Say this is the code we have for an Application Class PVT_PRT_PUB


class PVT_PROT
method PVT_PROT();
method Print_All();

protected
method OnlyProtected();

private
method PrivateOnly();

end-class;

method PVT_PROT
end-method;

method Print_All
WinMessage("Printing Private and Protected", 0);
end-method;

method OnlyProtected
WinMessage("This is only Protected");
end-method;

method PrivateOnly
WinMessage("This is Private Only");
end-method;



Say we want to use the class PVT_PROT outside the Application Class, I mean you can use in any Type of PeopleCode , say you used it in Field Change PeopleCode

import PVT_PRT_PUB:*;

Local PVT_PRT_PUB:PVT_PROT &PrintPvt = create PVT_PRT_PUB:PVT_PROT();

&PrintPvt.Print_All();
&PrintPvt.OnlyProtected();
&PrintPvt.PrivateOnly();


If we use the Above code we will get the following error when tried to save this.

OnlyProtected is not a method of class PVT_PRT_PUB:PVT_PROT. (2,52)
PrivateOnly is not a method of class PVT_PRT_PUB:PVT_PROT. (2,52)




Posted by: Vamsi      Date: 2015-01-07


        Post more Comments :
Name:
EmailID:
Date:
Comments: