Skip to Content

Query on declaration of SQL Variable in storedprocedure in sap PI 7.3.1 single stack.

Hi Sap-mates!!

Need your help another time.

I'm struggling with a requirement where I need to declare sql variables before executing stored procedure. I couldn't get any related content in scn hence posting my query here.

I have understood from other sql/oracle related web-sites that we need to insert the variables/fields first into temp table/scalar & then execute stored procedure.

Below is the declaration statement, that I'm trying to work with sap pi.

declare @temp CompMasterTable

INSERT INTO @temp VALUES('5000', 'DangerousGoods', '501', 5,)

INSERT INTO @temp VALUES('5001', 'DangerousGoods', '502', 6,)

EXEC dbo.CompMaster @temp

As below Declared variables in Insert statement

<Statement>

   <MAT action="INSERT">

      <table>CompMasterTable_MAT</table>

      <access>

         <Plant/>

         <Text/>

         <Matnr1/>

         <Seq/>

      </access>

   </MAT>

</Statement>

_____________________

Executed SP

<ExecuteSPCompMaster>

<sproc_MAT action="EXECUTE">

<table>CompMaster</table>

<insert_statement type="varchar"></insert_statement>

</sproc_MAT>

</ExecuteSPCompMaster>

I know something is wrong could you please guide me

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 03, 2015 at 12:54 PM

    Hello,

    have you checked Sap help, where they explained format structure to be

    Defining an INSERT Statement - Advanced Adapter Engine - SAP Library

    Defining an EXECUTE Statement - Advanced Adapter Engine - SAP Library

    your insert structure correct but i guess execute structure wrong

    also i just want remind you JDBC adapter wont work by default with out jar files which are mandatory and one time activity..

    in case already few interfaces are running fine and already deployed ..then its ok 😊

    Add comment
    10|10000 characters needed characters exceeded