cancel
Showing results for 
Search instead for 
Did you mean: 

proxy to JDBC - receiver to do a select from DB2 database

Former Member
0 Kudos

Hi,

I am writing a synchronus call from proxy to JDBC where the JBDC receiver will do a select on the database. The database is DB2. I get the following error:

<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'X_VALUATION_INSTALLATION' (structure 'STATEMENT'): com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: X_VALUATION_INSTALLATION;SELECT FROM ;FROM</SAP:AdditionalText>

my payload gets generated as follows:

<?xml version="1.0" encoding="UTF-8" ?>

- <ns0:MT_Lis_VallInst_Req xmlns:ns0="http://www.Coj.co.za/LisToSapIsu/Valuation">

- <STATEMENT>

- <TABLENAME ACTION="SELECT">

<TABLE>X_VALUATION_INSTALLATION</TABLE>

<ACCESS />

- <KEY>

<STATUS_CODE>P</STATUS_CODE>

</KEY>

</TABLENAME>

</STATEMENT>

</ns0:MT_Lis_VallInst_Req>

In my data type I have fields under my access element.

Where are I going wrong?

Thanks,

Leanne

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Thanks for the feedback, I have passed the first error, I now get another error (see below). My payload from (proxy) SAP is:

<?xml version="1.0" encoding="utf-8" ?>

- <ns1:MT_Isu_VallInst xmlns:ns1="http://www.Coj.co.za/LisToSapIsu/Valuation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<TABLE>X_VALUATION_INSTALLATION</TABLE>

<ACTION>SELECT</ACTION>

</ns1:MT_Isu_VallInst>

My payload from JDBC is:

<?xml version="1.0" encoding="UTF-8" ?>

- <ns0:MT_Lis_VallInst_Req xmlns:ns0="http://www.Coj.co.za/LisToSapIsu/Valuation">

- <STATEMENT>

- <X_VALUATION_INSTALLATION ACTION="SELECT">

<TABLE>X_VALUATION_INSTALLATION</TABLE>

- <ACCESS>

<VALUATION_INSTALLATION_KEY>Constant</VALUATION_INSTALLATION_KEY>

<VALUATION_KEY>Constant</VALUATION_KEY>

<RATABLE_IND>Constant</RATABLE_IND>

<EXEMPT_IND>Constant</EXEMPT_IND>

<IMPERMISSIBLE_IND>Constant</IMPERMISSIBLE_IND>

<BUS_VALUE>Constant</BUS_VALUE>

<BUS_SIZE>Constant</BUS_SIZE>

<AGR_VALUE>Constant</AGR_VALUE>

<AGR_SIZE>Constant</AGR_SIZE>

<LAND_VALUE>Constant</LAND_VALUE>

<TOTAL_VALUE>Constant</TOTAL_VALUE>

<IMPROVEMENT_VALUE>Constant</IMPROVEMENT_VALUE>

<MARKET_VALUE>Constant</MARKET_VALUE>

<RATABLE_SIZE>Constant</RATABLE_SIZE>

<CREATED_TS>Constant</CREATED_TS>

<PROCESSED_TS>Constant</PROCESSED_TS>

<INTERFACED_TS>Constant</INTERFACED_TS>

<STATUS_CODE>Constant</STATUS_CODE>

<ERROR_CODE>Constant</ERROR_CODE>

</ACCESS>

- <KEY>

<STATUS_CODE>'P'</STATUS_CODE>

</KEY>

</X_VALUATION_INSTALLATION>

</STATEMENT>

</ns0:MT_Lis_VallInst_Req>

My mapping is as follows:

JDBC MT and STATEMENT maps to SAP MT.

X_VALUATION_INSTALLATION, ACCESSS, KEY and fieldnames are mapped to constants.

action to action (from proxy).

table to table (from proxy).

JBDC status code = 'P'

Error in payload:

SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'X_VALUATION_INSTALLATION' (structure 'STATEMENT'): com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: XIUSR.X_VALUATION_INSTALLATION</SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

prabhu_s2
Active Contributor
0 Kudos

check if this works

<?xml version="1.0" encoding="UTF-8" ?>

- <ns0:MT_Lis_VallInst_Req xmlns:ns0="http://www.Coj.co.za/LisToSapIsu/Valuation">

- <STATEMENT>

- <X_VALUATION_INSTALLATION ACTION="SELECT">

<TABLE>X_VALUATION_INSTALLATION</TABLE>

<ACCESS />

- <KEY>

<STATUS_CODE>P</STATUS_CODE>

</KEY>

</X_VALUATION_INSTALLATION>

</STATEMENT>

</ns0:MT_Lis_VallInst_Req>

prateek
Active Contributor
0 Kudos

Ur TABLENAME should be the name of actual table

Regards,

Prateek

former_member192892
Active Contributor
0 Kudos

you have not provided any column names for sql access.. Please provide the column names under access tag