Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Workflow Classes & Subclasses (Error..)

Hello there,

Im having problems using subclasses on workflows, if you experts know the answer ill appreciate

ill try to be simple and straight forward:

I have a Main class ZWKF_EMPLOYEE and a subclass ZWKF_EMPLOYEE_SINDICALES_ES.

  • Main and key attribute is the PERNR and a BEGDA of a Employee

I have a method a in the subclass that i want to access from the workflow, but the workflow cant access it, cause only accesses the main class methods.

I understand the problem, but cant find a proper solution, is it possible that SAP Workflows (interface IF_WORKFLOW) dont support classes inherance.. ?


  • Step 1 Create employee instance from subclass (ZWKF_EMPLOYEE_SINDICALES_ES)
  • Step 2 Send notification from subclass (ZWKF_EMPLOYEE_SINDICALES_ES)


Step 1: ( The classes used on the bindings is allways the subclass)

Step 2: ( The classes used on the bindings is allways the subclass)

My problem is the FIND_BY_LPOR method, its static and cant be re-defined by the subclass, meaning it allways returns the Main class and the workflow while in runtime, doesnt detect the method on the subclass.

Error on workflow:

FIND_BY_LPOR Method sample:

Related post:

Re: trying to use subclass in workflow, but superclass is instantiated


Hello Nelson,

The problem has nothing to do with WF not supporting subclasses. In fact, Workflow will quite happily handle polymorphism - you could for example define your WF container element as the supertype and use the subtype in your task.

This is standard ABAP Objects, statics cannot be redefined. The mistake here isĀ  instantiating a fixed object type in your FIND_BY_LPOR. What you want to do is:

CREATE OBJECT employee TYPE (lpor-typeid) EXPORTING ...

There's a whole chapter on classes in the book as well.



2 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question