cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect syntax near the keyword 'AND'.

Former Member
0 Kudos

Hi Friends,

I have a requirement from SAP BI to SQL database.

When I am triggering data from SAP BI, it is successfully sent to XI.

In XI, it is also in success.

But when I check in Message monitoring, I faced a error.

Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'ZSaleFromBI' (structure 'Data'): com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'AND'.

The data is not updating in SQL Database also.

Kindly suggest the same.

Regards,

Narendra Goyal

Accepted Solutions (0)

Answers (1)

Answers (1)

Shabarish_Nair
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi,

I have already tested this in PI 7.0. It is working fine.

But Currently I am testing this scenario in XI 3.0.

Regards,

Narendra Goyal

Former Member
0 Kudos

Hi Narendra,

Can you put the SQL statement here which you are trying to execute?

Thanks,

Sudip.

stefan_grube
Active Contributor
0 Kudos

> I have already tested this in PI 7.0. It is working fine.

> But Currently I am testing this scenario in XI 3.0.

If it worked in 7.0 and you are sure that your payload is equal, then check out for bug fixes.

former_member208856
Active Contributor
0 Kudos

Check your SQL Statement in PI 7.0 & XI 3.0.

Both the statements are different, please check the difference.

Former Member
0 Kudos

yes, statements are different.

In XI 3.0 only update statement is working. No insert statement is coming.

I have used UPDATE_INSERT in action.

Regards,

Narendra Goyal

former_member208856
Active Contributor
0 Kudos

When you are using UPDATE statement, you are passing KEY value for updation.

When you are using INSERT statement, you are not passing KEY value.

But, when you are using UPDATE_INSERT, pass the key value for all the records, for update & also for Insert.

Former Member
0 Kudos

Hi,

After debugging lot, I found a payload difference.

In PI 7.0 Inbound message from BI is:

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

- <n0:MT_OTBData_BI xmlns:n0="http://grmap.com/xi/grmap/OTB_Data_OB" xmlns:prx="urn:sap.com:proxy:BIJ:/1SAI/TAS05A432A314B70F5CEB43:700:2008/01/11">

+ <DataRow>

+ <DataRow>

+ <DataRow>

</n0:MT_OTBData_BI>

In XI 3.0 Inbound message from BI is:

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

- <nr1:MT_OTBData_BI xmlns:nr1="http://grmap.com/xi/grmap/OTB_Data_OB">

+ <DataRow>

+ <DataRow>

+ <DataRow>

</nr1:MT_OTBData_BI>

Kindly provide suggestion to resolve this issue.

Regards,

Narendra Goyal

henrique_pinto
Active Contributor
0 Kudos

XML-wise, they are exactly the same. The "prx" namespace is not used anywhere throughout the message, so the message structures are identical.

Apparently your mapping is based on strings (i.e. searching for "<nr1:MT_OTBData_BI xmlns:nr1="http://grmap.com/xi/grmap/OTB_Data_OB">") and not really parsing the XML. If that's the case, I would reevaluate that mapping.

BR,

Henrique.