SAP to cXML

Hi
Could someone please help me in coding a report program where the output should be in cXML?

Hi use this :
CALL TRANSFORMATION id
SOURCE my_data = ls_xml_struct
RESULT XML lt_my_xml_tab.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\rre.XML'
FILETYPE = 'ASC'
tables
data_tab = lt_my_xml_tab
Or Use the following code :
tables : mara.
select-options : s_matnr for mara-matnr.
parameters : p_file1 type rlgrap-filename.
data : begin of itab occurs 0,
matnr LIKE mara-matnr,
maktx LIKE makt-maktx,
end of itab, xml_out type string,xmltab type swbhtmltable.
select * from makt into corresponding fields of table itab where matnr in s_matnr
and spras = 'EN'.
call transformation ('ID')
source tab = itab[]
result xml xml_out.
call function 'SWA_STRING_TO_TABLE'
exporting
character_string = xml_out
importing
character_table = xmltab.
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function 'GUI_DOWNLOAD'
exporting
filetype = 'BIN'
filename = 'D:\xx.xml'
tables
data_tab = xmltab.
Reward If Found Helpful.

Similar Messages

  • IDoc to cXML using built-in SAP XSLT Processor

    Hi ABAP experts,
    i have a requirement to send an IDoc to an external system, the external system expecting it to be in cXML standard - without using XI/PI
    has someone of you done this before?
    I was looking at the option to utilize the built-in SAP XSLT processor (CALL TRANSFORMATION) since it supports XML to XML and ABAP to XML transformations
    so the flow would either be
    IDoc --> XSLT --> cXML  (preferred)
    IDoc --> XML (using XML port) --> XSLT --> cXML
    is this possible?
    Also, can the cXML be sent using the XML HTTP port in we21?
    Your tips suggestions would be highly appreciated

    Hello
    Have you had a look at class CL_IDOC_XML1? This class does the transformation IDoc -> XML for you.
    The next step would be to create the required XSLT transformation for the mapping IDoc-XML -> cXML.
    Regards
      Uwe

  • The PO number for cXML invoice mapped to SAP IDoc INVOIC.INVOIC01

    Hey, PI gurus,
    I mapped a cXML invoice to SAP IDoc INVOIC.INVOIC01.
    My problem was that for the multiple line items invoice, the PO number will only show up in  IDoc E1EDP02->BELNR for the first line item and will not show up for the other line items.
    In cXML message, the PO number is in InvoiceDetailOrder->InvoiceDetailOrderInfo->OrderReference->orderID.
    I changed the value in Context for @orderID and it did not help.
    Any advice?
    Thank you in advance!
    Fisher Li

    Hi,
    I understand your scenario is XML to IDOC.
    Now I assume one XML corresponds to One IDOC which corresponds to 1 Invoice.
    In your XML, I think PO Number is coming multiple times but same value. Is my understanding correct?
    If that is the case, use below mapping.
    PO Number --> Remove Context --> Colapse Context--> Target PO Number field
    This will ensure, you will get only one PO number in your IDOC.
    Else, Please provide your source XML sample.
    -Gouri

  • Does SAP EBP supports cXML?.

    Our project is to integrate SAP EBP and another procurement application through punchout. It will be helpful if anyone can let me know whether SAP EBP supports cXML in addition to OCI for catalog integration.
    Thanks,
    KrishnaKumar

    I just did a google and found this link -> http://www.newark.com/services/eprocurement/
    Extract from the same says ....
    SAP:
    Supported over 20 Newark InOne Customer EBP (enterprise buyer professional) Implementations
    Certified Open Content Network (OCN) Partner
    Part of a group of preferred and technically certified suppliers that will work smoothly with SAP e-procurement applications. This means a customer can easily download a buyer specific catalog or access via Roundtrip capabilites.
    OCI Roundtrip certified
        <b>* cXML, xCBL, email, EDI and Fax transactions supported</b>
    Maybe others can throw more light on this ....
    ~ShaBZ~

  • CXML with SAP PI

    Hello,
    We need to use cXML for our project. Based on the thread ( [Error while uploading CXML data definition.; )
    the following steps need to be done with the cXML DTD.
    1.First Delete the Multiple Declaration of "Method .ANY"
    2.replace all "ds:" character with 'ds_'
    3.replace all "xades: " with 'xades_'
    4.replace all "xmlns" with 'attr_'
    5) After this use Altova to convert the DTD to XSD.
    First of all, we could not carry out the 4th point, as in that case Altova says that it is invalid, and it fails to get imported in PI as well.
    Without step 4 , if we import it as external definition, then there are certain attributes with type xml:lang coming in Red.
    Can anybody tell us on how to fix this.
    Thanks,
    Himadri
    Edited by: Himadri Chakraborty on May 5, 2011 5:49 PM

    Hi Himadri,
    Actually I faced the same issue with below point:
    Himadri Chakraborty wrote:
    4.replace all "xmlns" with 'attr_'
    Correct step should be:
         4.replace all "xmlns:" with 'attr_'
    Then it will work as expected, it was just a typing mistake I assume.
    Best Regards,
    Piotr Radzki

  • Integrate with a vendor from SAP ECC 6.0 for 'PunchOut'  functionality

    Hi Friends,
    Pardon me if I have made mistakes in using the terminology in my posting. We just use SAP ECC 6.0 and no SRM. We want to integrate with a vendor for so-called Punchout. Our users will click  a URL link from our Intranet and it takes them to Vendor's catalog website. They can choose items and create a shopping cart. The website will return us a unique Shopping Cart ID with list of Items in cxml format. We can use that information and create PO. We are not familiar with cxml format and how to process the PO. Is this a standard functionality in SRM ? I don't think we can install SRM since we don't have Business suite license. If any one has experience with above scenario, ie connecting to vendor's cataglog from SAP ECC 6.00 without SRM, can you pl share with us ?
    Niranjan

    Hi Masa
    Thanks for the reply. The vendor supports OCI as well. However, since I was not familiar with it, I was thinking to go with cXML. When I opened the OCI pdf in the URL that you mentioned, it talks about SRM server. Like I had mentioned earlier, we don't use SRM at our company here. Can you let me know in couple of steps how OCI works and how fast we can implement in our ERP ECC 6.0 environment ? I am delighted to note that one of the companies in Japan implemented in 4 hours.
    Thanks for your help,
    Niranjan

  • Message Mapping with cXML

    I have a message mapping scenario. I am trying to test something and for this I have the following Getpending Response as source and Target in message mapping.
    When I try to test this in the Repository I am getting some error(listed below)
    Note : I imported the below cXML into my respository in the external definition as an XSD(I used Altova XML spy to convert the XML into an XSD)
    In the occurence I have given both source and target as 1.
    Your assistance is greatly appreciated. Thanks  lot.
    Getpending Response cXML
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
    <cXML timestamp="2005-01-12T16:00:18-08:00" payloadID="[email protected]">
       <Response>
          <Status code="200" text="OK"/>
          <GetPendingResponse>
             <cXML timestamp="2005-01-12T16:00:18-08:00"
                   payloadID="[email protected]">
                <Header>
                   <From>
                      <Credential domain="NetworkId">
                         <Identity>AN01000000001</Identity>
                      </Credential>
                   </From>
                   <To>
                      <Credential domain="NetworkId">
                         <Identity>AN13000000259</Identity>
                      </Credential>
                   </To>
                   <Sender>
                      <Credential domain="NetworkId">
                         <Identity>AN01000000001</Identity>
                      </Credential>
                      <UserAgent>ANCXMLDispatcher</UserAgent>
                   </Sender>
                </Header>
                <Message>
                   <DataAvailableMessage>
                      <InternalID domain="PendingMessages">3738</InternalID>
                   </DataAvailableMessage>
                </Message>
             </cXML>
          </GetPendingResponse>
       </Response>
    </cXML>
    I am getting the following error
    Start of test
    Compilation of GetPendingResponse_DataREquest_MM successful
    Document start
    Failed to load resource from the context classloader of the current thread! Loading from classloader was caused by: java.net.ConnectException: Connection timed out (errno:238) com.sap.aii.utilxi.misc.api.BaseRuntimeException: Failed to load resource from the context classloader of the current thread! Loading from classloader was caused by: java.net.ConnectException: Connection timed out (errno:238) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:130) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:68) Root Cause: java.io.IOException: Failed to load resource from the context classloader of the current thread! Loading from classloader was caused by: java.net.ConnectException: Connection timed out (errno:238) at com.sap.engine.lib.xml.parser.URLLoaderBase.resolveEntity(URLLoaderBase.java:148) at com.sap.engine.lib.xml.parser.XMLParser.scanDTD(XMLParser.java:1212) at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2678) at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2713) at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:162) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:132) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:142) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:245) at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:276) at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:338) at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:128) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:68) Failed to load resource from the context classloader of the current thread! Loading from classloader was caused by: java.net.ConnectException: Connection timed out (errno:238)
    End of test

    Hi Jenni,
    This might help
    Message Mapping - same structure
    /people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp
    http://www.cxml.org/files/downloads.cfm
    Thanks & Regards
    Agasthuri Doss
    Message was edited by: Agasthuri Doss Baladandapani

  • How to add dtd tag into cXML xsd

    HI All,
    I have a requirement in which I have to use cXML and as all of you know that we cannot directly import the cXML.dtd into SAP so I have converted the dtd into xsd.
    User is sending the data in this format.
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'no'?>
    <!-- Oracle eXtensible Markup Language Gateway Server  -->
    <!DOCTYPE cXML SYSTEM "cXML.dtd">
    <cXML version="1.2.007" payloadID="2010-11-09-12-07-21.60004397:0:4724.249819289270901871044542787156965720568@" timestamp="2010-11-09T12:07:21+01:00" xml:lang="en">
    As you can see they are sending <!DOCTYPE cXML SYSTEM "cXML.dtd"> in the xml and because of this PI is unable to process the message and generate the following error.
    <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_mm_cXML_Order_to_IDOC_ORDERS02_SGS_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Failed to load resource from the context classloader of the current thread! Loading from classloade~</SAP:Stack>
    Can any body please tell me how to resolve this issue.
    Thanks,
    Iqbal

    Please check this link
    XML issue
    Error log on http request from business connector (BC)

  • IS it possible to Format the data to CXML format in Java ?

    Hi all,
    I am new to Java programming. I am an SAP ABAP Developer and in my SAP CRM E-Commerce Web Shop coding, I have to do coding in Java.
    My current requirement is that I have some set of data and I have to format this data to CXML format in Java. IS this possible?
    Can I format the data to CXML format in Java? Are there standard API's to do this? Please let me know how should I procced with the coding?
    Apart from formatting the output to CXML format, I have to also post this data to an external market place...How can I do this?
    Please help me with relevant information. your help will be highly appreciated.
    Regards,
    Jessica Sam

    It should be possible to format the data, yes. If there's a "standard API" it should be one that comes out of that SAP CRM thing, so look there.
    As for "posting to an external marketplace", that's far too vague a concept to be able to answer. You should start by getting the specs about "how to post" from that marketplace.

  • SRM/XI Scenario - How to send cXML Response?

    I'm looking for someone out there that has experience configuring XI to send out cXML Purchase Orders via HTTP created in SRM to Trading Partners and also to receive cXML Invoices via HTTP for these Purchase Orders into XI.
    My questions are: How do you configure XI to receive and process the cXML responses that are sent back from the Trading Partners when they receive a Purchase Order? I know this needs to be a synchronous transaction through the same HTTP tunnel that the Purchase Order was sent through. Is it something that needs to be configured using BPM? Same thing for Invoices. What do I need to do in XI to send out a cXML response to the Trading Partner when I receive an invoice? Again, is BPM needed for this?

    Hi Dave,
    As far as I could see from our testing, SRM standard business content uses proxies to submit/receive the messages with XI. Unfortunately, the standard ones seem top be asynchroneous.
    I believe the easiest for you would be to copy and change the standard message interfaces into synchroneous interfaces. I'm pretty sure you can call your own proxy in an exit to replace the standard call but the question is : what will you do with the response ? I'm unsure if you can 'transfer the response into something usefull on the SRM side ( something like a PPF status of the output message ) .
    On XI, you can map the SRM proxy onto a synchroneous HTTP interface to send/receive with the partner ( and map into cXML ) : in this case you don't need BPM.
    More or less the same story for the invoices : you would need to copy to a sync interface and pass the response from the standard SRM processing for the inbound invoice as a response to the proxy. On XI you can map it into a http response.
    But do you think you will get 'business responses' into the http responses ? If you keep async on srm side and sync ( by defintion for http )  on partner side, an http 500 would result in an error in the interface and should be picked up by XI monitoring. Maybe there is a reason why SAP provides async proxies.
    Hope it helps
    Dirk

  • Error While Exporting cXML DTD

    Hi,
    I have downloaded latest version of cXML DTD and when I upload it to ESR throgh External Definitions with the option 'From the First ELEMENT', I get the folloing errors:
    "Error when parsing DTD document com.sap.aii.utilxi.dtd.api.DtdException: Entity "Method.ANY"  already declared".
    But when I validate this DTD with other XML tools, i found no errors.
    I am struck here... Can any one Help on this ??
    Regards,
    Sreedhar

    See if this helps
    /people/gabrielsagayaselvam.panneerselvam/blog/2009/02/27/handling-message-options-for-dtd-files-in-external-definition
    Regards,
    Prateek

  • CXML PO posting as IDocs

    Hi Gurus     ,
    I am having to work on a scenario where I need to pick  purchase orders coming as cXML files and post as idocs in sap.
    Do i need conversion agent at all for this? Since the files come with .xml extension?
    The other requirement is,  i should be able to pick these cxml files (for batched POs) by https get pooling.(similar to how file adpter pools for a file every one minute or as we set the pooling time)
    I have searched the sdn forum enough and havn't found clear answers anywhere...so any good pointers are very much appreciated and will be rewarded.
    thanks very much
    kind regards
    Jhansi.

    Hi,
    You dont need conversion agent if files are in xml format.
    HTTP get is not supported till PI 7.1 however it will be available with 7.3.
    Check this link for Java HTTP adapter:
    [http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4096a6b3-3dc3-2d10-bf87-f63d5340a916?quicklink=index&overridelayout=true]
    Regards,
    Beena.

  • CXML adapter for Business Connector 4.6

    Hello, does anybody know where we can buy a cXML adapter for the SAP Business Connector 4.6? I have to accept incoming orders (cXML) and map it to SAP-XML. Further I have to map outgoing INVOICE from SAP-XML to cXML.

    Hi,
    did you find any solution? Now I have to do the same - converting outgoing xml-files to cxml. Do we need a converter, or is it possible to customize our Business Connector?

  • Xslt transformation using SAP BC 47

    Hi,
    I'm trying to do a transformation using the sap transformation package in the SAP BC ( rel 47 )
    I'm transforming an IDOC into a cXML order for example...
    The transformed xml contains some rather odd characters...
    Even a very simple xslt has these odd characters...
    directly after the DOCTYPE
    I'm using MapForce to create the xslt..
    Has anyone else experienced these issues?
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE cXML SYSTEM "....."[
      ]>
    <cXML payloadID="2005081645000002780916170000000000004039" timestamp="2005-08-16T09:16:17+0.00">
      <Header>
        <From>

    Hi,
    according to:
    >
    Michal_Krawczyk_PIXI wrote:
    > as per:
    > http://help.sap.com/saphelp_470/helpdata/EN/84/2e4d3ce624b800e10000000a114084/frameset.htm
    > "The href attribute no longer applies in this case."
    it appears the include element only works with the repository.... I tried
    <xsl:include sap:name="<Name_of_the_Transformation_in_Repository>"/>
    and it works.
    However this would mean, all includes i have to make have to be imported to the repository. If that's really the case, it'll be a huge problem, because the xsl-files i want to include are outside of my reference
    Regards, Lukas

  • BPM: cXML Response Scenario

    I currently have an XI process in place that receives cXML Invoices from suppliers via HTTP into XI where they are mapped into IDOC format and sent to R/3.
    The suppliers are requesting that I send a cXML response back to them after receiving an invoice. I assume I need
    to use BPM to achieve this but do not have experience using it (other than in a XI class).
    Can someone please walk me through the steps I need in BPM to accomplish this?

    Hi,
    Scenerio : HTTP -> XI ->  RFC  ->XI ->HTTP
       Yes, BPM  is a Better Option,
    XI - > RFC  make a Synchronous  call with help of BPM
    ( so that it will wait for the response since Synchronous call which is needed for your Scenerio)  
    This might help you
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    http://help.sap.com/saphelp_nw04/helpdata/en/11/13283fd0ca8443e10000000a114084/content.htm    
    BPM: Multiple synchronous receivers
    Synchronous - Synchronous BPM
    Synchronous BPM start
    Regards
    Agasthuri Doss

Maybe you are looking for

  • Error message when trying to install Skype on E72-...

    Trying to Re-install Skype on my Nokia E72-1. After doing a Hardware reset It disappeared from my Apps. Now get the following message on Nokia Suite when I try to install it via PC using Nokia Suite. "Could not install this file" "There was a problem

  • Summary report from summary page

    I have a report for empolyees consist of 50 pages and every page has some data about emplolyee like attend days, basic salary ans etc the the footer of each page has a summary of page like total days of attend empolyee I need to reprint all footer of

  • Saving playlist made in windows to print in jpeg or PDF format

    In mac os x when printing CD playlist, one has the option to save as PDF file for later use. How can one save a playlist made in windows as a PDF and or jpeg file?

  • IS THIS POSSIBLE IN FLEX.

    Hi , TILL NOW ANY BODY HAS RUN APPLICATION ( calling flex application in url) WHICH INVOKES A SERVLET PERFORMS REQUEST/RESPONCE . IF YES PLEASE SOLVE MY CODE. ELSE PLEASE HELP ME WITH A SAMPLE CODE/Example. currently i have a login.jsp in which i am

  • An app everyone should look out for

    Hello apple users, Today I am here to warn you all for one of the many app's that scam you, this one is named "panorama backgrounds & parallax wallpapers & dynamic livepapers for ios 7, whatsapp, hangouts, viber" Like the name and description promise