on 04-05-2016 9:13 PM
Hello,
We have a scenario where we need to read data from HANA DB using JDBC connection via PI 7.31 SP12. Though we are able to read the data successfully from a table on HANA db the requirement is to read the data from a view on HANA DB. Is it feasible to read the data from the a view and if yes could you please share the schema for it as well or direct me to the required documentation.
The schema being used to read from the Table:
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:MT_KNA1_HANA_Request xmlns:ns0="http://abc.com/hana">
Thanks,
Ashish
The JDBC adapter converts the xml to a select query.
So, as with performing a select over a view the table name in the JDBC request xml should be the name of the view.
Did you try this?
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply. Please see the error below when I use the view name instead of the table name in the schema:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_KNA1_HANA_Request xmlns:ns0="http://abc.com/hana">
- <Statement>
- <dbTableName action="SELECT">
<table>_SYS_BIC.ABC_FUSION.SD.Orderhistory/ORDHIST</table>
- <access>
<VBELN />
<VBTYP />
<ERDAT />
</access>
- <key>
<W_DATE_FROM>20150101</W_DATE_FROM>
<W_DATE_TO>20151231</W_DATE_TO>
<VKORG>0800</VKORG>
<VTWEG>84</VTWEG>
<SPART>80</SPART>
</key>
</dbTableName>
</Statement>
</ns0:MT_KNA1_HANA_Request>
Error While Sending Message: Additional error text from response: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. '_SYS_BIC.ABC_FUSION.SD.Orderhistory/ORDHIST' (structure 'Statement'): java.sql.SQLException: FATAL ERROR: Column 'W_DATE_FROM' does not exist in table '_SYS_BIC.ABC_FUSION.SD.Orderhistory/ORDHIST'
Just FYI...the issue was resolved after the following three were fixed.
Bhavesh thanks for your help.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.