cancel
Showing results for 
Search instead for 
Did you mean: 

Stored Procedure

Former Member
0 Kudos

Based on a Document number, I need to call two different stored procedures.. Both the input and output layout are same for both stored procedure.. some documents go to table 'A' and stored procedure 'Get Table A', while other documents go to table 'B' and stored procedure 'Get Table b'..

Is this achievable through Mapping instead of receiver determination? If so how do we achieve it? As far as I can see two different Message types are need to invoke two different stored procedure... So I am not sure how I can achieve this..

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi SSG,

<i>As far as I can see two different Message types are need to invoke two different stored procedure</i>

If the stored Procedure expects different input and output parameters , then different Message Types are needed. If the stored procedure has same input and output parameters, then a single message type can do the trick.

<i>Both the input and output layout are same for both stored procedure..</i>

<b>So, I think one message type would be enough.</b>

In your mapping, on the basis of your Document Number, you can create the value for the Stored Procedure and that would do the trick.

<i><StatementName>

<storedProcedureName action=” EXECUTE”>

<table>realStoredProcedureeName</table>

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

</storedProcedureName >

</StatementName></i>

On the basis on your input, you can map the value for

<b>realStoredProcedureeName</b> to call the corresponding stored procedure. Just make sure, the occurence of Sttement is 0 to undbounded when defining your destination datatype.

Regards,

Bhavesh

Former Member
0 Kudos

Bhavesh, thanks ... will check this out and close the thread..

Answers (0)