To configure clearing variants, define grouping and sort characteristics. If you use amount rules 4 to 7 and 9, define amount check groups.
All fields from the DFKKOP table (contract account: VKONT; insurance object: VTREF; main transaction: HVORG; document: OPBEL; due date for net payment: FAEDN, and so on) are available as grouping and sorting characteristics. You can define your own characteristics. In this case, define a function module that is based on the FKK_SAMPLE_TFK116 sample module. You can find information about the specifications of the module in the sample module documentation.
You want to use the insurance object category as the grouping or sorting characteristic. Create a function module (here: ZJM_SAMPLE_TFK116), in this case the insurance object category has the name ZVOTYP.
FUNCTION ZJM_SAMPLE_TFK116.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(X_VERVAR) LIKE TFK115-VERVAR
*" VALUE(X_VERART) LIKE TFK110-VERART OPTIONAL
*" VALUE(X_IFNAM) LIKE TFK116-IFNAM
*" VALUE(X_XSORT) LIKE BOOLE-BOOLE DEFAULT SPACE
*" TABLES
*" T_E516_FKKCL STRUCTURE E516_FKKCL
*" T_SELTAB STRUCTURE ISELTAB OPTIONAL
*"----------------------------------------------------------------------
DATA: ls_dimaiobpar TYPE dimaiobpar.
check x_ifnam eq 'ZVOTYP'.
LOOP AT t_e516_fkkcl WHERE vtref NE space.
CALL FUNCTION 'IMA_PARTNER_INSOBJECT_READ'
EXPORTING
i_partner = t_e516_fkkcl-gpart
i_insobject = t_e516_fkkcl-vtref
IMPORTING
e_dimaiobpar = ls_dimaiobpar
EXCEPTIONS
not_found = 1
invalid_input = 2
OTHERS = 3.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
t_e516_fkkcl-e_fwert_te516 = ls_dimaiobpar-insobjecttyp.
modify t_e516_fkkcl.
ENDLOOP.
ENDFUNCTION.