PL/SLQ In-memory table to XML

Is it possible to select from a PL/SQL in-memory table (Not a DB table or temp table) into an XML document? And to parse an XML document into a PL/SQL table?

What do you mean by in-memory table?

Similar Messages

  • Unnesting XML and memory tables

    Post Author: Guy Jeffery
    CA Forum: Data Integration
    Hi,
    I'm having issues with unnesting incoming XML messages within a real time job. The XML is being partially unnested into intermediate memory tables, and the intermediate memory tables are used to populate physical database tables. This works fine on a small scale - if I only have a few physical tables to populate, it works as planned. However, when I increase the complexity of the job, the job will begin to execute and then just stop and 'hang'. There are no error messages, and the log for that job has a blue tick next to it - but the job never completes.
    I've had a look through the technical help file with BODI, and searched this forum, but can't find anything which mentions the situation above. Is it likely to be a memory issue? Or is there some upper limit on the number of objects used within a real time BODI job?
    Has anyone experienced these issues before, and found a resolution? Any suggestions would be greatly appeciated, as I need a solution pretty urgently. Thanks in advance.
    Guy

    Post Author: bhofmans
    CA Forum: Data Integration
    Guy,
    In real-time jobs, the whole job is executed in one al_engine process, this includes all data processing, but also the memory tables. It's started once and stays active the whole time to treat incoming messages.
    This is different for batch jobs where each data flow is a seperate process, and data flows are started in series or parallel depending on the job design, once finished processing they disappear again.
    So for your real-time job this means the whole processing can only use a maximum of 2 GB of memory (upper limit for 32-bit processes). Upgrading to DI 11.7 would give you more options like using pageable cache which will use disk space as additional memory to overcome the 2 GB limitation. But the first thing to check would be the amount of memory used - I'm just assuming here you need more then 2 GB, you can easily check this via the Windows task manager. Which DI versions are you using ? Is this on Windows ?
    - Ben.

  • Can we change table into XML through OWB

    Hi everyone,
    Is it possible to change table into XML through OWB?
    Can anybody help me.
    just send me the steps to do
    Thanks in advance
    Rachit

    Hello, Rachit
    As far as I understand our question – you need to export data from the table into XML file.
    I don’t think you have direct operator within OWB (at least for ver. 9.2.0.4). But anyway, you could write PLSQL procedure using DBMS_XMLQUERY to perform XML generation and transform it with your stylesheet.
    Unfortunately, this package uses DOM to work with XML, so could have a serious memory consumption while trying to export large tables this way.

  • Data from table in xml Format and Inserting it into  Table

    Hi All
    I have table where xml data is stored in long format with xml tag know i have read the entire xml xoulmn which is xml tag and insert it into diffrent table can any suggest me the code
    Thanks & Regards

    I believe you are on the wrong forum. You want the XML DB forum.
    See:
    XML DB

  • How to write a procedure to load the data into a table using xml file as input to the procedure?

    Hi,
    Iam new to the xml,
    can u please anyone help me how to write procedure to load the data into a table using xml as input parameter to a procedure and xml file is as shown below which is input to me.
    <?xml version="1.0"?>
    <DiseaseCodes>
    <Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    </DiseaseCodes>.
    Regards,
    vikram.

    here is the your XML parse in 11g :
    select *
      from xmltable('//Entity' passing xmltype
    '<?xml version="1.0"?>
    <DiseaseCodes>
    <Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    <Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity>
    </DiseaseCodes>
    ') columns
      "dcode" varchar2(4000) path '/Entity/dcode',
      "ddesc" varchar2(4000) path '/Entity/ddesc',
      "reauthflag" varchar2(4000) path '/Entity/reauthflag'
    dcode                                                                            ddesc                                                                            reauthflag
    0                                                                                (I87)Other disorders of veins - postphlebitic syndrome                           0
    0                                                                                (J04)Acute laryngitis and tracheitis                                             0
    0                                                                                (J17*)Pneumonia in other diseases - whooping cough                               0
    SQL>
    Using this parser you can create procedure as
    SQL> create or replace procedure myXMLParse(x clob) as
      2  begin
      3    insert into MyXmlTable
      4      select *
      5        from xmltable('//Entity' passing xmltype(x) columns "dcode"
      6                      varchar2(4000) path '/Entity/dcode',
      7                      "ddesc" varchar2(4000) path '/Entity/ddesc',
      8                      "reauthflag" varchar2(4000) path '/Entity/reauthflag');
      9    commit;
    10  end;
    11 
    12  /
    Procedure created
    SQL>
    SQL>
    SQL> exec myXMLParse('<?xml version="1.0"?><DiseaseCodes><Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity></DiseaseCodes>');
    PL/SQL procedure successfully completed
    SQL> select * from MYXMLTABLE;
    dcode                                                                            ddesc                                                                            reauthflag
    0                                                                                (I87)Other disorders of veins - postphlebitic syndrome                           0
    0                                                                                (J04)Acute laryngitis and tracheitis                                             0
    0                                                                                (J17*)Pneumonia in other diseases - whooping cough                               0
    SQL>
    SQL>
    Ramin Hashimzade

  • Error while downloading data from internal table into XML file

    hi all,
    i developed a program to download data from into internal table to xml file like this.
    tables: mara.
    parameters: p_matnr like mara-matnr.
    data: begin of itab_mara occurs 0,
                matnr like mara-matnr,
                ernam like mara-ernam,
                aenam like mara-aenam,
                vpsta like mara-vpsta,
          end of itab_mara.
    data: lv_field_seperator type c,     " value 'X',
          lv_xml_doc_name(30) type c,    " string value ‘my xml file’,
          lv_result type i.
          lv_field_seperator = 'x'.
          lv_xml_doc_name = 'my xml file'.
    types: begin of truxs_xml_line,
              data(256) type x,
          end of truxs_xml_line.
    types:truxs_xml_table type table of truxs_xml_line.
    data:lv_tab_converted_data type truxs_xml_line,
         lt_tab_converted_data type truxs_xml_table.
    data: lv_xml_file type rlgrap-filename value 'c:\simp.xml'.
    select matnr ernam aenam vpsta from mara into table itab_mara up to 5
           rows where matnr = p_matnr.
    CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
    EXPORTING
       I_FIELD_SEPERATOR          = lv_field_seperator
      I_LINE_HEADER              =
      I_FILENAME                 =
      I_APPL_KEEP                = ' '
       I_XML_DOC_NAME             = lv_xml_doc_name
    IMPORTING
       PE_BIN_FILESIZE            = lv_result
      TABLES
        I_TAB_SAP_DATA             = itab_mara
    CHANGING
       I_TAB_CONVERTED_DATA       = lt_tab_converted_data
    EXCEPTIONS
      CONVERSION_FAILED          = 1
      OTHERS                     = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    open dataset lv_xml_file for output in binary mode.
    loop at lt_tab_converted_data into lv_tab_converted_data.
    transfer lv_tab_converted_data to lv_xml_file.
    endloop.
    close dataset lv_xml_file.
    this program is syntactically correct and getting executed, but when i open the target xml file it is showing the following error.
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    XML document must have a top level element. Error processing resource 'file:///C:/simp.xml'.
    will anyone show me the possible solution to rectify this error
    thanks and regards,
    anil.

    Hi,
    Here is a small sample program to convert data in an internal table into XML format and display it.
    DATA: itab  TYPE TABLE OF spfli,
          l_xml TYPE REF TO cl_xml_document.
    * Read data into a ITAB
    SELECT * FROM spfli INTO TABLE itab.
    * Create the XML Object
    CREATE OBJECT l_xml.
    * Convert data in ITAB to XML
    CALL METHOD l_xml->create_with_data( name = 'Test1'
                                         dataobject = t_goal[] ).
    * Display XML Document
    CALL METHOD l_xml->display.
    Here are some other sample SAP programs to handle XML in ABAP:
    BCCIIXMLT1, BCCIIXMLT2, and BCCIIXMLT3.
    Hope this helps,
    Sumant.

  • Writing from internal table to xml format

    Hi,
    I searched all the forum and I have a question on writing the data from internal table in xml format to the file on app.server.
    Data: ITAB1   TYPE TABLE OF SPFLI,
             L_XML  TYPE REF TO CL_XML_DOCUMENT.
      SELECT * FROM SPFLI INTO TABLE ITAB1.
    CREATE THE XML OBJECT
      CREATE OBJECT L_XML.
    CONVERT THE DATA TO XML
      CALL METHOD L_XML->CREATE_WITH_DATA( DATAOBJECT = ITAB1[] ).
    after this how to move the XML data in the object to a file on app.server.
    Thanks

    p_ufile is the path of the application server
    p_output is the internal table with data to be moved to app serv.
    OPEN DATASET p_ufile FOR OUTPUT IN TEXT MODE.
    LOOP AT p_output INTO wa_file.
    TRANSFER wa_file TO p_ufile.
    CLEAR wa_file.
    ENDLOOP.
    CLOSE DATASET p_ufile.
    for XML I guees the path p_ufile ill be <b>sap/usr/tmp/file.xml</b>

  • Converting XML as table to XML as string

    All,
    I am successfully able to convert XML table from Internal Table. Now, I would like to convert this XML Table into XML string.
    Any help on this will be appreciated.
    Regards,
    Salil
    Moderator message: please search for available information/documentation before asking.
    Edited by: Thomas Zloch on Dec 7, 2010 11:57 AM

    Howdy,
    CONCATENATE LINES OF lt_table into l_string SEPARATED BY cl_abap_char_utilities=>cr_lf.
    This will create a string of the lines of the internal table with a carriage return after each line.
    Cheers
    Alex

  • Export Internal Table to XML in Background

    Hi
    I need to export a internal table into xml file in background using open dataset. The file is getting created but i am not able to open the file using IE/XML editor . When i open the file uisng wordpad i can see some charcters at the end of file which prevents it from opening in xml editor. if i delete the characters(box like) and save the file. i am able to open the file
    When i downalod the same internal table via frontend using ws_downlod it works pefectly. no junk charcters are appended in the end. and hence files opens perfectly
    below is the extract of program
    START-OF-SELECTION.
       PERFORM get_data.
       PERFORM create_xml.
    FORM get_data.
       REFRESH accesos.
       CLEAR accesos.
       MOVE: '45050' TO accesos-socio-numero,
                     'MOISES MORENO' TO accesos-socio-nombre,
                     '0' TO accesos-socio-reposicion.
       APPEND accesos.
    ENDFORM.
    i am using the following function modules
    CALL FUNCTION 'SDIXML_DATA_TO_DOM'
            EXPORTING
                 name         = 'ACCESOS'
                 dataobject   = accesos[]
            IMPORTING
                 data_as_dom  = l_dom
    CHANGING
                 document     = m_document
            EXCEPTIONS
                 illegal_name = 1
                 OTHERS       = 2.
           CHECK NOT l_dom IS INITIAL.
    w_rc = m_document->append_child( new_child = l_dom ).
    CALL FUNCTION 'SDIXML_DOM_TO_XML'
    EXPORTING
    document      = m_document
    IMPORTING
    xml_as_string = w_string
    size          = w_size
    TABLES
    xml_as_table  = it_xml
    EXCEPTIONS
    no_document   = 1
    OTHERS        = 2.
    LOOP AT it_xml INTO xml_tab-d.
         APPEND xml_tab.
       ENDLOOP.
    The following syntax for open datset which does not work
      lv_physcial_file = '
    hdat03\test.xml'.
    OPEN DATASET lv_physcial_file IN BINARY MODE   FOR OUTPUT MESSAGE l_msg.
       LOOP AT xml_tab.
         TRANSFER xml_tab TO lv_physcial_file.
       ENDLOOP.
    The ws_download function works
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
                   BIN_FILESIZE = W_SIZE
                   FILENAME = GK_RUTA
                   FILETYPE = 'BIN'
    TABLES
                   DATA_TAB = XML_TAB
    EXCEPTIONS
                   OTHERS = 10.
    many thnaks

    Hi Chetan,
    Can you just try changing the syntax to the following, I not sure if that will help but just try and see.
    OPEN DATASET  lv_physcial_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    Regards
    Mohamed

  • Internal Table to XML

    Hallo Experts,
    I have retrived a Internal Table from FM.
    CALL FUNCTION 'SRTUTIL_CONVERT_XML_TO_TABLE'
        EXPORTING
          xdoc             = lv_xstring
    IMPORTING
    *   ERROR_TEXT       =
         data             = lt_xml
    I have manipulated the Tagnames in the Internal Table lt_xml.
    Now I want to change the internal table to xml.
    Is there any FM or a class. can anyone help me??
    Thanks
    Kind regards
    rana Waseem

    Hallo,
    Thanks for your Reply. I am trying to manipulate the xml attributes in print report. I have the data in xstring form. I have changed it to internal Table with following code.
    CALL FUNCTION 'SRTUTIL_CONVERT_XML_TO_TABLE'
        EXPORTING
          xdoc             = lv_xstring
    IMPORTING
    *   ERROR_TEXT       =
         data             = lt_xml
    After the change in the table lt_xml I am trying to have once again a xstring to give to the Print Report. I have tried it with class
    LOOP AT lt_xml INTO ls_xml.
        CALL METHOD cl_soap_xml_helper=>transform_to_xml
          EXPORTING
            tag_name          = ls_xml-tag_name
            data              = ls_xml-tag_value
            data_type         = ls_xml-tag_type
            ignore_init_value = 'X'
    *    ignore_exception  =
          CHANGING
            xml               = lv_xstring_two
    *  ENDLOOP.
    but when I try to check the XML become an error
    The XML cannot be showed, when Stylesheet XSL  is used Remove the error and try again.
    I cannot understand where is the error. Because the orignal xstring from system is shown correct. But when I create the new xstring give error .
    Thanks for your help
    kind regards
    waseem

  • Convert data from internal table to XML file.

    Hi All,
    I am selecting data from database into one internal table.
    Now I want to convert data from internal table to xml file format and save in to my desktop. Please suggest me how I can achieve my requirement.
    Kindly reply me ASAP.

    Use this FM. SAP_CONVERT_TO_XML_FORMAT
    Check this link too -
    Re: Data Export in XML format
    XML files from ABAP programs

  • Persist XML Data to Database Table - Generic XML Schema

    Hi,
    I would like to represent data in XML format and persist to any database tables.
    The ideal xml is like:
    <TABLE NAME="TABLE1">
    <TABLEDEF><COLUMN NAME="COLUMN1"/><COLUMN NAME="COLUMN2"/></TABLEDEF>
    <ROW><COLUMN VALUE="value1"/><COLUMN VALUE="value2"/></ROW>
    <ROW><COLUMN VALUE="value11"/><COLUMN VALUE="value22"/></ROW>
    </TABLE>     
    <TABLE NAME="TABLE2">
    </TABLE>     
    The XML could then be parsed, and saved to database with JDBC by manually composing the statement strings.
    To reduce the coding effort (xml parsing, JDBC connection, etc), are there any open source projects available to achieve the above purpose? The popular O/R mapping tools like Hibernate, Castor, etc, can't handle this scanario because they require the knowledge of the tables on the server side in order to create the mapping files in advance.
    Thanks for the help!

    Hi,
    I would like to represent data in XML format and persist to any database tables.
    The ideal xml is like:
    <TABLE NAME="TABLE1">
    <TABLEDEF><COLUMN NAME="COLUMN1"/><COLUMN NAME="COLUMN2"/></TABLEDEF>
    <ROW><COLUMN VALUE="value1"/><COLUMN VALUE="value2"/></ROW>
    <ROW><COLUMN VALUE="value11"/><COLUMN VALUE="value22"/></ROW>
    </TABLE>     
    <TABLE NAME="TABLE2">
    </TABLE>     
    The XML could then be parsed, and saved to database with JDBC by manually composing the statement strings.
    To reduce the coding effort (xml parsing, JDBC connection, etc), are there any open source projects available to achieve the above purpose? The popular O/R mapping tools like Hibernate, Castor, etc, can't handle this scanario because they require the knowledge of the tables on the server side in order to create the mapping files in advance.
    Thanks for the help!

  • Dynamic Table with XML Schema

    Hi, I am new to livecycle and wondering if there is any sample for setting up the dynamic table with XML schema so I can access the data through workbench's xpath. thanks.

    Ivor,
    Take a look at the samples shipped with Designer. For 8.2.1 release take a look at
    C:\Program Files\Adobe\LiveCycle Designer ES\8.2\EN\Samples\Forms\Purchase Order\Schema\Schema\Purchase Order.xsd
    and the form samples.
    Otherwise, forward a request to [email protected] I would be happy to send you a sample XDP with a dynamic table and a schema.
    Steve

  • Spry Tables and Xml Data Sets viewed in IE7

    Has anyone ever run into a problem with Spry Tables and Xml
    Data Sets viewed in IE7? Work fine in IE6 and Firefox, but get the
    error "exception caught while loading feed.xml: [object Error]" in
    IE 7. Any ideas?
    Attached is the xml I'm using.
    Thanks

    I came looking for the answer to this question. I could not
    find an answer. Eventually I found it the answer that worked for
    me, a graphic designer with not much experience in xml.
    The following url provided an errata file in PDF format:
    www.peachpit.com/dwcs3cib
    which includes the following addendum to the incomplete
    instructions in the book i was using to learn about spry:
    "If Internet Explorer 7 is your primary browser, you'll nee
    to take some extra steps to view spry dynamic content locally.
    First, your site must be within the local server webroot; be sure
    your Lessons folder is stored within the Inetpub>wwwroot folder.
    Next, double-click the site name in the files panel to open the
    Site Definition dialogue. Click the Testing Server category; from
    the Access List choose Local/Network. Click Okay to close the Site
    Definition dialogue. Now, when you preview your page with Internet
    Explorer, your local Web server (localhost) serves the page as
    designed."
    Horray for me! Now i can move on from here and actually get
    some work done!

  • Raw pointer access to in-memory tables

    Hello, I realize this is quite an odd question, but I was wondering if it's possible to obtain raw pointers to rows stored in an in-memory table introduced in SQL Server 2014.
    What I am trying to do is to use AMD Kaveri APU in conjunction with SQL Server 2014. The APU has 500+ shader cores that can perform an operation on a piece of memory in parallel, and since SQL Server 2014 already keeps these tables in memory, I was hoping
    there is a way to reference these tables directly via pointers that can be used by APU cores (I could create wrapper code in CLR if needed) rather than taking data out of the database and creating in-memory arrays. All data types I am interested in are fixed
    length (doubles) and tables can be locked in the "read-only" state while read operations take place.
    Is it possible to access in-memory tables via raw pointers?

    Hi Popsovy,
    Thank you for your question. I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    If you have any feedback on our support, please click
    here.
    Elvis Long
    TechNet Community Support

Maybe you are looking for

  • Magic Mouse scrolling lacks "rolling feature" for fast finger swipe

    I recently purchased a Magic Mouse for my iMac (27" 2.8 GHz Intel Core 2 Duo with Leopard 10.5.8 OS). I've noticed that the scrolling does not have one of the features shown in the System Profile settings for the mouse scrolling. When I move my finge

  • Cannot resize root partition

    i used gparted live in order to maximize the size of root partition but i can't Device Boot Start End Blocks Id System /dev/sda1 2048 718847 358400 7 HPFS/NTFS/exFAT /dev/sda2 * 718848 586656347 292968750 7 HPFS/NTFS/exFAT /dev/sda3 612048894 9767710

  • Spool number of sumitted program

    Hello, does somebody know, how I can get the generated spool number of a submitted program? Unfortunately, the system variables sy-spono or sy-sponr will be deleted, when the submitted program will be left. Is it possibly feasible to get the spool nu

  • Perfomancy reports in BI statistics

    I need to create some specific reports using the BI Statistics 7.0 infocubes. I need the runtime (average front-end, manager data and OLAP) of a specific report for a specific period. And the usage (how many times a query is used, and how many naviga

  • Timekeeper Group - One Employee belonging to different Timekeeper Groups

    Hey guys, Got an issue here. I created two groups namely Test Group 1 and Test Group 2. An employee, say Robert, belongs to both of these groups. So when I enter timecard details for him in Test Group 1 in the Timekeeper Entry Window, his same timeca