Skip to Content
0
Former Member
Apr 22, 2009 at 12:03 PM

read XML file into stored procedure

102 Views

hi to all, i have this stored procedure :

create or replace

PROCEDURE INSERTXML(

p_xml_in CLOB,

p_table IN VARCHAR2 ) AS

insCtx DBMS_XMLStore.ctxType;

v_rows NUMBER;

BEGIN

insCtx := DBMS_XMLStore.newContext(p_table); -- get saved context

dbms_xmlstore.setRowTag(insCtx,'Row');

DBMS_XMLStore.clearUpdateColumnList(insCtx); -- clear the update settings

-- set the columns to be updated as a list of values

DBMS_XMLStore.setUpdateColumn(insCtx,'ORDERNUMBER');

DBMS_XMLStore.setUpdateColumn(insCtx,'PLANT');

DBMS_XMLStore.setUpdateColumn(insCtx,'MATERIAL');

DBMS_XMLStore.setUpdateColumn(insCtx,'LINENUMBER');

DBMS_XMLStore.setUpdatecolumn(insCtx,'NOMSPEED');

DBMS_XMLStore.setUpdatecolumn(insCtx,'STARTDATE');

DBMS_XMLStore.setUpdatecolumn(insCtx,'FINISHDATE');

DBMS_XMLStore.setUpdatecolumn(insCtx,'TARGETQTY');

DBMS_XMLStore.setUpdatecolumn(insCtx,'UNIT');

DBMS_XMLStore.setUpdatecolumn(insCtx,'SYSTEMSTATUS');

v_rows := DBMS_XMLStore.insertXML(insCtx, p_xml_in);

-- Close the context

DBMS_XMLStore.closeContext(insCtx);

END;

that passes xml file and puts in table but SAP Mii have the limitation that the maximun value of strings is 4000..how can i pass this limitation?!?! someone have some ideia?!?!...i have now to read XML file to stored procedure...could someone help me??

regards and thanks in advance