cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Entire XML to one parameter as CLOB data type to Stored Procedure

former_member187447
Participant
0 Kudos

Hi Folks,

I have a requirement to send the entire XML as input to the parameter of a stored procedure. I am using return XML function in Graphical mapping to load the entire xml to the input parameter of the Stored procedure. But the stored procedure when read is showing nothing. But when I send a constant in the same field, that constant can be read by the procedure in the DB which makes me believe I am doing something wrong with sending the entire XML or it could be with the data type CLOB.

FYI, I used the following the procedure suggested in the following discussion

So here is the mapping with DB structure to the right. where in the action is EXECUTE, TABLE is set with Stored Procedure Name and the in_Message attributes isInput is set as "true" and the type is defined as "CLOB". As you can see in the output field in_Message is having the entire xml populated.

Regards

Kalyan.

Accepted Solutions (1)

Accepted Solutions (1)

Snavi
Active Participant
0 Kudos

Hi Kalyan,

try adding CDATA so that the xml in in_message is not parsed in PI before sending it to the database.

you can use concat function to add <![CDATA[ before xml start and ]]> at the end of xml

Answers (2)

Answers (2)

former_member194786
Active Contributor
0 Kudos

Hi Kalyan,

Try removing the XML declaration part and see if it works.

Regards,

Sanjeev.

former_member190293
Active Contributor
0 Kudos

Hi Kalyan!

Take a look at this thread. I think it helps.

http://scn.sap.com/thread/3202714

Regards, Evgeniy.