cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC receiver format

Former Member
0 Kudos

Hi Everyone,

I have a doubt in receiver JDBC data type. I need to execute a stored procedure and there are so many stored procedures to be executed on a single DB table. So I have created a structure like the one below .

<MT> 1 ..1

<Recordset1> 0..1

<Statement> 0 ..unbounded

-


<Recordset2> 0..1

<Statement> 0 ..unbounded

Will this structure work ? or do I need to use <Statement> immediately after <MT> or Can I have a node in between like how I have created right now.

Please provide your inputs.

Thanks,

Laawanya

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Laawanya,

You have to use Statement or any name after the root tag.

<MT> 1 ..1

<StoredProcedure1> 0 ..unbounded

rest of the sub-structure

<StoredProcedure2> 0 ..unbounded

rest of the sub-structure

......

......

</MT>

or

<MT> 1 ..1

<Statement> 0 ..unbounded

rest of the structure

.....

......

......

</MT>

Raj

Former Member
0 Kudos

Raj,

you have mentioned the below structure : Can you pls give an example for this structure ?

<MT> 1 ..1

<StoredProcedure1> 0 ..unbounded

rest of the sub-structure

<StoredProcedure2> 0 ..unbounded

rest of the sub-structure

......

......

</MT>

Thanks,

Laawanya

justin_santhanam
Active Contributor
0 Kudos

Laawanya,

Please see the below example from help.sap.com

<MT>

<StoredPorcedure1>

<storedProcedureName action=u201D EXECUTEu201D>

<table>realStoredProcedureeName</table>

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

</storedProcedureName >

</StoredPorcedure1>

<StoredPorcedure2>

<storedProcedureName action=u201D EXECUTEu201D>

<table>realStoredProcedureeName</table>

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

</storedProcedureName >

</StoredPorcedure2>

.....

.....

</MT>

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

raj.

Former Member
0 Kudos

Raj,

As per your example, instead of <StoredPorcedure1>, I can also have <RecordSet> or <Statement> or any other arbitrary name but under this node, we should have the <storedprocedure name> and the attribute action and other respective fields.

Something like this :

<MT>

<StoredPorcedure1>/<Statement>/<Recordset>

<storedProcedureName action=u201D EXECUTEu201D>

<table>realStoredProcedureeName</table>

<param1 isInput=u201Dtrueu201D isOutput=true type=SQLDatatype>val1</param1>

</storedProcedureName >

</StoredPorcedure1>

<StoredPorcedure2>

<storedProcedureName action=u201D EXECUTEu201D>

<table>realStoredProcedureeName</table>

<param1 isInput=u201Dtrueu201D isOutput=true type=SQLDatatype>val1</param1>

</storedProcedureName >

</StoredPorcedure2>

.....

.....

</MT>

Am i right ?

Thanks,

Laawanya

justin_santhanam
Active Contributor
0 Kudos

You got it correctly.

raj.

Former Member
0 Kudos

Thanks for all your time friends. I will change the structure accordingly.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

you can make use of the statement here if need to use the multiple stored procedures...

check the statement occurence here it is unbounded...so instead of multiple record sets prefer usage of statement...

HTH

Rajesh

Former Member
0 Kudos

Hi,

Why you want to have <Recordset> in the structure? Any specific requirement that you want to achieve?

Regards,

Neetesh

Former Member
0 Kudos

Hi Neetesh,

I have used RecordSet because I want to execute the statement only if Recordset is created. I understand that the same logic whatever I have used for "Recordset" can be applied to "Statement" directly.But since I have created the mapping already, I don't want to redo it completely by changing the structure. So please let me know if the scenario would execute with "Recordset".

If not then I would change the structure and remove "Recordset"

Thanks,

Laawanya

Former Member
0 Kudos

Hi,

I assume you are using graphical mapping, so you will have to change the structure as prescribed by SAP.

Best of luck

Regards,

Neetesh