How to save xml output of fm into sap as xml

how to save xml output of fm into sap as xml
thank you,
regards,
Jagrut bharatkumar shukla

Hi Jagrut
The XML document can be stored in an ABAP variable rxml of the type STRING or XSTRING, or in an internal standard table sxml of the elementary line type C. Hence, I believe, your issue with the lenght can be resovled with this types.
For rxml, you specify an interface reference variable of the type IF_IXML_OSTREAM that points to an IXML output stream.
For rxml, you specify an interface reference variable of the type IF_IXML_DOCUMENT that points to an IXML document.
With the stream factory you have several options. Before you call your CALL TRANSFORMATION, you setup your stream factory for these different options.
1. You want to write the file to the application server file system. You want to create your OSTREAM as a binary string. In this example b_xml is an empty binary string. OSTEAM will be the reference variable of tyep IF_IXML_OSTREAM.
ostream =
streamfactory->create_ostream_xstring( b_xml ).
You get the output lenght with the following:
ressize = ostream->get_num_written_raw( ).
You can then send the entire string to the file system with the following:
transfer b_xml to filename1 length ressize.
Also refer to this weblog:
/people/tobias.trapp/blog/2005/05/04/xml-processing-in-abap-part-1
Regards
Ravish Garg
<b>
*Remember reward points is the best way to say thank you :)</b>

Similar Messages

  • How to save the output of sap script in sap so that can be retrieved later

    hi abapers
    how to save the output of sap script in sap so that can retrieve the saved document later.
    i have to save the rcia output from sap script in pdf document in sap so that it can be retrieved later
    how to use dms
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Dec 26, 2008 11:01 AM

    Hi Deepika,
    Look into this link https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/401cca81-b861-2910-ada2-f416dfb3b3fe
    Regards,
    Pravin

  • Does anyone know how to convert the output from the standard report to xml?

    Does anyone know how to convert the output from the standard SAP report to xml?

    since it a standard report which you cannot modify you can only do the following.
    submit report exporting list to memory
    then
    list from memory and then
    use the returned itab along with CALL TRNSFORMATION key word to convert to xml.
    but this only going to place the whole list content (including data and formating lines,etc) into a xml element and not the actual data alone in the list .

  • How to save the output of sap script to pdf document in sap

    hi abapers
    how to save the output of sap script in sap so that can retrieve the saved document later.
    i have to save the rcia output from sap script in pdf document in sap so that it can be retrieved later
    how to use dms

    Hi deepika,
    This thread will solve ur problem OTF  -> PDF
    Regards,
    Pravin

  • Hi, extract data from xml file and insert into another exiting xml file

    i am searching code to extract data from xml file and insert into another exiting xml file by a java program. I understood it is easy to extract data from a xml file, and how ever without creating another xml file. We want to insert the extracted data into another exiting xml file. Suggestions?
    1st xml file which has two lines(text1.xml)
    <?xml version="1.0" encoding="iso-8859-1"?>
    <xs:PrintDataRequest xmlns:xs="http://com.unisys.com/Anid"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://com.unisys.com/Anid file:ANIDWS.xsd">
    <xs:Person>
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://com.unisys.com/Anid file:ANIDWS.xsd">
    These two lines has to be inserted in the existing another xml(text 2.xml) file(at line 3 and 4)
    Regards,
    bubbly

    Jadz_Core wrote:
    RandomAccessFile? If you know where you want to insert it.Are you sure about this? If using this, the receiving file would have to have bytes inserted that exactly match the number of bytes replaced. I'm thinking that you'll likely have to stream through the second XML with a SAX parser and copy information (or insert new information) as you stream with an XML writer of some sort.

  • Extract data from xml file and insert into another exiting xml fil

    hello,
    i am searching extract data from xml file and insert into another exiting xml file by a java program. I understood it is easy to extract data from a xml file, and how ever without creating another xml file. We want to insert the extracted data into another exiting xml file. Suggestions?
    Regards,
    Zhuozhi

    If the files are small, you can load the target file in a DOM document, insert the data from the source file and persist the DOM.
    If the files are large, you probably want to use a StAX or SAX.

  • How to convert JSR-168 compliant Portlets into SAP iviews

    Hi All,
    Its very urgent requirement for me...
    <b>How to convert JSR-168 compliant Portlets into SAP Enterprise Portal supported iViews in SAP NetWeaver 2004 or 2004s.</b> Can you please tell me any tools are available for conversion or is there any another procedure to achieve this problem.
    At last can we ach
    Each answer will be awarded with points.
    Regards
    Sreedhar G

    Hi Sreedhar,
    Is there anyway to display Standard Business packages content in IBM websphere portal.If there is anyway please let me know.
    thanks,
    Anil

  • How to convert JSR 168 compliant Portlets into SAP supported iViews.

    Hi,
    How to convert JSR 168 compliant Portlets into SAP supported iViews in SAP NetWeaver 2004.
    Thanks & Regards
    Siva

    Guys,
    JSR is not supported untill NW05. Please check this
    /thread/176954 [original link is broken]
    Akhilesh

  • How to save pdf output of xml publisher

    Hi to all,
    I have just created a new report with xml publisher and I have associated the execution to a concurrent.
    When I see the output of my concurrent, I see the correct report.
    Now, I need to save the output of this concurrent from pl/sql, without open the concurrent.
    I'm new of xml publisher.
    Do you know how can I solve my problem?
    Thanks
    Pier

    Hello
    The BI Publisher forum is here :
    BI Publisher
    Regards

  • How can i save the output  of  report into  a file,.

    Hi friends,
                 i was create a executable program .. it was executing fine.. imagine.. my program is just fetching the data from  LFA1  table based on some conditions.. every thing is fine.. and i'm getting the output also..
    but i want to save this output in a separate file.. that means.. what can i do.. my program is executing background... so, i want to save this out put in a file... so, can any one plz provide me the coding steps...
    for example here i'm giving the  my program code.. so, now where can i add the new coding.. and what can  i add ...
    data:begin of  table itab occurs 0,
            lifnr  type  lifnr,
            name1 type  name1,
            end of itab.
    select lifnr  name1  from lfa1  into table  itab .
    loop at itab.
    write:/  itab-lifnr , itab-name1,
    endloop.
    i dont know coding.. I'm learning ABAP... so, can you plz provide the exact coding..for storing these data into separate file from spool..
    help ful answers will be rewarded
    Thanks
    Babu

    Hi  Santhosh,  and  Atish,
         Thanks  for ur responces... i was mention already in my question itself.. that my program is executing  in background.. so,  every day at  6 am it will execute.. but i want to see the result...
    for that what can i do..
    regards
    Babu

  • How to save the workbook's result into table ?

    Dear all:
    Now  I need to output the workbook's result into ta table ,what can i do now?
    If I save a query's result into a table use rscrm_bapi,if the query have two structures ,the result table looks not well, how can do do?

    Read the help files about APD

  • How to save pdf output

    Hi to all,
    I have just created a new report with xml publisher and I have associated the execution to a concurrent.
    When I see the output of my concurrent, I see the correct report.
    Now, I need to save the output of this concurrent from pl/sql, without open the concurrent.
    I'm new of xml publisher.
    Do you know how can I solve my problem?
    Thanks
    Pier

    PDF File is saved on the Concurrent Manager tier as $APPLCSF/$APPLOUT/{REPORTNAME}_{REQUEST_ID}_{COUNT}.PDF
    See this post:
    http://garethroberts.blogspot.com/2008/07/where-do-i-get-xml-file-or-request.html
    If you want to get the file in PL/SQL there are ways to do that also.
    Regards,
    Gareth

  • How to Save JSP output

    Hi all,
    I am new to JSP and I am developing simple application in NetBeans. I got the proper output of the application now I want a button or a link, either would be fine, to save my output in local machine in MS word document or in pdf. So any hint how to archive this using JSP or servlet. Please help me out in this situation. Thanks in advanced.

    Uh, just in the classpath :) Netbeans call it the build path. But you know, in a standard webapplication structure, the WEB-INF/lib folder, which is by default covered by the webapp's classpath, is the place for 3rd party webapp related JAR files.
    To hook on evnafets' reply, yes, once you have got the InputStream containing the JSP content, you've the freedom to do anything with it. Parsing into a HTML DOM tree to extract the data from it, converting HTML to PDF using for example iText, generating MS Word document using for example Apache POI.

  • How to save the output of a concurrent proram automatically

    Hi Friends,
    We have a requirement to save the output of a concurrent program to a specific folder for a reporting purpose. whenever we run that concurrent program it should save the out file in the network folder \\out_files\con_prg like that
    instead of storing it in its default folder in unix.(or I should recoganize which out file is for my concurrent program from the default folder and to move it to windows shared network folder). If it is one time , I can do it manually. But I need to schedule that concurrent program to run every day and transfer the output to the windows folder.
    Our system is Oracle Apps 11i , Data base 9i in Solaris.
    If you have any idea or sugesstion for this , please share it with me here.
    Thanks in advance,
    Vimal...

    Hi
    Thanks for the reply. I can get the name from the fnd_concurrent_requests table, But how can I identify which is the one submitted by me. Because there is possibility of multiple submission by the users with different parameters.
    I can give you more details.
    We are having a BI report (not oracle) for AR Aging Report details. It has a staging table to get the data from Oracle EBS.
    My job is to run Our Customized AR Aging Report with 2 different parameters like sysdate and the same date for last month.
    Get the output file and processs it (for this we are using VB Script) to populate the staging table from where the BI report get the data.
    So far I am doing this manually for more than a month.
    The Users wants to have all the above mentioned process to be combined as a single concurrent program , so that they can submit easily and populate the data any time of the day like other Oracle Standard reports.
    The BI report can be viewed any time of the day by more than 15 users and also AR Aging report can be run so many times in a day by another set of users.
    In this situation how can I get the exact output file of the request submitted by me.
    Thanks,
    Vimal...

  • How to save the output of report program??

    Hello Everbody,
    I want to save the output of a report program(i.e list),how can i do this???which function module should i use to achieve this???
    Thanx in advance.

    <b>data: list like abaplist occurs 0 with header line.
    data: begin of listout occurs 0,   
      line(1024) type c,   
      end of listout.
    do 100 times.
      write:/ sy-index.enddo.
    call function 'SAVE_LIST'
    EXPORTING*
    LIST_INDEX               = '0'
    tables 
      listobject    = list
    exceptions 
    list_index_invalid       = 1  
    others                   = 2          .
    call function 'LIST_TO_ASCI'    
    tables         
    listobject         = list    
    listasci           = listout 
       exceptions      
       empty_list         = 1    
       list_index_invalid = 2    
        others             = 3.
    call function 'GUI_DOWNLOAD' 
       exporting   
          filename = 'C:\Test.txt'  
      tables    
         data_tab = listout.</b>

Maybe you are looking for