BAPI to XML

Hi all,
Could someone help me to generate the BAPI into a XML structure. I could do it with Idoc's using transaction we60 where i can convert the documentation into an XML structure. I would like to do the same thing for the BAPI.ls it possible.
Thanks in advance
Pari.

You can convert tables or structures in XML.
You have the classes, examples, etc in package SIXML.
With transaction strans you can create the transformations to do it

Similar Messages

  • Reading Structured XML the Repeater gives an error

    Hi I have seen some good answers on this forum and I am looking for some assistance please.
    I have read in xml documents fine from a iDoc Listener and now I want to update the Production orders with a BAPI. the xml that I get from the Production system is in a well structured format. Then the repeater gives an error the xpath expression is now "<b><u>XmlLoader_0.XmlContent{/xml/rs:data/z:row}</u></b>" and not the normal <b>XmlLoader_0.XmlContent{/Rowsets/Rowset/Row}</b>.
    I am sure that I will sort the reading of it once I get the repeater to read the document for me.
    Thanks
    Cheers,
    Dave

    Dave,
    Glad to see you were able to sort things out.  The Rowsets/Rowset/Row xml format is the standard xMII internal format that you will see when working with any of the Query action block outputs, the Document building actions, and any of the XML convenience blocks like CalculatedColumns, etc.
    Since the iDOC file came through the external listener, the xml format will not be in this format, just like when seeing the Request/Response xml schemas when working with JCO calls to BAPI's on your R/3 system, webservice calls, etc.
    Regards,
    Jeremy

  • Userexit in BAPI sales order creation

    HI all,
      My requirement is one SERIALNUMBER field add BAPI salesorder creation.
    That field not existed in satndard BAPI structures.BAPI input XML file.
    Salesorder>extras(menu)>Technical object->serialmumber[RIPW0SERNR).
    please give any enhancement serial number  BAPI sales order creation.
    Thanks.
    Edited by: sreddy GPs on Sep 23, 2008 5:59 AM

    Hello,
             Whatever the Structure that you are refering to in the BAPI for Sales Order Creation, use an Append Structure to add the SERIALNUMBER field to the existing Standard BAPI Structure.
    For your information, the following are the BAPIs that can be used for Sales Order Creation.
    BAPI_SALESORDER_CREATEFROMDAT1
    BAPI_SALESORDER_CREATEFROMDAT2
    BAPI_SALESORDER_CREATEFROMDATA
    BAPI_SALESORDER_CREATEBOS
    Hope it would serve your purpose.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • How to Raise alert in XI when a new file reaches application server

    Hey guys
    i have a requirement in which i need to trigger a piece of  ABAP code whenever a new file reaches a specific directory of Application server.
    i m using File adapter on receiver side and i want to raise a trigger so that the ABAP code is executed automatically whenever some new file reaches the directory
    we are running Win server
    thanx
    ahmad
    Message was edited by:
            Ahmad

    HI,
    It is possible to write a ABAP program to raise alert.and schedule it , In ABAP program we can check the file is existed or not in a specified folder if existes then we can raise Alert.Actually Alerts are maintained by SAP Alert Management only.
    So , but not clear , you said you are using the File receiver adapter .
    -- onoption is -this can bepossible with OS command .
    -- also we can raise alert from Payload itself , why becz i understand whenever you are going to write a file with file adapter then you need to raise an alert right?
    so if message is existed i mean data existed then from raise alert and store the file onoption
    -- Also you can try calling an ABAP program as the auto-reaction method of the MTE in CCMS
    Regards
    Chilla
    See the below links
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/434fa590-0201-0010-1e9a-c27e6283a0fe
    SMS through SAP ABAP program
    XI Alert from BPM with Follow-Up Activity
    ABAP programming BAPI To XML
    How to send qRFC Alert to Internet Email from AP0 3.1 running 4.6D BASIS
    /people/gregor.wolf3/blog/2005/03/05/create-users-in-an-abap-system-with-bapi-ostermiler-java-utilities

  • About status of  sxmb_moni

    HI
    Expert's
    my senario is BAPI -XI - XML
    When i am checking my messages in sxmb_moni  ,the status of flag is "logversion"
    what is type of error
    Regards
    upendra.v

    Error inthe sender RFC
    What is new in this thread that was not mentioned in your previous thread?
    Regards
    Bhavesh

  • ESA in MySAP ERP

    Can anyone tell me where I can find the Enterprise Services provided in Mysap ERP 2004 and 2005.
    We are considering an upgrade and the provision of Enterprise service would help the buiness case. TIA

    You can use all function groups, remote functions, BAPI and XML messages about 10,000 to 20,000 as Web Services providers. There are wizards, which create Web Services in very short time.
    NW WSA has about 300-500 WS in MySAP and R/3. All documentation is at help.sap.com websites.
    You can prepare and structure your company for ESA pilot project and later to deploy ESA to all your company business areas and business processes by using SAP Solution Composer.
    In this way you can significantly improve your company result - may be 30% ?

  • Create a Purchase order using the BAPI using the data in the XML file.

    Hello Gurus,
    here is the scenario can anyone help me how to proceed explaining the procedure?
    Create a Purchase order using the BAPI using the data in the XML file.
    comprehensive explanations are appreciated.
    thanks in advance.

    hi,
      first use fm "bapi_po_create".
      then use fm "BAPI_ACC_GL_POSTING_POST"
    The demo environment was made with real business scenario in mind, but following subjects need to be addressed in a live implementation:
    •     No exceptions and error handling is implemented, except the order rejection (e.g. partly delivery);
    •     In Navision both XML Ports and the XML DOM has been used to integrate with SAP XI, because XML ports has some drawbacks regarding to Namespaces in XML Documents (mandatory in SAP XI);
    •     A minimum of SAP and Navision customization is required to implement this solution. (e.g. user exit in SAP, Navision XML DOM).

  • 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.
    Thanks

    Hi,
    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

  • Methods in bapi used to convert data into XML

    Methods in bapi used to convert data into XML,
    how to implement those also,
    points will be rewarded
    Thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Hi
    Check this
    http://www.sap-img.com/abap/sample-xml-source-code-for-sap.htm
    https://forums.sdn.sap.com/click.jspa?searchID=2889167&messageID=3406594
    Reward points for useful Answers
    Regards
    Anji

  • Step by step bapi to convert SAP to XML please its urgent

    step by step bapi to convert SAP to XML please its urgent
    full points if with full example and coding in ABAP,
    Thank you,
    Regards,
    Jagrut Shukla

    yes i want to convert Catsdb table into xml format and safely in server, i.e secured  place

  • Is it possible to compose XML in BPM from responses of multiple BAPI calls?

    Hi guys!
    I want to send into BPM an XML document, which will be parsed and it will call some BAPIs more times. And I need to get response. Is it possible, to compose an XML document from these BAPI return codes to be sent back as response? Concretely I will use SOAP->XI->SAP and response SAP->XI->SOAP...  I will use it as asynchronous call..
    Thanx, Peter
    Message was edited by: Peter Jarsunek

    Hi Peter,
    It depends:
    - what kind of bapi is it? (does it have some sort of number?) like delivery number or something else?
    if not you'll have to add something
    so you can correlate your bapi with bapi response
    if you want to know which response corresponds to which bapi call
    but you can do it with a bapi wrapper
    >>>>Is it possible, to compose an XML document from these BAPI return codes to be sent back as response?
    you you can collect message in a BPM - standard pattern
    (but remember about the "correlation")
    Regards,
    michal

  • How to map data in xml format to BAPIs tructures?

    A webservice call to an external system from XI, is returning data to XI in xml format.
    This needs to be formatted to map to the structure of BAPI from SAP.
    I searched and found several threads pointing to do transformations.
    But I am not sure where to start. So this thread is being posted.
    Please help.
    Thanks,
    Ven

    The thing is my data is being retrieved from webservice call a bit different.
    here is the sample data that I need to map to two structures of BAPI - Housinginfo, Houseresponsersults.
      <?xml version="1.0" encoding="utf-8" ?>
    - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <soap:Body>
    - <GetResidentsResponse xmlns="http://empur.org/XLSWebSvc/XLS_Interface">
    - <GetResidentsResult>
    - <Residents xmlns="">
    - <Resident LastName="Xyz" FirstName="Abced" MiddleInitial="T" STX="1234567" Houseid="45622" SubDivName="xyz homes">
    - <Houses HousesName="villa ben" HousesId="1550" HousesStatus="P" HousesStatusDate="09/22/2009 15:26:54" HousesScore="90">
      <Street StreetCode="2538" StreetName="Victoria" StreetStatus="c" StreetStatusDate="09/22/2009 12:25:38" />
    - <Street StreetCode="2539" StreetName="Vicotria Ln" StreetStatus="p" StreetStatusDate="09/22/2009 15:26:54" StreetScore="90" ProctorID="3572" OwnerName="DONNA Perl">
      <HomeInteractions HomeNum="25873" ResidentResp="C" LayoutLawn="C" Judged="c" />
      <HomeInteractions HomeNum="25884" ResidentResp="B" LayoutLawn="B" Judged="c" />
      <HomeInteractions HomeNum="25896" ResidentResp="B" LayoutLawn="B" Judged="c" />
      <HomeInteractions HomeNum="25918" ResidentResp="D" LayoutLawn="D" Judged="c" />
      <HomeInteractions HomeNum="25919" ResidentResp="D" LayoutLawn="D" Judged="c" />
      <HomeInteractions HomeNum="25924" ResidentResp="A" LayoutLawn="A" Judged="c" />
      <HomeInteractions HomeNum="25948" ResidentResp="t" LayoutLawn="t" Judged="c" />
      <HomeInteractions HomeNum="25952" ResidentResp="C" LayoutLawn="A" Judged="w" />
      <HomeInteractions HomeNum="25953" ResidentResp="C" LayoutLawn="C" Judged="c" />
      <HomeInteractions HomeNum="25954" ResidentResp="D" LayoutLawn="D" Judged="c" />
      </Street>
      </Houses>
      </Resident>
      </Residents>
      </GetResidentsResult>
      </GetResidentsResponse>
      </soap:Body>
      </soap:Envelope>

  • ABAP program for BAPI and convert DB into XML

    ABAP program for BAPI and convert DB into XML
    Thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Refer the link -
    give an example of bapi coding?
    how can we transfer huge amount of data from database server to xml format
    Regards,
    Amit
    Reward all helpful replies.

  • URGENT--Converting the BAPI return structure to XML

    Hi,
    I need to convert the return structure(export parameter) from a BAPI call to XML but not able to make out how to do that.
    Before this I was required to convert the BAPI return table(export table) to XML and I did that by first converting it to the AdoDataTable, added it to a dataset and then used the builtin function to return the dataset in XML format. But here I am not able to make out how can I do the same with the Export structure.
    Any help would be appreciated.
    You may also mail on [email protected]
    regards,
    Ankit Bhansali

    If the XML schema that you find as Xml attributes on the fields of the structure is good for you, you can just use the XML serializer to serialize it out:
    XmlSerializer ser = new XmlSerializer(typeof(BRFCKNA1));
    ser.Serialize(...);

Maybe you are looking for