<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Save Large XML Data to ORACLE database (CLOB?) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-large-xml-data-to-oracle-database-clob/m-p/4008398#M957592</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hoi can we save large (xml) data into an oracle database (for external access) from sap abap?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we tried with native sql but we could not move abap-data to a CLOB Field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;joerg knaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jun 2008 07:53:07 GMT</pubDate>
    <dc:creator>JK</dc:creator>
    <dc:date>2008-06-24T07:53:07Z</dc:date>
    <item>
      <title>Save Large XML Data to ORACLE database (CLOB?)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-large-xml-data-to-oracle-database-clob/m-p/4008398#M957592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hoi can we save large (xml) data into an oracle database (for external access) from sap abap?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we tried with native sql but we could not move abap-data to a CLOB Field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;joerg knaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2008 07:53:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-large-xml-data-to-oracle-database-clob/m-p/4008398#M957592</guid>
      <dc:creator>JK</dc:creator>
      <dc:date>2008-06-24T07:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Save Large XML Data to ORACLE database (CLOB?)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-large-xml-data-to-oracle-database-clob/m-p/4008399#M957593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) define own cluster table - INDX should be used as a template &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Use EXPORT ... to DATABASE to store your data - do not forget COMMIT WORK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) for external access you may create a RFC enabled function module IMPORTing the data FROM DATABASE (and deleting it bey default).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have fun,&lt;/P&gt;&lt;P&gt;HP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 11:57:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-large-xml-data-to-oracle-database-clob/m-p/4008399#M957593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T11:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Save Large XML Data to ORACLE database (CLOB?)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-large-xml-data-to-oracle-database-clob/m-p/4008400#M957594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have stored procedure with parameters, that fill CLOB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;(
ids number, input raw, append number 
)
as
vlob_loc CLOB;
charcount binary_integer;
position integer := 1;
v_charclob varchar2(32000);
len integer;
begin

/* for test
for i in 1..32000 loop

v_charclob := v_charclob || 'x';

end loop;
*/

select XML_FILE into vlob_loc from MYTABLE where id=ids;
charcount := LENGTH(input);

/*if (append = 0) then
DBMS_LOB.append(vlob_loc,input);
dbms_output.put_line('CLOB Row Appended');
end if;*/

if (append = 1) then
DBMS_LOB.WRITE(vlob_loc,charcount,position,input);
dbms_output.put_line('CLOB Row Write');
end if;

len :=  dbms_lob.getlength(vlob_loc);

if (append = 2) then
DBMS_LOB.erase(vlob_loc,len,1);
dbms_output.put_line('CLOB Row Erased');
end if;

end;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before this code we create record in table with empty CLOB from Java Mapping with some id. Then we pass id and string in Stored Procedure - but there is limitations on string length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So - question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to send long string to Stored Procedure as Parameter?&lt;/P&gt;&lt;P&gt;And if it is impossible - how to load big XML in CBLOB from SAP XI/PI?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can split message and send by packets, but this solution - last solution, that we want to use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Format of input.. I think no difference - in any case the limitation will cause exception.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 09:48:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-large-xml-data-to-oracle-database-clob/m-p/4008400#M957594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-22T09:48:49Z</dc:date>
    </item>
  </channel>
</rss>

