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
To Use Assistance Class, We have to create a Class using T-code se24
Select Class Type as Usual ABAP Class and Instantiation as Public
Create a Method on name GET_DOCUMENT
Give Doc as Importing Parameter and LT_BSEG as Exporting Parameter
On the Code Editor, Provide the Logic, Below is the logic to retrieve the document based on the importing parameter DOC
In Webdynpro on Assistance Class Parameter provide the name of the class ZCL_BSEG.
After saving or activated, Under the Webdynpro component the Assistance class folder will be visible
Under the Attributes tab of the component controller the reference to the Assistance class will be created.
To Access the Method of the Class, We can use the reference of the assistance class WD_ASSIST to access the method.