on 06-17-2016 8:09 AM
Hi,
I need to get some values out by parsing a query (based on a custom view with joints) to the ExecuteSQL DI server. But I'm getting the below error.
Request :
<?xml version="1.0" encoding="utf-16"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<SessionID>8B55C26B-18F1-4002-BBE9-5F635DD23FC4</SessionID>
</env:Header>
<env:Body>
<dis:ExecuteSQL xmlns:dis="http://www.sap.com/SBO/DIS">
<DoQuery>SELECT B.ItemCode, B.Quantity FROM ( SELECT RDR1.ItemCode, MAX(ORD.DocEntry) AS DocEntry FROM RDR1 INNER JOIN (SELECT DocEntry FROM ORDR WHERE ORDR.ObjType = '17' AND ORDR.CANCELED='N' AND ORDR.CardCode ='C20000') AS ORD ON (ORD.DocEntry = RDR1.DocEntry) WHERE RDR1.LineStatus = 'C' AND RDR1.ItemCode IN ('P10002','A00005','LM4029D','I00005','LM4029SB','C00005','I00004','C00004','I00007','C00006') GROUP BY RDR1.ItemCode) AS A LEFT JOIN RDR1 B ON (A.DocEntry=B.DocEntry and A.ItemCode=B.ItemCode) INNER JOIN ORDR O ON (O.DocEntry=B.DocEntry) WHERE O.ObjType = '17' AND O.CANCELED='N' AND O.CardCode ='C20000' ORDER BY B.ItemCode </DoQuery>
</dis:ExecuteSQL>
</env:Body>
</env:Envelope>
Response :
I can retrieve the results in SQL Server Management Studio with the same exact query that I've parsed in to this API.
Please HELP.
Thank You.
Hi Hashitha,
I don't know about your ExecuteSQL example, but using CompanyService is working for me:
<?xml version=""1.0"" ?>
<soap:Envelope xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
<soap:Header>
<MsgHeader xmlns=""http://www.sap.com/SBO/DIS"">
<SessionID>" + SessionID + @"</SessionID>
<ServiceName>CompanyService</ServiceName>
</MsgHeader>
</soap:Header>
<soap:Body>
<Query xmlns=""CompanyService"">
<RecordsetParams xmlns=""http://www.sap.com/SBO/DIS"">
<Query>SELECT B.ItemCode, B.Quantity FROM ( SELECT RDR1.ItemCode, MAX(ORD.DocEntry) AS DocEntry FROM RDR1 INNER JOIN (SELECT DocEntry FROM ORDR WHERE ORDR.ObjType = '17' AND ORDR.CANCELED='N' AND ORDR.CardCode ='C20000') AS ORD ON (ORD.DocEntry = RDR1.DocEntry) WHERE RDR1.LineStatus = 'C' AND RDR1.ItemCode IN ('P10002','A00005','LM4029D','I00005','LM4029SB','C00005','I00004','C00004','I00007','C00006') GROUP BY RDR1.ItemCode) AS A LEFT JOIN RDR1 B ON (A.DocEntry=B.DocEntry and A.ItemCode=B.ItemCode) INNER JOIN ORDR O ON (O.DocEntry=B.DocEntry) WHERE O.ObjType = '17' AND O.CANCELED='N' AND O.CardCode ='C20000' ORDER BY B.ItemCode
</Query>
</RecordsetParams>
</Query>
</soap:Body>
</soap:Envelope>
regards,
Maik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
7 | |
7 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.