cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding executing SELECT statement

Former Member
0 Kudos

Is it possible to execute below SELECT statement using JDBC Receiver Adapter

select cast( aprengine.get_distributors('', '', '', '12345','USA') as hbuser1.dstbTable

If possible kindly provide me the structure..

In the above stmt I have used cast function,so how it should be passed in the structure....

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

Check out the following structure:

<root>

<StatementName>

<anyName action=SELECT>

<access>SQL-String with optional placeholder(s)</access>

<key>

<placeholder1>value1</placeholder1>

<placeholder2>value2<placeholder2>

</key>

</anyName >

</StatementName>

</root>

The <b><access></b> block contains the column names to be selected.

A<b> <key></b>element contains the columns whose values must be identical with the specified value to get the new column values.

A statement with the action SELECT must have exactly one <access>element. The number of <key> elements with arbitrary names is not restricted.

Regards

Sumit Jain

**Reward with points if useful

Former Member
0 Kudos

Hi Mario,

Iam using service pack 14 and is it possible to execute the stored procedure and if yes kindly plz provide me the structure...

Former Member
0 Kudos

Vikram,

Yes you can use stored procedures in your scenario.

From SAP help, the request structure will be

<i> <StatementName5>

<storedProcedureName action=” EXECUTE”>

<table>realStoredProcedureeName</table>

<param1 [isInput=”true”] [isOutput=true] type=SQLDatatype>val1</param1>

</storedProcedureName >

<StatementName5></i>

The response will be

<i> <StatementName5_response>

<storedProcedureName_response>

<column1></column1>

.

.

<columnn></columnn>

</storedProcedureName_response >

<StatementName5_response></i>

here column1 to n are the fields that will be selected by the stored procedure.

Regards,

Jai Shankar

Former Member
0 Kudos

Hi vikram,

first a developer has to programm the stored procedure.

Than have a look in the hyperlink.

There you find how to call the SP.

Regards Mario

Former Member
0 Kudos

Hi vikram ,

I would implement the statement as a stored procedure and call the stored procedure.

http://help.sap.com/saphelp_erp2005vp/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

Regards Mario