CDOTE has the capability to parse inbound and outbound FIX message strings. As the specifics for FIX messages vary across different brokers it is possible to define own classes for parsing those messages. In total there are three different communication classes.
- Message Builder
- Message Mapping
- Message Processor
The Message Builder is used to build outbound FIX messages and define which CDOTE fields should go to which tag. The Message Mapping class defines which FIX tag to use for which purpose. The Message Processor class is used for handling inbound messages and mapping the tags to the internal structures. Which of the available classes is to be used can be defined within the Business Partner transaction. More exactly in the tab “CDOTE: Communication” of the business partner role “CDOTE Broker”.
In case the available classes are not sufficient, you can define new ones. This can be done by subclassing the basisclass for the respective entity. Those are:
- Message Builder CL_CMMFDAI_FIX_MSG_BUILDER
- Message Mapping CL_CMMFDAI_FIX_MSG_MAPPER
- Message Processor CL_CMMFDAI_FIX_MSG_PROCESSOR
Let’s make an example. I once came across a system were a MIC was setup wrongly. As the customer did not like the idea to change the MIC in the complete system just to introduce CDOTE and sending the MIC expected by the Exchange we subclassed the Message Builder class and redefined method get_mic. The following code illustrates that. Whereby INT is the internal MIC which is mapped to the external one being EXT. As the customer is working on FIX 4.4 we subclassed the respective FIX 4.4 class CL_CMMFDAI_FIXMSG_BUILDER_4_4S
CLASS zcl_sn_fix_builder DEFINITION PUBLIC INHERITING FROM CL_CMMFDAI_FIXMSG_BUILDER_4_4S FINAL CREATE PUBLIC . PUBLIC SECTION. PROTECTED SECTION. methods get_mic REDEFINITION. ENDCLASS. CLASS ZCL_SN_FIX_BUILDER IMPLEMENTATION. method get_mic. if iv_mic = 'INT'. ev_mic = 'EXT'. else. ev_mic = iv_mic. endif. endmethod. ENDCLASS.
This class – after saving and activating – shows up in the business partner transaction as a Message Builder class. If choosen for a Broker it is then used for that specific one.