on 05-14-2007 5:31 AM
Hi,
I've created the following stored procedure to update the database:
========================================================
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
ALTER PROCEDURE spSAPXIDemo
( @SONum char(20),
@Projectcode char(20),
@Validfrom datetime,
@Validto datetime)
as
If Exists (Select * from demo Where SONum = @SONum)
update demo
set Projectcode = @projectcode,
validfrom = @validfrom,
validto = @validto
where SONum = @SONum
else
insert into demo (sonum, projectcode,validfrom, validto)
values (@sonum, @projectcode, @validfrom, @validto)
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
========================================================
My input to the above SP in XML format is:
=========================================================
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:JDBC_REQ_MT xmlns:ns1="http://POC">
- <Statement>
- <Storedprocedure action="EXECUTE">
<table>spSAPXIDemo</table>
<SONum isInput="1" type="CHAR">000000930181</SONum>
<Projectcode isInput="1" type="CHAR">SAPXI</Projectcode>
<Validfrom isInput="1" type="DATE">01 apr 2000</Validfrom>
<Validto isInput="1" type="DATE">01apr 2007</Validto>
</Storedprocedure>
</Statement>
</ns1:JDBC_REQ_MT>
=========================================================
While executing the interface, I am getting the following error message:
========================================================
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Call Adapter
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIAdapterFramework</SAP:Category>
<SAP:Code area="MESSAGE">GENERAL</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'spSAPXIDemo' (structure 'Statement'): java.lang.IllegalArgumentException</SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack />
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
========================================================
I've tried with different date formats, but didnt help. Could you please help me out here?
Thanks,
Guru
Hi,
Use Timestamp datatype instead of DATE in XI message .
Thanks,
Tuhin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check with the MT....refer:
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
/people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.