cancel
Showing results for 
Search instead for 
Did you mean: 

Method is not Public

Former Member
0 Kudos


Hi All,

I ahve created a public method in se24 in a custom class with IF_WORKFLOW as interface.

Now I used this class in workflow task and trying to use this method.But am getting error: Method is not Public.

Can anybody guide me how to proceed.Sreen shot attached.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

SandySingh
Active Contributor
0 Kudos

Hello

Refer to following links for reference. Model your custom class on SAP delivered Class CL_SWF_FORMABSENC

Using ABAP OO methods in Workflow Tasks 

Using ABAP OO attributes in workflows and tasks

Getting started with ABAP OO for Workflow ... using the IF_WORKFLOW interface - ABAP Development - S...

Regards

Sandy

Former Member
0 Kudos

Tried this however no luck!

One more observation is on clicking F4 help agaianst method for class, no method is listed whereas the method ZTEST exists in the class.

Former Member
0 Kudos

JD,

Solution might seems stupid, but yeah please check whether Class and methods are activated.

If you are navigating through SWDD please close the workflow and try from PFTC transaction.

We also have faced this many times. But above steps resolved our issues.

Regards,

Vinay Mutt

SandySingh
Active Contributor
0 Kudos

Hello

You can activate the class and methods . Log out of SWDD workbench. Run Transaction SWU_OBUF to clear buffers and then go in SWDD To add the task with class methods.

Regards

Sandy

Former Member
0 Kudos

Hurrah!It worked.SImply going out of SWDD has worked.

Thnaks a ton.

Answers (3)

Answers (3)

anjan_paul
Active Contributor
0 Kudos

Hi,

  Can you please share the screenshot of the class.

What is the visibility of the method -Is it private or public? Please check and share.

Former Member
0 Kudos


On double clikcing BI_PERSISTENT~FIND_BY_LPOR and BI_PERSISTENT~LPOR i got message :

'

Interface method BI_PERSISTENT~FIND_BY_LPOR has not yet been implemented

Kindly help.'

SandySingh
Active Contributor
0 Kudos

Hello

Just check again if your custom class has following interfaces included in Interface tab

BI_OBJECT

BI_PERSISTENT

IF_WORKFLOW

Just go in each of methods of above interfaces and activate. You dont have to code in anything in these methods if you are not using the Class as Workflow Object instance. Looks like your class is just a class that will be used for static methods for workflow

If so, just add a static Public method and activate the Class .

Regards

Sandy

SandySingh
Active Contributor
0 Kudos

Hello,


Check methods LPOR and FIND_BY_LPOR in your cvustom class to ensure that the class instance is generated properly.


Regards

Sandy

Former Member
0 Kudos

Double clicked on these methods.

Nothing is displayed.

Kindly guide.

Former Member
0 Kudos

Hi JD,

I think you forgot to attach the screen shot.

Any class which is used in the workflow tasks has to implement the interface IF_WORFLOW.

Now you create you custom methods in this class (STATIC PUBLIC) and use those methods in your tasks.

Hope it helps.

Regards,

Vinay Mutt

Former Member
0 Kudos

already done this.