Connecting straight to the SAP database using an ODBC/OLEDB driver can be done but that will get you into serious trouble. You'll have to translate internal SAP structures and use the metadata to assemble usable output. And that is just for the SQL interface (so I'm not talking about BW and MDX)
The better route is - as Marcus alread pointed out - to buy QlikView Connector for SAP Netweaver (or a competing product) which will help you to connect to SAP in +/-10 different ways, write/assemble the scripts (OpenSQL and such) and install the necessary certified software in a SAP system.
as others said, it's much easier and more efficient to use an SAP Connector, as many QlikView customers do to extract the SAP data into QlikView. You can either use the QlikView Connector for SAP or Xtract QV as I do.
About both you should find enough information and documentation in the web.