ABAP Classes in Workflow


11.  Local Conventions within Methods: 

For parameters: 

IMPORTING parameters

IM_<parameter name>

EXPORTING parameters

EX_<parameter name>

CHANGING parameters

CH_<parameter name>



 12.              Using ABAP Classes in Workflow: 

Within the SAP WebFlow Engine we can use ABAP classes that support the IF_WORKFLOW interface. Classes that have implemented the IF_WORKFLOW interface are recognized as workflow-enabled in the Class Builder. 

13.  How to create ABAP Classes that support IF_WORKFLOW interface? 

  • Go to transaction SE24 and create a customized class.

  • Next the pop up appears where we need to mention the detail as follows:


  • Save it and the class is created.
  • Now the class is to implement IF_WORKFLOW interface. For this go to the   tab and declare the IF_WORKFLOW as the interface there and press Enter; two sub-interfaces appear: BI_OBJECT and BI_PERSISTENT. Save the Class.

  • The ZCL_TEST class now contains the existing methods of IF_WORKFLOW interface.

14.             Lights on Key Attributes and Attributes:

The key attributes are used to define the object key. There can also be other defined attributes other than key attributes. The SAP WebFlow Engine can access all public attributes of a class.

Key Attributes:

In the Class Builder there is an additional column Key Attributes on the  tab page as shown below:

We need to check this box when we are defining any attribute as the Key Attribute.

All key fields must be character-type fields (elementary types: CHAR, NUMC) and have a defined length. The maximum length allowed for all key fields is 32 characters. The length of the key field for the persistent display is 32 characters.

In the case of persistent ABAP objects we can use the GUID, which is generated automatically by the object manager when an instance is created.


In addition to all the other data types that the Class Builder supports, we can also define attributes with reference to an object from the Business Object Repository (BOR). To do this, we have to use the structure SWOTOBJID as the data type. The BOR object is determined using the corresponding value.

To assign a BOR object instance to an attribute we need to use the corresponding BOR macros. Normally, this is implemented within the CONSTRUCTOR of a class.

To use the BOR macros in a class, two INCLUDES must be included.

Ø      Include <CNTN03>……………contains the local types

Ø      Include <CNTN02>……………contains the BOR macros 

An example to show how to define Attributes and Key Attributes: 

To Continue....Click here 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image