Receive XML file from CIDX adapter and Post to SAP as IDoc using XI

I have scenario where we will receive the xml file from CIDX adapter. I need to take the xml from CIDX, do the Database Lookup and post it to SAP as IDoc.
Any technical documentaion or step-by-step process documents can be very helpfull to me, since I am new to XI
Thanks
SP

Lookup in XI is used to call the target data storage system and get data from there to your mapping programme.
In XI you can do Lookup in Message Mapping, Java Mapping and in XSLT Mapping. Previously Lookup in XI was system dependent. But now what ever the system are i.e. SAP system or non-sap system(Oracle,MS SQL etc) lookup API are same.
Overview of Lookup
- Lookups are used to identify/request the data from mapping program.
- It interrupt the process and looking for data which was stored in target system.
- It get that data and comeback to process and continue with that data.
Types of Lookups in XI
- JDBC Lookup: JDBC lookup is used for accessing data from database (non SAP).
- RFC Lookup: RFC lookup is used for accessing the SAP Data.
- SOAP Lookup: SOAP lookup is used for accessing data from Webservice
Steps to perform Lookup in Mapping
Import package com.sap.aii.mapping.lookup.*;
Create connection to the target Database system.
// Determine communication channel created in ID
Channel channel = null;
channel = LookupService.getChannel("DB-SYSTEM-NAME","DB-CHANNEL-NAME");
// Get system accessor for the channel.
DataBaseAccessor accessor = null;
accessor = LookupService.getDataBaseAccessor(channel);
Build the Query String.
Getting Result
// Execute Query and get the values.
DataBaseResult resultSet = null;
resultSet = accessor.execute(Query);

Similar Messages

  • How send and receive XML file from PI 7.0 via SSL

    Hello experts,
    Can you point to some documentation , examples , links where I can get some information on how to send and receive XML files using PI 7.0 via SSL ?
    Thanks in advance.

    Hi,
      refer to the following links.
    Enabling SSL
    http://help.sap.com/saphelp_nwpi71/helpdata/en/14/ef2940cbf2195de10000000a1550b0/content.htm
    Adapter specific security
    http://help.sap.com/saphelp_nwpi71/helpdata/en/f5/799add57aeee4f889265094a04695c/frameset.htm
    regards,
         MIlan Thaker.

  • Receiving xml file from B2B - assign the data to a variable

    Hi,
    I am receiving an xml file from B2B and assigning the file content to a variable.
    I have a B2B adapter - mediator - bpel process. In the bpel process I am assigning the inputVariable to a userdefinedvarible.
    But I am not getting the value correctly. Only the root tag of the xml is shown as the value for the userdefinedvarible.
    In the composite audit level,
    <process>
    <scope name=main>
    receiveInputreceiveInput
    Sep 17, 2010 9:31:10 AM Received "inputVariable" call from partner "processorder_client"Received "inputVariable" call from partner "processorder_client"
    View XML Document (******* the xml doc shows the complete xml********)
    Assign_1Assign_1
    Sep 17, 2010 9:31:10 AM Updated variable "Order"Updated variable "Order"
    <payload>
    <Order>
    <orders/> (******* the variable shows only the root element********)
    </Order>
    Sep 17, 2010 9:31:10 AM Completed assignCompleted assign
    Sep 17, 2010 9:31:10 AM BPEL process instance "40004" completedBPEL process instance "40004" completed
    I have connected the mediator interface to bpel interface and did not do any other special config? Is that ok?
    Can anyone please tell me the procedure to assign the xml file content from a b2b message to a bpel variable Or direct me to any samples on this?
    I dont understand if the prob is in mediator or assigning? I do see the inputvariable having the complete xml...!!
    Thanks in advance.
    Ganesh

    Hi Ganesh,
    Might be problem with the parts.
    receiveInputreceiveInput
    Sep 17, 2010 9:31:10 AM Received "inputVariable" call from partner "processorder_client"Received "inputVariable" call from partner "processorder_client"
    View XML Document (******* the xml doc shows the complete xml********)Check the part in the xml and part you defined for inputvariable.
    Regards
    PavanKumar.M

  • How to read a XML file from BLOB column and insert in a table - PL/SQL Only

    Hi,
    To make data load more simple to end user instead placing file on the server and use SQL-LOADER, I came up with new idea that using oracle ebusiness suite attachment functionality. that loads a XML file from local PC to a database column(table is fnd_attachments, default data type is BLOB over here).
    I tried with DBMS_LOB and didnt get around.
    Please can anyone tell me how to read the BLOB column using PL/SQL and store the data in a oracle table. Here's the sample XML file and table structure FYI.
    <?xml version="1.0" encoding="UTF-8"?>
    <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Corporate_alloc.xsd" generated="2009-07-07T14:17:49">
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080543758</DET_CODE>
    <DET_NAME>Waves, Tides and Shallow-Water Processes</DET_NAME>
    <ALLOCATION_RATIO>0.000041</ALLOCATION_RATIO>
    </Corporate_alloc>
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080534343</DET_CODE>
    <DET_NAME>Hydrostatically Loaded Structures</DET_NAME>
    <ALLOCATION_RATIO>0.000127</ALLOCATION_RATIO>
    </Corporate_alloc>
    </dataroot>
    CREATE TABLE TEST_XML
    ( PKG_CODE VARCHAR2(50),
    PKG_NAME VARCHAR2(100),
    DET_CODE VARCHAR2(20),
    DET_NAME VARCHAR2(500),
    ALLOCATION_RATIO NUMBER )
    Thanks
    EBV

    In regards to #3, use the COLUMNS functionality of XMLTable instead of using Extract. Two simple examples are
    Re: XML Data - Caliculate fields
    Re: Extractvalue function not recognised

  • 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,
    Atanu

    Hi 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

  • Finding and retrieving an XML file from an application and an applet

    I have a problem.
    I have data stored in an XML file. I want to be able to call that file and store it into a document object from an application standing alone on a computer as weel as from an applet that would be running over the web.
    I don't know how to do this.
    When I use a relative path name for the application it attaches the path of the folder that contains java.exe. I could do something with the class path but this wouldn't help the end user of the application on a different computer. For similar reasons I don't want to hard code because I don't know where the final applet will be stored.
    I have a table that holds, sorts and filters the data so I want the table to collect the data, I don't want to dictate the path from the applet or the application, I want a method that is consistant with both scenarios.
    Can anyone offer some advice?

    I've just finished trying it out, here is what I did:
    String xmlDocName="filename.xml";
    java.net.URL fileURL=this.getClass().getResource(xmlDocName);
    private final String fileName = fileURL.toString().substring(6);
    The substring removes the "file:/" from the URL.
    This works fine in the IDE, I have even stored the xml file in a lower folder e.g. package_folder/xml_folder/filename.xml and replaced the xmlDocName with "xml_folder/filename.xml" and it worked fine.
    I haven't tried it in an applet because I'm running IE and as you are well aware there are problems with swing and IE applets. But you answer deserves the Duke Dollars, thank you very much.

  • Create XML file from internal table and vise a versa

    Hi Friends,
    I have requirement to create an XML string from internal table data and also read XML string data to internal table.
    Can anybody tell are there any Function Modules or methods existing for this?
    Thanks.
    Krishna Yerram.

    1. Write XSLT program. T.code XSLT . e.g. XSLT name "ZTRANS".
    2. Write ABAP program
    Which includes declaration of internal tables
    that you need "IT_DATA".
    Upload XML data to an internal table "IT_XML "
    use below statement to convert XML to internal table.
    Call transformation ZTRANS
    source XML IT_XML
    result IT_DATA.

  • Sending xml file from client to servlet

    Hi,
    I am writing the server component of an applcation, such that it will receive xml files from the clients(standalone application similar to javaSwing stuff but it's coded in C#), and the servlet will have to extract the data from the xml file and update the mySql database. it will also fulfill the client's request for xmlFiles (and extract data from DB, format to xml file and send back to client)
    I'm new to implementing the servlet receiving files from clients so would need some help.
    I've got 3 questions to ask:
    1) How does the servlet receive/returns the xml file from the client as a series of httpPost request/response. Do i send a File or the file's contents as a String to/from the client?
    2) Is it also a must to use socket for the file transfers? I have read in other posts about sockets as well as HttpURLConnection but i don't quite understand.
    3) When I send a file back to the client(client is standalone application written in C# whereas server is coded in java), what do i specify for the HttpResponse.setContentType() in my servlet? (i'm returning the xml file to client)
    Would really appreciate for any help rendered. If you have any useful links, would appreciate them too. Thanks a lot.
    Karen

    I've got 3 questions to ask:
    1) How does the servlet receive/returns the xml file
    from the client as a series of httpPost
    request/response. Do i send a File or the file's
    contents as a String to/from the client?The server will listen on some port for requests. The client has to open a socket to this server to send the file as string to the server.
    see http://java.sun.com/docs/books/tutorial/networking/index.html
    >
    2) Is it also a must to use socket for the file
    transfers? I have read in other posts about sockets as
    well as HttpURLConnection but i don't quite
    understand.You use HttpURLConnection to make a request using the http protocol, instead of opening a socket and then writing the html headers yourself.
    3) When I send a file back to the client(client is
    standalone application written in C# whereas server is
    coded in java), what do i specify for the
    HttpResponse.setContentType() in my servlet? (i'm
    returning the xml file to client)Its up to your receiving program how to interpret this though, so you probably dont need this.

  • Creation of XML file from RFC

    Hi Experts,
    Iam getting input parameters to my RFC from JAVA.
    With that data i have to create XML file from my RFC, and i have to send that file to third party.
    Could you please tell me the total procedure.
    I know how to create RFC, i need how to create XML and how to send to third party.
    Thanks and regards,
    Kumar.

    HI,
    Follow the procedure :
    1.Get the schema by using add generated items according to particular RFC.
    2.Then  create the target schema.
    3.Create the map file and mapp both the schemas.
    After deployement follow the below steps
    1.In BizTalk administration console  create the send port to send the resulted XML to particular location.
    2.Then configure the receive port with values(pipeline=xmlreceive;clientid,userid,pwd,sap gateway host;sap gateway service to connect the sap.
    Now  start the application !
    Let me know if u still have a problem ?

  • How to receive flat file from XI to R/3 system?

    Hello guys,
    The XI will receive XML files from other source. I have to pick that XML file  and convert it in flat file so that i can receive it in R/3 with required BAPI. Guys plz tell me necessary steps need to follow to do the whole process. I dont know much about XI and from lots of tutorials i am getting confused. I have to work with both XI and SAP R/3. What to do. Plz advise me.
    Thanks in advance.
    With regards,
    Rosaline.

    Dear Abhishek,
    Thanks for your help.
    1) convert the XML content of the file into flat structure (using UDF or JAVA mapping)....map the output of the JAVA mapping to the the BAPI structure....so now you would have falt file (content) in the BAPI.
    2) create a flat file using PI and place it in some folder....now the BAPI program should pick this flat file from the folder and process accordingly....this will not require a JAVA mapping and can be done by FCC parameters of the File channel.
    These are 2 diff way or steps? Plz provide any help link.
    With regards,
    Rosaline.

  • Parsing XML files from application server

    I need to read  an XML file from the application server. This can be done using OPEN DATASET in BINARY MODE and reading into internal table of type binary data.
    But inorder to parse the document using the iXML library, i need to pass the filesize of the XML file that is read into internal table.
    Please let me know how to calculate this filesize ?

    Hi ,
    Check the FM : /SAPDMC/LSM_F4_SERVER_FILE.
    Inside this FM , subroutine below exists.The main program for routine is /SAPDMC/LLSMW_AUX_020F02.
    Call this routine from your program. You will get the length in bytes from the field len of table pt_file.
    data:
      begin of gs_file,
        directory(75) type c,              " name of directory.
                                           " (possibly truncated.)
        name(75)    type c,                " name of entry.
                                           " (possibly truncated.)
        type(10)    type c,                " type of entry: directory, file
        *len(8)      type p,                " length in bytes*
        owner(8)    type c,                " owner of the entry
        mtime(6)    type p,                " last modification date,
                                           " seconds since 1970
        mode(9)     type c,                " like "rwx-r-x--x":
                                           " protection mode
        errno(3)    type c,
        errmsg(40)  type c,
        mod_date    type d,
        mod_time(8) type c,                " hh:mm:ss
        subrc like sy-subrc,
    end of gs_file.
    DATA : pt_file LIKE TABLE OF gs_file.
    DATa : p_ok.
      PERFORM /sapdmc/llsmw_aux_020f02(directory_contents_get)
      TABLES   pt_file
                                USING    '/TMP' ""!!! Here is your filepath
                                CHANGING p_ok

  • 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
    Prathima

    Parsing 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

  • Creating an xml file from recordset

    Hi...
    XML newbie here - so.
    Is it possible to create and xml file from a recordset?
    I need to create a datafeed of our e-commerce products.
    Also, some of the db data contains HTML Code (product
    description field),
    how will this effect the xml file?
    Another problem is that my xml file needs to contain url's
    for the products
    and product images. My ASP pages contain these URL in hard
    code and then
    pull the actual file names from the db
    Hope that makes some sense
    Thanks for any help
    Andy

    Hi David
    Thanks for your help.
    I think it will have to be option 1 as i am using Access DB.
    I don't know how to go about it but will serach good old
    Google.
    Here is my recordset below, that pulls the required data from
    Access.
    The product and product image URL's need to be in the xml
    file but only the
    product image name and product id are in the database, e.g
    image name
    (imagename.jpg) productid (21)
    The actual URL's are hardcoded in my ASP pages, e.g <img
    src="products/medium/<%=(RSDetails.Fields.Item("Image").Value)%>"
    Not sure if this makes things any clearer :-|
    Thanks Again
    Andy
    <%
    Dim RSdatafeed
    Dim RSdatafeed_numRows
    Set RSdatafeed = Server.CreateObject("ADODB.Recordset")
    RSdatafeed.ActiveConnection = MM_shoppingcart_STRING
    RSdatafeed.Source = "SELECT Products.Product,
    Products.Description,
    Products.Image, Products.image2, Products.ListPrice,
    Products.Price,
    Products.xml_feed, Manufacturers.Manufacturer,
    Shipping.ShippingCost FROM
    Shipping, Products INNER JOIN Manufacturers ON
    Products.ManufacturerID =
    Manufacturers.ManufacturerID WHERE
    (((Products.xml_feed)=No));"
    RSdatafeed.CursorType = 0
    RSdatafeed.CursorLocation = 2
    RSdatafeed.LockType = 1
    RSdatafeed.Open()
    RSdatafeed_numRows = 0
    %>
    "DEPearson" <[email protected]> wrote in
    message
    news:[email protected]...
    > Andy,
    >
    > There are two ways you can create a xml file from a
    recordset
    >
    > 1. Is to code it using Server.CreateObject(XMLDOM)
    > 2. If you are using SQL server 2005, just request the RS
    returns as XML
    > data. using FOR XML AUTO after the where cause ( the
    best way with 2005
    > and
    > higher sql server)
    >
    > The db data containing HTML code should not effect your
    xml file, unless
    > it
    > is bad markup. You could wrap the data with
    <![CDATA[the data or html
    > markup, or javascript]]>
    >
    > If the url is a recordset field, then it will return
    with the xml data.
    > If
    > not you can create a storage procedure that will build
    your URL from the
    > data
    > in the database.
    >
    > It is best to use storage procedure (SP )for security
    reason when pulling
    > data
    > from a MS Sql server, make all calls to the database in
    a SP. Also be sure
    > to
    > validate the values in the querystrings before accepting
    them, check for
    > hack
    > code.
    >
    > David
    >

  • Writing an XML file from JSP

    Hi
    for some this question will seem to be a stupid, but i am really confused how can i write an XML file from with in JSP code. should i have to use same FileOutPutStream.
    Actually i am trying to make reports using Jasper api. It demands for an XML file which will then b converted into PDF file. Can any one help me in it.

    Jasper converts a JSP into a servlet - and cannot be used to generate PDFs.
    Assuming this is for a web application I would
    1. Generate the XML
    2. Generate the PDF from the XML
    3. Send the PDF to the client from a servlet (i.e. forget the JSP).
    Step 2 is actually quite complicated - you could do this manually with the IText API (http://www.lowagie.com/iText/) or use an XSL approach with Apache FOP (http://xmlgraphics.apache.org/fop/)

  • Can I load xml file from SWC without using @embed

    I'm developing a mobile application in which I need to load xml files from File.applicationDirectory. This works great if the xml files are part of the main application swf. But I would like to move these xml files into a SWC so they could be shared across multiple applications.
    Using FlashBuilder 4.5, when a SWC is built, I can specify files to embed in the library that are not assets (Assets Tab of Flex Library Build Path). For various design reasons, I do NOT want to embed the xml files via @embed.
    When the swc is built and I open it up using a zip utility, I see the xml files in there just fine. So they are being bundled with the SWC. But how can I load these files in my main application that does not involve using @embed? When the main application is built, the swc setting for link type is "merged into code".
    I wouldn't expect the application to automatically pull out the xml files from the swc and place them in the File.applicationDirectory on the mobile device. I've tried loading from there just in case but file.exists is false (as expected).
    I've searched the web (and continue to do so) and all the answers seem to be to use @embed. Is there another way?
    Randy

    It's actually a lot easier than you think.
    Just reference the file like any'ol URL using a path relative to the SWC's src directory.
    So if you include the file "assets/xml/some.xml", just use that same string like you would any remote resource.
    For example:
    var loader:URLLoader = new URLLoader( new URLRequest("assets/xml/some.xml"));
    I believe it would also work like this "/assets/xml/some.xml", but I prefer relative paths so the link doesnt break if moved out of the SWC...

Maybe you are looking for