cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to connect to a stored procedure from sapi 7.3

Former Member
0 Kudos

Hello experts:

I have the following scenario I'm trying to build: Send information from a AbabProxy - PI - Jdbc through a stored procedure. It must answer a series of data, however the following error occurs through SXM_MONI.

com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'Licores_Mayor' (structure 'Statement'): com.microsoft.sqlserver.jdbc.SQLServerException: No se encontró el procedimiento almacenado 'Licores_Mayor'.


My Data type are:

DT_EnvFactura_Out_XI

     Request

          factura

          localidad

DT_EnvFactura_In_JDBC

     Statement

          Licores_Mayores

               Action

               factura

                    isInput

                    type

               localidad

                    isInput

                    type

Herewith the mapping done to see if I can help in solving this problem

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ambrish:

If indeed the scenario is synchronous. However, when executing the stored procedure

from SQL Server there is no error. I am attaching an image executing it from SQL Server.

Regarding your comment Baskar am considering its recommendation on the stage.

Many thanks for your usual help to solve this case.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

In addition to above replies,  the response message structure should be like this.. Make sure whether you get error at the request side or response mapping side.  Just few cents...

example if your request message is  MT_EnvFactura_In_JDBC  then response  should be like this

MT_EnvFactura_In_JDBC_response


baskar_gopalakrishnan2
Active Contributor
0 Kudos

I think your stored procedure structure is not correct.  I don't see table tag. Please refer the request structure in this thread

http://scn.sap.com/thread/1726262

Former Member
0 Kudos

Hi thanks for your answer.

I made the requested change but the error persists. So stay the modified structure

<ns0:MT_EnvFactura_In_JDBC xmlns:ns0="urn:erpretail-pos-erpretail:guialicores:50000">

- <Statement>

   -<Licores_Mayor action="EXECUTE">

  <TABLE>dbo.Licores_Mayor</TABLE>
  <factura isInput="TRUE" type="varchar">009393127</factura>
  <localidad isInput="TRUE" type="varchar">02</localidad>

   </Licores_Mayor>

    </Statement>

</ns0:MT_EnvFactura_In_JDBC>

attached the error

com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'dbo.Licores_Mayor' (structure 'Statement'): com.microsoft.sqlserver.jdbc.SQLServerException: No se encontró el procedimiento almacenado 'dbo.Licores_Mayor'

ambrish_mishra
Active Contributor
0 Kudos

Hi,

Your structure should be as below:

<StatementName>

<storedProcedureName action=”EXECUTE”>

<table>realStoredProcedureeName</table>

<param1 [isInput=”true”] [isOutput=true] type=SQLDatatype>val1</param1>

</storedProcedureName > 

  </StatementName>

Please use the above syntax because it is taken from SAP help:

http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

You said you are having this error in sxmb_moni. Are you sure ? because I think it should be in RWB since that's where the JDBC call will be done.

Also check with the database team if the stored procedure exists or not.

Hope it helps!

Ambrish

Former Member
0 Kudos

Many thanks for the recommendation. however I'm still with the same error for the structure now called the stored procedure is as follows

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

- <ns0:MT_EnvFactura_In_JDBC xmlns:ns0="urn:erpretail-pos-erpretail:guialicores:50000">

- <Statement>

- <Licores_Mayor action="EXECUTE">

  <TABLE>Licores_Mayor</TABLE>

  <factura isInput="TRUE" type="VARCHAR">015318257</factura>

  <localidad isInput="TRUE" type="VARCHAR">02</localidad>

  </Licores_Mayor>

  </Statement>

  </ns0:MT_EnvFactura_In_JDBC>

The stored procedure exist and communication channel data are correct, besides error SXMB_MONI watch I can see it in the communication channel monitor showing the same error

com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'dbo.Licores_Mayor' (structure 'Statement'): com.microsoft.sqlserver.jdbc.SQLServerException: No se encontró el procedimiento almacenado 'dbo.Licores_Mayor'

ambrish_mishra
Active Contributor
0 Kudos

Hi,

I missed to observe that your scenario is synchronous.

Stored procedure name is case-sensitive.

In advanced tab use, logSQLQuery           true.


This will give the sql statement which is getting executed. Then try to execute the sql statement directly in database to check where exactly the error is.

Ambrish