As described previously, the SAP ERP system processes business transactions and provides much of the raw data for CRM. SAP's Business Warehouse is a flexible system for reporting and analysis of transactional data. By analyzing sales transactions using data mining, firms can discover trends and patterns to use in planning marketing activies.