SAP FS-CD: Use the right customer include

SAP FS-CD: Use the right customer include

In the beginning of FS-CD SAP only supplied one customer include to add your custom fields to the insurance object / partner table DIMAIOBPAR: CI_DIMAIOBPAR. Unfortunately this was also included in the Direct Input structure (SIMAIOBPAR_DI), which meant you could only add CHAR fields to the DIMAIOBPAR. This lead to two ugly work arounds: Either living with only CHAR fields or using appends for non CHAR fields and populating them in some event.

In the meantime (at least 10 years ago;-)) SAP sorted this architectural problem by adding another customer include CI_DIMAIOBPAR2 which is not included in the DI structure. The DI structure SIMAIOBPAR_DI has another include called CI_DIMAIOBPAR2_DI. Now you add your new non CHAR custom fields to the CI_DIMAIOBPAR2 and with the same name add them as CHAR fields to the CI_DIMAIOBPAR2_DI. By using the same name in both structures the values get transferred from CHAR to non CHAR. Simples!

Unfortunately I see at nearly every customer all fields being CHAR and situated in the CI_DIMAIOBPAR, which leads to nasty work arounds for currency fields in BDT which are stored as CHAR on the database.

Conclusion: Use CI_DIMAIOBPAR for all CHAR fields and use CI_DIMAIOBPAR2 and CI_DIMAIOBPAR2_DI for all your non CHAR fields. (Same principles apply for DIMAIOB and DIMAPARCORR tables by the way)