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.
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'.
perform list editing.
call method cl_exithandler=>get_instance
changing instance = exit.
write:/'Bitte hier klicken'.
write:/ 'Original word: ',word.
call method exit->method
flt_val = flt.
parameter = word.
write:/ 'Changed word: ',word.
The subroutine listaufbereitung would have the following content:
form list editing.
write:/'FRG ->Conversion Upper Case'.
flt = 'FRG'.
write :/'Ireland ->Conversion Lower Case'.
flt = 'Ireland'
write :/'Italy ->Conversion ...'
flt = 'Italy'.
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.