cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to execute complex query in ExecuteSQL method in DI Server??

Former Member
0 Kudos

Hi All,

Is it Possible to execute complex query in ExecuteSQL Method in DI Server?

Regards,

G.Suresh

Accepted Solutions (1)

Accepted Solutions (1)

Gianluigi
Product and Topic Expert
Product and Topic Expert
0 Kudos

What do you call a complex query ?

Former Member
0 Kudos

Hi,

Like multiple tables involved query (for example nested of subqueries).

is it possible??

how can i get the result from the output .XML File.

Regards,

G.Suresh

YatseaLi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Guru,

It is possible. Mostly if it can be done in DI, it will also can be done in DI Server except metadata operaiton, transation management etc.

I try the following complex query (join, nexted):

The SOAP Request

<?xml version="1.0" encoding="UTF-16"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
 <env:Header>
  <SessionID>4FFCFAA3-5493-456A-BC89-410B35AF096C</SessionID>
 </env:Header>
 <env:Body>
  <dis:ExecuteSQL xmlns:dis="http://www.sap.com/SBO/DIS">
   <DoQuery>SELECT OCRD.CardCode, OCRD.CardName, OCPR.Name FROM OCRD JOIN OCPR ON OCRD.CardCode = OCPR.CardCode WHERE OCRD.CardCode IN 
(SELECT DISTINCT ORDN.CardCode FROM ORDN)</DoQuery>
  </dis:ExecuteSQL>
 </env:Body>
</env:Envelope>

The SOAP Response:

<?xml version="1.0"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body><ExecuteSQLResponse xmlns="http://www.sap.com/SBO/DIS">
<BOM><BO><AdmInfo><Object>oRecordset</Object></AdmInfo><OCRD><row><CardCode>C002</CardCode><CardName>SAP</CardName>
<Name>2</Name></row><row><CardCode>C002</CardCode><CardName>SAP</CardName><Name>l</Name></row><row><CardCode>C002</CardCode>
<CardName>SAP</CardName><Name>Z</Name></row></OCRD></BO></BOM></ExecuteSQLResponse></env:Body></env:Envelope>

I think you can easily parse the result...

Kind Regards

-Yatseas

Answers (0)