SAP Web Dynpro - Assistance Class



In Web Dynpro component, you can create a uniquely assigned class inherited from the abstract class. Assistance class can store the coding that is required in a component but is not linked with the layout.

You can store dynamic text in assistance class, text combined at run time or contains variable that can be stored in the text pool.

In Assistance class, you can also save a code that is not directly linked with the layout of the application or with the controller.

Using the method _WD_COMPONENT_ASSISTANCE~GET_TEXT( ) allows you to access text symbols of the assistance class in the controller of your component. When you call the method, 3-digit id of the text symbol is used −

method MY_CONTROLLER_METHOD .
data: my_text type string.
my_text = WD_ASSIST->IF_WD_COMPONENT_ASSISTANCE~GET_TEXT( KEY = ‘001’ ).
Endmethod

You can maintain text symbols in assistance class using each controller. Click on Go to → Text Symbols in the menu.

Note − Each ABAP class can act as assistance class but service integrated with Web Dynpro application is only available if assistance class is derived from class − CL_WD_COMPONENT_ASSISTANCE.

Advertisements