Skip to Content
0
May 17, 2016 at 01:29 PM

Extending key attributes with IF_WORKFLOW

168 Views

Hi Wuggies,

I'm a bit stuck with the design of class hierarchy that involves the IF_WORKFLOW-Interface:

The ABAP Class, that first includes/implements the IF_WORKFLOW Interface has got the column "Key" in the attributes tab available. The checkboxes there are ready for input for all the attributes, which are created on the current class Level. So far, so understood: You can't make an existing attribute a "Workflow" key-field afterwards... However, I wonder, why there is such a restriction. It seems a bit unnessesary.

However, when there's no key field checked (as e.g. it's a quite generic implementation), any of the subclasses cannot make any of its attribute a key-member (and of course it still can't modify the key-checkbox ... if though the attribute was created having the IF_WORKFLOW interface).

Basically you can't create key field attributes, once you've inherited a class. For that I'm a bit disappointed, as ABAP Objects tends to use inheritance, isn't it??).

I've read through the Blogs here that explain the usage ... but none of them uses real inheritance.

http://scn.sap.com/community/bpm/business-workflow/blog/2006/06/28/getting-started-with-abap-oo-for-workflow-using-the-ifworkflow-interface

http://scn.sap.com/community/bpm/business-workflow/blog/2006/08/21/using-abap-oo-attributes-in-workflows-and-tasks

Is there anybody, who's got any design solution or Workaround here available?

The text-bases class builder didn't bring any further Options.

Florin