For each Webdynpro Component can only have one assistance class. Assistance class can be defined at component level. The assistance class delivers two usages which are.

  • Performance benefit
  • Defining business logic in assistance class

1.Webdynpro assistance class

To Use Assistance Class, We have to create a Class using T-code se24

2.Webdynpro assistance class

Select Class Type as Usual ABAP Class and Instantiation as Public

3.Webdynpro assistance class

Create a Method on name GET_DOCUMENT

4.Webdynpro assistance class

Give Doc as Importing Parameter and LT_BSEG as Exporting Parameter

5.Webdynpro assistance class

On the Code Editor, Provide the Logic, Below is the logic to retrieve the document based on the importing parameter DOC

6.Webdynpro assistance class

In Webdynpro on Assistance Class Parameter provide the name of the class ZCL_BSEG.

7.Webdynpro assistance class

After saving or activated, Under the Webdynpro component the Assistance class folder will be visible

8.Webdynpro assistance class

Under the Attributes tab of the component controller the reference to the Assistance class will be created.

9.Webdynpro assistance class

To Access the Method of the Class, We can use the reference of the assistance class WD_ASSIST to access the method.

10.Webdynpro assistance class