cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting data directly into a table as an array

pi_consultant1
Participant
0 Kudos

Dear friends,

I have a scenario SAP <-> PI <-> Oracle DB. Its a synchronous scenario...

I get 3 fields from SAP and the structure looks like this:

<ns0:TestReq">

   <Table> 1..n

      <New/>

      <Old/>

      <Date/>

   </Table>

</ns0:TestReq>

Ive to insert this structure as an array into a DB.

The Package.Stored Procedure looks like this

Test.testing     (                                        updatetable          IN           Update_Table,

                                                               errortable             OUT        Update_Connect_Table,

                                                               errorcode             OUT        VARCHAR,

                                                                                                                    )

Can you please help me how to achive this? How can I insert this structure directly into a table as an array and keeping in mind with performance, because it can be alot of records at once.

Thank you in advance,

Kind regards,

John

Accepted Solutions (0)

Answers (2)

Answers (2)

pi_consultant1
Participant
0 Kudos

Anyone any idea how to achieve this?

My scenario is to call the SP and within this SP I have to give data as an array to a DB table.

Can you help me how to do this?

Thank you in advance,

John

former_member184720
Active Contributor
0 Kudos

Hi John -

So you are calling the stored procedure and which will take care of inserting this data into DB tables? Am i correct?

in case you want to send this xml as a string to your procedure then, you can make use of "return as xml" function right?

pi_consultant1
Participant
0 Kudos

Hi Hareesh,

That right, I'm calling a stored procedure and within this stored procedure I've to insert the data into a DB table.

The DB guys told me to process the data as an array and not XML...

Can you tell me how to insert the data of those 3 fields in a table within a stored procedure as an array? And what kinda type do I have to define?

How would the target structure to the DB looks like?

I appreciate your help,

Kind regards,

John