As previously discussed, the application developer creates an instance of the generated class in the application program and calls the corresponding method at the appropriate time. The filter value is passed to the method as an export parameter.
Report businessaddin.
class cl_exithandler definition load.
data flt type de_country.
data exit type ref to if_ex_businessaddin.
data word(15) type c value 'Business Add-in'.
start-of-selection.
perform list editing.
call method
cl_exithandler=>get_instance
changing instance =
exit.
write:/'Bitte hier klicken'.
at line-selection.
new-page.
write:/ 'Original word:
',word.
call method
exit->method
exporting
flt_val
= flt.
Changing
parameter
= word.
write:/ 'Changed word:
',word.
The subroutine listaufbereitung would have the following content:
form list editing.
write:/'FRG
->Conversion Upper
Case'.
flt = 'FRG'.
hide flt.
write :/'Ireland
->Conversion Lower Case'.
flt = 'Ireland'
hide flt.
write :/'Italy ->Conversion
...'
flt = 'Italy'.
hide flt.
endform.
If a filter-dependent BAdI is called using one filter value only, it is possible to establish whether or not there is an active implementation for this filter value using the function module SXC_EXIT_CHECK_ACTIVE. If this is not the case, it is no longer necessary to create an instance or to call methods.
With the new BAdIs as of Release 7.0, the filter values are passed to the GET BADI statement using the FILTER addition.