Skip to Content
author's profile photo Former Member
Former Member

JDBC stored procedure erroe

Hi ,

I am mapping the source CREMAS02 segment E1LFBKM to storecProcedureaction so that when there are multiple bank accounts the storedProcedure executes multiple times.

<Statement_Name>

<storedProcedureName action="EXECUTE">

....

</storedProcedureName>

<storedProcedureName action="EXECUTE">

...

</storedProcedureName>

<storedProcedureName action="EXECUTE">

...

</storedProcedureName>

</Statement_Name>

Below is the actual XML after mapping.

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

- http://test.com">

- <Statement_Name>

- <storedProcedureName action="EXECUTE">

<table>spr_Bank</table>

<BANKS type="Char">BOA</BANKS>

<BANKL type="char">44400202</BANKL>

<BANKN type="char">00022-0</BANKN>

<LIFNR type="char">9000000218</LIFNR>

<KOINH type="char">varchar</KOINH>

<BKONT type="char">01</BKONT>

<BANKA type="varchar">IS.A.</BANKA>

</storedProcedureName>

- <storedProcedureName action="EXECUTE">

<table>spr_Bank</table>

<BANKS type="Char">BOA</BANKS>

<BANKL type="char">55500207</BANKL>

<BANKN type="char">09500-2</BANKN>

<LIFNR type="char">9000000218</LIFNR>

<KOINH type="char">varchar</KOINH>

<BKONT type="char">02</BKONT>

<BANKA type="varchar">S.A.</BANKA>

</storedProcedureName>

</Statement_Name>

</ns0:MT_SP_Bank>

I keep getting the following error when i send a IDOC from SAP to SQL . In RWB it shows message is scheduled and when i process it shows system error with message below. Is anything wrong with the above XML?

Could not execute statement for table/stored proc. "spr_Bank" (structure "Statement_Name") due to java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)

Thank you ,

Teresa

Error JDBC Message processing failed, due to Error processing request in sax parser: Error when executing statement for table/stored proc. 'spr_Bank' (structure 'Statement_Name'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 11, 2011 at 04:38 PM

    hi Teresa,

    In attribute "type" of your stored procedure' sfield, be sure to use the same type without error of lower/uppercase, than you have in your Database..

    in BANKS, you have "Char" (uppercase on "C" => bad), whereas for other fields you "char" (lowercase on "c" => good).

    <BANKS type="Char">BOA</BANKS>

    I think it's the reason why you have this error: 'type="<SQL-type>"' attribute is missing for element 'table'

    regards.

    Mickael

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 11, 2011 at 05:08 PM

    Before all, check if your Stored Procedure name is correct (usually is PACKAGE_NAME.STORED_PROCEDURE and not directly with Procedure Name)

    Then check the Receiver Structure:

    <StatementName5>
    <storedProcedureName action=u201D EXECUTEu201D>
        <table>realStoredProcedureeName</table>
    <param1 [isInput=u201Dtrueu201D] [isOutput=true] type=SQLDatatype>val1</param1>
    </storedProcedureName > 
      </StatementName5>

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 11, 2011 at 04:48 PM

    Hi Teresa,

    first make sure that stored procedure name is correct or not and dont missing attribute type for every field(define type in caps VARCHAR,CHAR...) like that.

    Request data base team to share the table structure with type, based on that create in PI .

    Regards,

    Raj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 13, 2016 at 04:22 AM

    Thanks!!! This is helpful.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.