32k limit in Reading XML
Hi
My procedure connects to a webservice and gets the data as XML
This is what my code looks like
HTTP_RESP := UTL_HTTP.GET_RESPONSE (HTTP_REQ);
UTL_HTTP.READ_TEXT (HTTP_RESP, SOAP_RESPOND);
SOAP_RESPOND :=
XMLTYPE (SOAP_RESPOND).
EXTRACT (
'/soap:Envelope/soap:Body/Streets_Events_GetResponse/Streets_Events_GetResult/text()',
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/",
xmlns="http://webapi/"').
GETCLOBVAL ();
Xml_Result :=
XMLTYPE (
DBMS_XMLGEN.CONVERT (SOAP_RESPOND, DBMS_XMLGEN.ENTITY_DECODE));
INSERT INTO XXHCC_STAGING_XML
VALUES (Xml_Result, SYSDATE, ' Street_Events_Get SOAP Response');
COMMIT;It doesnt work sometime and I have a feeling its reaching its 32K limit and not responding. If i give the same parameters the webservice when run individually runs fine, but when i call from SQL plus or any other oracle procedure i get the following error
ORA-00600: internal error code, arguments: [733], [268431488], [pga heap], [], [], [], [], []Am i right in assuming that from pl/sql it can only read 32K of data and if I long XML document with records being returned it would fail.
Its happening for only certain records and most of the time it works fine, I bring the data with a date range, and when i bring between 2 years it fails as it has got many records around 40-50 records in a xml document.
What is the best alternative to overcome this.
Thanks
Sri
My version is
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
PL/SQL Release 9.2.0.6.0 - Production
The reason is i m hittting the 64K limit with the XML
In my code
-- SOAP_RESPOND := XMLTYPE(SOAP_RESPOND).EXTRACT('/soap:Envelope/soap:Body/Streets_Events_GetResponse/Streets_Events_GetResult/text()',
-- 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/",
-- xmlns="http://webapi/"').GETCLOBVAL();
-- Xml_Result := XMLTYPE(DBMS_XMLGEN.CONVERT(SOAP_RESPOND, DBMS_XMLGEN.ENTITY_DECODE));
INSERT INTO XXHCC_STAGING_XML VALUES (xmltype(soap_respond), sysdate,'Street_Events_GetLOB SOAP Response' );
Commit;
--StResult :=Xml_Result;
StResult := xmltype(soap_respond);My procedure when run from sql plus works fine, i can see the whole xml output, but the moment i go to TOAD and do a refresh of my staging table i get this
OCI - 31167 XML Nodes over 64K in Size Cannot be InsertedIt works if i store the xml as clob and retrieve it as clob, but the only problem i face is then its not encoded properly.
I have seen in other posts where it says we cannot perform any extract or extractvalue functions on the xmltype.
What is the best way of overcoming this, My procedure displays the xml and another procedure which calls my procedure picks it and shreds into columns.
I m wondering if there is anyway of bypassing this 64k limit
S
Similar Messages
-
32k Limit for Page Header?
When porting an existing Page to HTML a Template, Page and Region was created, the Page Header was Javascript like code from Go Live. Is there a limit to the Page Header, If so how do you modulize this code for ease of integration, do you put the code to Javascript and then ONLOAD it? In this Scrip was reference to *.jpg files and was trying to use &IMAGE_PREFIX. to reference it. was working until I think a 32K limit was imposed. Is this true, or is there something I am missing?
Michael,
The answers to most of these questions can be found in the How To on Javascript and the whitepaper on customizing templates.
See:
http://otn.oracle.com/products/database/htmldb/howtos/howto_report_pagination.html
and
http://otn.oracle.com/products/database/htmldb/ -
Load and Read XML file size more than 4GB
Hi All
My environment is Oracle 10.2.0.4 on Solaris and I have processes to work with XML file as below detail by PL/SQL
1. I read XML file over HTTP port into XMLTYPE column in table.
2. I read value no.1 from table and extract to insert into another table
On test db, everything is work but I got below error when I use production XML file
ORA-31186: Document contains too many nodes
Current XML size about 100MB but the procedure must support XML file size more than 4GB in the future.
Belows are some part of my code for your info.
1. Read XML by line into variable and insert into table
LOOP
UTL_HTTP.read_text(http_resp, v_resptext, 32767);
DBMS_LOB.writeappend (v_clob, LENGTH(v_resptext), v_resptext);
END LOOP;
INSERT INTO XMLTAB VALUES (XMLTYPE(v_clob));
2. Read cell value from XML column and extract to insert into another table
DECLARE
CURSOR c_xml IS
(SELECT trim(y.cvalue)
FROM XMLTAB xt,
XMLTable('/Table/Rows/Cells/Cell' PASSING xt.XMLDoc
COLUMNS
cvalue
VARCHAR(50)
PATH '/') y;
BEGIN
OPEN c_xml;
FETCH c_xml INTO v_TempValue;
<Generate insert statement into another table>
EXIT WHEN c_xml%NOTFOUND;
CLOSE c_xml;
END
And one more problem is performance issue when XML file is big, first step to load XML content to XMLTYPE column slowly.
Could you please suggest any solution to read large XML file and improve performance?
Thank you in advance.
HikoSee Mark Drake's (Product Manager Oracle XMLDB, Oracle US) response in this old post: ORA-31167: 64k size limit for XML node
The "in a future release" reference, means that this boundary 64K / node issue, was lifted in 11g and onwards...
So first of all, if not only due to performance improvements, I would strongly suggest to upgrade to a database version which is supported by Oracle, see My Oracle Support... In short Oracle 10.2.x was in extended support up to summer 2013, if I am not mistaken and is currently not supported anymore...
If you are able to able to upgrade, please use the much, much more performing XMLType Securefile Binary XML storage option, instead of the XMLType (Basicfile) CLOB storage option.
HTH -
Read xml from application server
Hello guys,
I have craeted program read xml file from presentation server. its working fine...
below is program
now i want to program read xml file from Application server.
so please give me some idea for that.........
<MODIFIED BY MODERATOR - RESPECT THE 2,500 CHARS LIMIT>
thanks
jigar
Edited by: Alvaro Tejada Galindo on Jan 12, 2010 11:50 AMHi
U need to just replace the fm to upload the file with command OPEN DATASET / READ DATASET / CLOSE DATASET: if you upload the data from application server in the same internal table loaded by fm for presentation your report should be the same
Max -
Read XML (stored in Long Variable) through PL SQL
Hi,
We are on 11g2 Database. We have xml content in Long column/variable.
Can anyone help me out to read xml attribute value ?
eg.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE labels SYSTEM "label.dtd">
<labels QUANTITY="1" JOBNAME="LBL213685">
<label FORMAT="XEINSP_REQ_LBL.lwl">
<variable name= "L_DATE">04-JAN-2012</variable>
<variable name= "L_TIME">10:45:17</variable>
<variable name= "L_LPN">K01-4713BE</variable>
<variable name= "L_ITEM">XXXXWT88-002</variable>
<variable name= "L_ITEMDESC">SPRING,REVERSIBLE EXPANSION GE14 234C6745P001 REV.01</variable>
<variable name= "L_QTY">1</variable>
<variable name= "L_POREV"></variable>
<variable name= "L_PONUM">837037254</variable>
<variable name= "L_ITEMREF">834C6745P001</variable>
<variable name= "L_PROJECT"></variable>
<variable name= "L_ISIS"></variable>
<variable name= "L_LABEL">1</variable>
<variable name= "L_LINE_NO">1</variable>
<variable name= "L_SUPPLIER">RECISION OIL, INC</variable>
</label>
</labels>
We want to read value next to <variable name= "L_LPN"> . Need to return K01-4713BE programmatically.
Appreciate your help.
Thanks,
Abhi
Edited by: user649769 on Jan 4, 2012 2:52 PM
Edited by: user649769 on Jan 4, 2012 2:53 PMHi,
As you may be aware, LONG datatype is obsolete for quite some time now.
If you can you should really consider migrating it to CLOB, or in this specific case store XML data in an XMLType column.
In particular, we can't use XMLType constructor directly on a LONG.
Here's a simple PL/SQL solution though, provided the data is not larger than 32k :
SQL> create table test_long (xmldoc long);
Table created
SQL> insert into test_long values('<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE labels SYSTEM "label.dtd">
3 <labels _QUANTITY="1" _JOBNAME="LBL213685">
4 <label _FORMAT="XE_INSP_REQ_LBL.lwl">
5 <variable name= "L_DATE">04-JAN-2012</variable>
6 <variable name= "L_TIME">10:45:17</variable>
7 <variable name= "L_LPN">K01-4713BE</variable>
8 <variable name= "L_ITEM">XXXXWT88-002</variable>
9 <variable name= "L_ITEMDESC">SPRING,REVERSIBLE EXPANSION GE14 234C6745P001 REV.01</variable>
10 <variable name= "L_QTY">1</variable>
11 <variable name= "L_POREV"></variable>
12 <variable name= "L_PONUM">837037254</variable>
13 <variable name= "L_ITEMREF">834C6745P001</variable>
14 <variable name= "L_PROJECT"></variable>
15 <variable name= "L_ISIS"></variable>
16 <variable name= "L_LABEL">1</variable>
17 <variable name= "L_LINE_NO">1</variable>
18 <variable name= "L_SUPPLIER">RECISION OIL, INC</variable>
19 </label>
20 </labels>');
1 row inserted
SQL> commit;
Commit complete
SQL> set serveroutput on
SQL> DECLARE
2
3 v_xmldoc varchar2(32767);
4 v_result varchar2(30);
5
6 BEGIN
7
8 select xmldoc into v_xmldoc from test_long;
9
10 /* disable DTD validation for the current session */
11 execute immediate 'alter session set events = ''31156 trace name context forever, level 2''';
12
13 select xmlcast(
14 xmlquery('/labels/label/variable[@name="L_LPN"]'
15 passing xmltype(v_xmldoc)
16 returning content)
17 as varchar2(30)
18 )
19 into v_result
20 from dual
21 ;
22
23 execute immediate 'alter session set events = ''31156 trace name context off''';
24
25 dbms_output.put_line(v_result);
26
27 END;
28 /
K01-4713BE
PL/SQL procedure successfully completed
Note that I used event 31156 to temporarily disable DTD validation on the XML document, and avoid this :
ORA-31001: Invalid resource handle or path name "/label.dtd"If you want to actually use validation, the DTD has to be stored in the XML DB repository (in the root folder). -
FM to read XML files from Application server in ECC5.0
Hi All,
We need to pick up an XML file from Application server/FTP server. The requirement is to parse the XML file and process it to create material master. SAP provides standard function modules to read XML files.
Now we need to read the XML file contents of MM01 and upload into SAP Data Base through BAPI
I need to know about the Function modules to read XML files from Application Server and also about the FM's that will update the Date base tables with the data obtained form XML files.
Regards
PrathimaParsing XML data:
http://help.sap.com/saphelp_nw04/helpdata/en/86/8280ba12d511d5991b00508b6b8b11/frameset.htm
or alternatively check out ABAP online help for "CALL TRANSFORMATION".
For creating the material master look at BAPI_STANDARDMATERIAL_CREATE.
Thomas -
Is there any way to read XML directly from a Web Page ??
i have a url, which on sending request, shows XML in browser.
Now i need to read this XML in browser and then manipulate it according to my need and display it on another page.
actually the process is. :
1) i have to first retrieve an xml from other site. (XML will only be shown in browser)
2.)then i have to read the Xml and show it in according to my requirements.
Is there any way to read XML directly from a Web Page ??
is their logic to accomplish this.
e.g in Servlet i can do somewhat like this :
String wholeXml=Somemethod(url);
Please Advicethe average Java XML parser will accept an InputStream, so just open an URLConnection to the webpage, get the inputstream from it and feed that inputstream to the XML parser. If the URL has valid XML data, it will get parsed without problems.
-
Reading XML file from application server and put into internal table-4.6C
Dear All,
Is there any way of reading XML file from application server to SAP? I am using 4.6C. Function module SCMS_STRING_TO_XSTRING function module is not available. Please suggest.
Thanks and regards,
AtanuHi Atanu!
Simply use the XSLT transformation 'ID'.
FIELD-SYMBOLS <ls_result> TYPE ANY.
CREATE DATA lref_data TYPE (your_structure).
ASSIGN lref_data->* TO <ls_result>.
CALL TRANSFORMATION id
SOURCE XML xmlstr
RESULT result = <ls_result>.
"xmlstr" contains your XML file. Just read it into it via standard I/O operations. "<ls_result>" will contain your DDIC formatted content.
Best regards
Torsten -
Read XML file from presentation server
Hi All,
I want read XML file from presentation server currently i am using GUI_UPLOAD fm . but it is reading some junk data.
DATA : BEGIN OF upl OCCURS 0,
f(255) TYPE c,
END OF upl.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = D:\XX.XML'
filetype = 'BIN'
TABLES
data_tab = upl.
is there any other alternative.
Thanks
Swarup,Hi Swarup,
Use method IMPORT_FROM_FILE of class CL_XML_DOCUMENT.
A sample code snippet :-
PARAMETERS: p_filnam TYPE localfile OBLIGATORY
DEFAULT 'C:\Documents and Settings\ssaha\Desktop\test.xml'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filnam.
DATA: l_v_fieldname TYPE dynfnam.
l_v_fieldname = p_filnam.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = l_v_fieldname
IMPORTING
file_name = p_filnam.
START-OF-SELECTION.
TYPES:
BEGIN OF ty_tab,
name TYPE string,
value TYPE string,
END OF ty_tab.
DATA:
lcl_xml_doc TYPE REF TO cl_xml_document,
v_subrc TYPE sysubrc,
v_node TYPE REF TO if_ixml_node,
v_child_node TYPE REF TO if_ixml_node,
v_root TYPE REF TO if_ixml_node,
v_iterator TYPE REF TO if_ixml_node_iterator,
v_nodemap TYPE REF TO if_ixml_named_node_map,
v_count TYPE i,
v_index TYPE i,
v_attr TYPE REF TO if_ixml_node,
v_name TYPE string,
v_prefix TYPE string,
v_value TYPE string,
v_char TYPE char2.
DATA:
itab TYPE STANDARD TABLE OF ty_tab,
wa TYPE ty_tab.
CREATE OBJECT lcl_xml_doc.
CALL METHOD lcl_xml_doc->import_from_file
EXPORTING
filename = p_filnam
RECEIVING
retcode = v_subrc.
CHECK v_subrc = 0.
v_node = lcl_xml_doc->m_document.
CHECK NOT v_node IS INITIAL.
v_iterator = v_node->create_iterator( ).
v_node = v_iterator->get_next( ).
WHILE NOT v_node IS INITIAL.
CASE v_node->get_type( ).
WHEN if_ixml_node=>co_node_element.
v_name = v_node->get_name( ).
v_nodemap = v_node->get_attributes( ).
IF NOT v_nodemap IS INITIAL
* attributes
v_count = v_nodemap->get_length( ).
DO v_count TIMES.
v_index = sy-index - 1.
v_attr = v_nodemap->get_item( v_index ).
v_name = v_attr->get_name( ).
v_prefix = v_attr->get_namespace_prefix( ).
v_value = v_attr->get_value( ).
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
* text node
v_value = v_node->get_value( ).
MOVE v_value TO v_char.
IF v_char <> cl_abap_char_utilities=>cr_lf.
wa-name = v_name.
wa-value = v_value.
APPEND wa TO itab.
CLEAR wa.
ENDIF.
ENDCASE.
* advance to next node
v_node = v_iterator->get_next( ).
ENDWHILE.
LOOP AT itab INTO wa.
ENDLOOP.
Regards
Abhii -
Reading XML file using BAPI and then uploading that xml file data into SAP
I am getting a xml file from Java server. I need to take
data from this file using BAPI and need to upload into SAP using SAP.
Please tell me how to read XML files using BAPI's.<b>SDIXML_DATA_TO_DOM</b> Convert SAP data (elementary/structured/table types) into DOM (XML
<b>SDIXML_DOM_TO_XML</b> Convert DOM (XML) into string of bytes that can be downloaded to PC or application server
<b>SDIXML_DOM_TO_SCREEN</b> Display DOM (XML)
<b>SDIXML_DOM_TO_DATA</b>
data: it_table like t001 occurs 0.
data: l_dom TYPE REF TO IF_IXML_ELEMENT,
m_document TYPE REF TO IF_IXML_DOCUMENT,
g_ixml TYPE REF TO IF_IXML,
w_string TYPE XSTRING,
w_size TYPE I,
w_result TYPE I,
w_line TYPE STRING,
it_xml TYPE DCXMLLINES,
s_xml like line of it_xml,
w_rc like sy-subrc.
start-of-selection.
select * from t001 into table it_table.
end-of-selection.
initialize iXML-Framework ****
write: / 'initialiazing iXML:'.
class cl_ixml definition load.
g_ixml = cl_ixml=>create( ).
check not g_ixml is initial.
write: 'ok'.
create DOM from SAP data ****
write: / 'creating iXML doc:'.
m_document = g_ixml->create_document( ).
check not m_document is initial.
write: 'ok'.
write: / 'converting DATA TO DOM 1:'.
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
EXPORTING
NAME = 'IT_TABLE'
DATAOBJECT = it_table[]
IMPORTING
DATA_AS_DOM = l_dom
CHANGING
DOCUMENT = m_document
EXCEPTIONS
ILLEGAL_NAME = 1
OTHERS = 2.
if sy-subrc = 0. write 'ok'.
else. write: 'Err =', sy-subrc.
endif.
check not l_dom is initial.
write: / 'appending DOM to iXML doc:'.
w_rc = m_document->append_child( new_child = l_dom ).
if w_rc is initial. write 'ok'.
else. write: 'Err =', w_rc.
endif.
visualize iXML (DOM) ****
write: / 'displaying DOM:'.
CALL FUNCTION 'SDIXML_DOM_TO_SCREEN'
EXPORTING
DOCUMENT = m_document
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
if sy-subrc = 0. write 'ok'.
else. write: 'Err =', sy-subrc.
endif.
convert DOM to XML doc (table) ****
write: / 'converting DOM TO XML:'.
CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
DOCUMENT = m_document
PRETTY_PRINT = ' '
IMPORTING
XML_AS_STRING = w_string
SIZE = w_size
TABLES
XML_AS_TABLE = it_xml
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
if sy-subrc = 0. write 'ok'.
else. write: 'Err =', sy-subrc.
endif.
write: / 'XML as string of size:', w_size, / w_string.
describe table it_xml lines w_result.
write: / 'XML as table of', w_result, 'lines:'..
loop at it_xml into s_xml.
write s_xml.
endloop.
write: / 'end of processing'.
end of code
Hope this will be useful.
regards
vinod -
Reading XML file using BAPI I must use adapters .
Reading XML file using BAPI and then uploading that xml file data into SAP using BDC.
I cant take file on to my Application server I am getting the file dynamically from other file server and I need to use BAPis to read data from XML file.please tell me what should be my Import,Export and Tables parameterrs should be.
ThanksHi,
Import, export and table parameters for BAPI is required, without that BAPI will not able to collect the data from XML. What you need to do is write a Zprogram and collect the data, store that data in internal table and call the BAPI by passing required parameters.
Different Scanarios:
1) Before calling a BAPI write some other program which collects the data from XML and create a UNIX file. Try to get the data from UNIX FILE
2) If you see the XML tags, data will be in side that tags, try to get the data from XML tags and store that data in one SAP table. You can use the BAPI by fetching the data from table
3)Create a table and store the data in the table. Use the table in SAP to extract the data.
BAPI won't work without any parameters, you have to pass some parameters then the BAPI will return some values.
Hope i am clear.
Thanks&Regards,
-Suresh Revuru -
Problem while reading XML file from Aplication server(Al11)
Hi Experts
I am facing a problem while reading XML file from Aplication server using open data set.
OPEN DATASET v_dsn IN BINARY MODE FOR INPUT.
IF sy-subrc <> 0.
EXIT.
ENDIF.
READ DATASET v_dsn INTO v_rec.
WHILE sy-subrc <> 0.
ENDWHILE.
CLOSE DATASET v_dsn.
The XML file contains the details from an IDOC number , the expected output is XML file giving all the segments details in a single page and send the user in lotus note as an attachment, But in the present output after opening the attachment i am getting a single XML file which contains most of the segments ,but in the bottom part it is giving the below error .
- <E1EDT13 SEGMENT="1">
<QUALF>001</QUALF>
<NTANF>20110803</NTANF>
<NTANZ>080000</NTANZ>
<NTEND>20110803<The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/SHPORD_0080005842.xml'.
/SPAN></NTEND>
<NTENZ>000000</NTENZ>
for all the xml its giving the error in bottom part , but once we open the source code and if we saved in system without changing anything the file giving the xml file without any error in that .
could any one can help to solve this issue .Hi Oliver
Thanx for your reply.
see the latest output
- <E1EDT13 SEGMENT="1">
<QUALF>003</QUALF>
<NTANF>20110803</NTANF>
<NTANZ>080000</NTANZ>
<NTEND>20110803</NTEND>
<NTENZ>000000</NTENZ>
<ISDD>00000000</ISDD>
<ISDZ>000000</ISDZ>
<IEDD>00000000</IEDD>
<IEDZ>000000</IEDZ>
</E1EDT13>
- <E1EDT13 SEGMENT="1">
<QUALF>001</QUALF>
<NTANF>20110803</NTANF>
<NTANZ>080000</NTANZ>
<NTEND>20110803<The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/~1922011.xml'.
/SPAN></NTEND>
<NTENZ>000000</NTENZ>
E1EDT13 with QUALF>003 and <E1EDT13 SEGMENT="1">
with <QUALF>001 having almost same segment data . but E1EDT13 with QUALF>003 is populating all segment data
properly ,but E1EDT13 with QUALF>001 is giving in between. -
Reading XML Data from ABAP Program?
Hi,
How do I read XML Data from an ABAP Program? For example if I have the below basic XML Code-
<xml>
<Name> Thiru </Name>
<Age> 24 </Age>
<City> chennai </Chennai>
</xml>
How do i read the data within the Name,Age, and City tags into variables in the ABAP Program?
Regards,
Thiruif you decide to do in XSLT, I have a sample list here:
XML file like this:
<?xml version="1.0" encoding="UTF-16"?>
<F>
<P1>
<t_1>value1</t_1>
<t_2>testvalue</t_2>
</P1>
<P2>
</P2>
</F>
XSLT file like this:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sapxsl="http://www.sap.com/sapxsl" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:template match="F">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<<b>DOCUMENT</b>>
<xsl:apply-templates/>
</<b>DOCUMENT</b>>
</asx:values>
</asx:abap>
</xsl:template>
<xsl:template match="P1">
<ENTRY>
<<b>T_1</b>><xsl:value-of select="t_1"/></T_1>
<<b>T_2</b>><xsl:value-of select="t_2"/></T_2>
</ENTRY>
</xsl:template>
</xsl:transform>
ABAP program like this:
DATA: BEGIN OF wa_upload,
text(255) TYPE c,
END OF wa_upload,
itab_upload LIKE TABLE OF wa_upload,
BEGIN OF wa_document,
t_1 TYPE string,
t_2 TYPE string,
END OF wa_document,
itab_document LIKE TABLE OF wa_document.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'XXXXX'
filetype = 'ASC'
TABLES
data_tab = itab_upload.
CALL TRANSFORMATION zrappel_xml_test
SOURCE XML itab_upload
RESULT <b>document</b> = itab_document.
You should pay attention to the bold words.
hope it will be helpful
thanks -
Reading XML file from PL/SQL
Hi,
I have a requirement where in I have to read email addresses from the xml file on the OS and use pass it on to a procedure as parameters.
this is the xml file
<?xml version="1.0" encoding="UTF-8" ?>
- <V21>
- <ToAddress>
+ <User>
<Emailid>[email protected]</Emailid>
</User>
- <UserGroup2>
<Emailid>[email protected]</Emailid>
</UserGroup2>
</ToAddress>
- <FromAddress>
<Emailid>[email protected]</Emailid>
</FromAddress>
<HelpDeskNumber>99999999</HelpDeskNumber>
<MailFormat>text/plain</MailFormat>
</V21>
can somebody guide me as to how one can read the XML file (residing in OS) and extract the email fields.Can you throw in some light on how to read XML in pl/sql in oracle 9i?Simplest example:
SQL> DECLARE
2 xml XMLTYPE := XMLTYPE(
3 '<?xml version="1.0" encoding="UTF-8" ?>
4 <V21>
5 <ToAddress>
6 <User>
7 <Emailid>[email protected]</Emailid>
8 </User>
9 <UserGroup2>
10 <Emailid>[email protected]</Emailid>
11 </UserGroup2>
12 </ToAddress>
13 <FromAddress>
14 <Emailid>[email protected]</Emailid>
15 </FromAddress>
16 <HelpDeskNumber>99999999</HelpDeskNumber>
17 <MailFormat>text/plain</MailFormat>
18 </V21>') ;
19 BEGIN
20 dbms_output.put_line(xml.extract('/V21/ToAddress/User/Emailid/text()').getStringVal()) ;
21 END ;
22 /
[email protected]
PL/SQL procedure successfully completed.
SQL> disc
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
SQL> -
I am reading XML file from unix using :
FORM read_file USING p_name.
DO.
READ DATASET p_name INTO WXML_LINE LENGTH LENG.
ENDDO.
Then I am using subroutine below where I get a short dump at
case X_NODE->get_type( ).
FORM get_data tables Y_CAPXML structure GV_CAPXML
using value(x_node) type ref to if_ixml_node.
data: INDENT type i.
data: PTEXT type ref to if_ixml_text.
data: STRING type string.
data: TEMP_STRING(100).
case X_NODE->get_type( ).
when if_ixml_node=>co_node_element.
STRING = X_NODE->get_name( ).
GV_NODETEXT = STRING.
when if_ixml_node=>co_node_text.
PTEXT ?= X_NODE->query_interface( IXML_IID_TEXT ).
if PTEXT->ws_only( ) is initial.
STRING = X_NODE->get_value( ).
case GV_NODETEXT.
when 'NIIN'.
move STRING to GV_CAPXML-NIIN.
when 'FED_x0020_STOCK_x0020_CLASS'.
move STRING to GV_CAPXML-fed_stock_class.
when 'DODIC'.
move STRING to GV_CAPXML-dodic.
endcase.
The text for the short dump is : STACK_STATE_NO_ROLL_MEMORY
Can someone please explain what is it mean.
Thanks.May be this blog can help:
<a href="/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach for Blog</a>
Sri
Maybe you are looking for
-
When the first ipad came out i set it up and created an itunes account, since then she got an iphone and an ipad and everything was good. I had an android but wanted to try out the iphone. When i set it up ut jumpled all of our contacts, apps, and ev
-
HT204053 Can I combine 2 Apple IDs/accounts into 1?
How can I combine my Apple ID/iTunes account on my pc to my iPhone and iPad? I've had an old iTunes account on my pc (300+ songs) and hadn't been using it that was combined with an old iPod Touch. Since then I've reset and sold my iPod Touch and I
-
Wondering about my new 4S' battery. I think it's getting drained too much for a new unit. Here's a scenario. Charged it to 100% before leaving my house i checked my social media feeds on wifi and made a few calls for about 5 minutes. 89% left after l
-
Missing Account information when creating Planned Activity in Account
Hi Expert, When creating planned activity in Account inwebUI, I am expecting that the Account information would be populated in the Account field of a planned activity but it is not. Could you please tell me if this is a SAP standard? Thanks
-
This is the second time this has happened: I need to re-set my i pod to get it to turn off. I can't imagine this is normal.