JDBC- XI- File Scenario

Hi ,
I have this scenario where i need to pick the records from an Oracle staging table and i should insert the same header and item records in to a Flatfile which will be used to create records in SAP. The records in the oracle table would be of header and item records with an identifier for each of these header and items.
can any one throw some light on how to progress on this scenario, like what wud be the structure my source data type to hold the item and data records & the select statement to be written in the JDBC adapter communication channel etc....
Thanks in Advance,
Kittu.

Hi,
To access any Database from XI, you will have to install the corresponding Driver on your XI server.
To install oracle driver, just check this link,
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10
The details that have to be entered while adapter configuration,
jdbc:oracle:thin:@<IP adress>:<listener port>:<instance name (database name)>
Driver oracle.jdbc.driver.OracleDriver
Meannwhile, you have to give a Select statement for your Sender JDBC adapter. This is used to seelct the rows from the table.
You also have an update statement. This is used to update the rows that have been selected. Just check this link for the info,
http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
Regards,
Bhavesh

Similar Messages

  • JDBC-XI-FILE scenario. How to extract data from more than one table in JDBC

    Hi,
    I was asked a question like in JDBC-XI-FILE scenario........ How to extract data from more than one tables (i.e from JDBC system) ?? What is the logic to do the same ??
    I am not sure whether this is a valid question..........but any help in this regards is highly appreciated.
    Regards
    Kumar

    HI,
    Yes it can be possible ,please see the following links
    JDBC  Receiver with Oracle Stored Procedures
    configuring jdbc adapter with multiple tables
    RFC -> XI -> JDBC Scenario Updating Multiple Tables
    /people/alessandro.berta/blog/2005/10/04/save-time-with-generalized-jdbc-datatypes
    JDBC Adapter multiple Selects
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=jdbc%20with%20multiple%20tables&cat=sdn_all
    Regards
    Chilla..

  • Help with jdbc to file scenario

    Hi guys,
    I want to do a JDBC to file scenario. I need to do a SELECT * query from my table.
    An external application does the updation into my tables. I needed XI to connect to my JDBC system whenever there is an update in the tables and post it as a file.
    Please guide me on this guys
    Varun

    as pointed out have a indicator in ur table that is updated by the external system for setting that the record is read when the jdbc is polled. this would be help for avoiding reading the same records again and again whioch results in duplication. u can follow this blog (reve engg    )
    /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step

  • File - to - JDBC- to - File  Scenario using Stored Procedure

    Hi,
      I want to do File - to - JDBC - to - File  scenario, because I'm getting data in a file format and that data i want to load in a database. Database level i have a stored procedure. if any exceptions. my stored procedure will give the Response. so, now i want to store that resposne in a file..
    for this. what are the steps we have to use. is this scenario will comes in Synch ronous or Asynchronous  ? and  I have searched the web blogs also. al the blogs are related to Http or Soap  with JDBC . so, please give me some input  help about this...
    how many data types we have to create... any body having step step procedure for this...
    regards
    Jain

    Hi,
    You will need a BPM in your design as Sender File adapter does not support Synchronous messaging. Refer my answer in this thread (page 2) and have your design accordingly....instead of RFC you will have a file adapter as the ultimate receiver.
    Re: BPM FILE--> JDBC--> RFC
    Just take care of below things:
    1) JDBC message format is as per the guidelines
    [Message format for sending req to JDBC|http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm]
    2) check for the format of your source and target file format (if it is a Flat-file with a xml structure that XI can parse then no need of FCC but if it is a CSV file then you will need FCC)
    Regards,
    Abhishek
    Edited by: abhishek salvi on Apr 14, 2009 7:32 PM

  • File to JDBC to File Scenario

    Dear Bhavesh,
    I am doing a File to JDBC to File Scenario from your reference blog https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3928. [original link is broken] [original link is broken] [original link is broken] [original link is broken] This scenario is same as File to RFC to File scenario I believe. The only change I found is in Message Interface.
    The Message Interface used here are:
    1.     OB File Request
    2.     OB Abs File Request
    3.     IB File Response
    4.     IB Abs File Response
    5.     Abs Syn File Request File Response
    6.     Abs Syn JDBC Request JDBC Response.
    I am able to get the response from JDBC but while mapping to file I am getting mapping error. In fact I have followed ur Blog as it is.
    The IP steps are:
    Receive Step , Syn Send (Abs Syn File Request File Response) Step , Send Step.
    Could you please help me out, if you have time .
    Thanks in advance.
    Shaik

    Hi ,
    Sorry for pointing you the thread.
    I have created the IR as it is in File RFC File Scenario, but I have created Abs Syn Message Interface for JDBC request and Response.
    I have two Abs sync Message Interface and two mapping programs, namely
    Source Interface:
    Abs Sync Message Interface
       File Request
       File Response
    Target Interface:
    Abs Sync Message Interface
      JDBC Request
      JDBC Response
    Mapping Interface:
    File Request to JDBC Request
    JDBC Response to File Response.

  • JDBC to File Scenario

    Hey Experts,
    I have a scenario from JDBC to File (xml) scenario.
    The problem is that the data is being picked up from the data base and is sent through the sender JDBC channel to the receiver file adapter channel where the file content conversion is done. But when I check the output text file, it is empty. When I go to SXMB_MONI to check if there is any error, every thing is fine with a checkered flag on the message. My sender and the receiver data types are the same.
    Here is the scenario:
    DT_sender and DT_receiver ---> row
                                                          NAME
                                                          ID
                                                          GRADE
    payload from the sender channel is:
    <MT_DB2FILE_SENDER>
    < row>
    <NAME>CNCN</NAME>
    <ID>222</ID>
    <GRADE>A</GRADE>
    </MT_DB2FILE_SENDER>
    When the content conversion is done with the parameters :
    Recordset structure : row,1
    row.fieldNames : NAME,ID,GRADE
    row.fieldSeparator : \t
    row.endSeparator: 'nl'
    The text file that is generated is empty. I have tried out all the posts that are related to this topic. But I could not find the suitable answer. ANy help would be greatly appreciated.
    Regards.

    Hey
    I m a little confused here
    In your earlier reply,you posted
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:MT_DB2FILE_RECEIVER xmlns:ns0="http://jdbc2jdbc" />
    and now you are posting this
    <?xml version="1.0" encoding="utf-8" ?>
    - <MT_DB2FILE_SENDER>
    - <row>
    <NAME>CHAD</NAME>
    <ID>204</ID>
    <GRADE>A</GRADE>
    </row>
    - <row>
    <NAME>TYLER</NAME>
    <ID>204</ID>
    <GRADE>A</GRADE>
    </row>
    - <row>
    <NAME>AMER</NAME>
    <ID>204</ID>
    <GRADE>A</GRADE>
    </row>
    - <row>
    <NAME>BASHIR</NAME>
    <ID>204</ID>
    <GRADE>A</GRADE>
    </row>
    - <row>
    <NAME>WENBIN</NAME>
    <ID>206</ID>
    <GRADE>A</GRADE>
    </row>
    - <row>
    <NAME>lilian</NAME>
    <ID>139</ID>
    <GRADE>A</GRADE>
    </row>
    </MT_DB2FILE_SENDER>
    The above looks like a sender structure to me.
    Could you please confirm this is exactly the payload you are getting in sxmb_moni under Technical routing .
    Thanks
    Aamir

  • Reg:JDBC to FILE Scenario

    Hi All,
    My scenario is JDBC to File.
    In receiver file communication channel I will be using  the  Conversion Agent tool and the file name should reflect either the value of the Field say <NAME>TEST</NAME> ,then my output file name will be TEST.CSV or the Busines Service name ie BS_TEST ,then it should be BS_TEST.CSV
    Please suggest me on this.
    Thanks in Advance,
    Lavanya.B

    Hi,
    Check this blog for using the Busines Service name as your file name:
    /people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
    the same you can use the Variables from Payload to get the field name as file name check [this|http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm] link and go to variable subsitution section second option  If the variable refers to an element in XML schema, add the prefix payload:
    Sachin

  • JDBC to file scenario - Time limit exceeded

    Hi All,
    I am getting timelimit exceeded error in the inbound queues when I am processing the interface JDBC-XI-file. I have tried many options like registering the queues, changed the integration engine configuraion parameters for timeout , checked the memory space. When less data is being sent like 50kb then it is executing successfully. With large data the messages are getting stuck in the queues and then giving the timeout error.
    Also when I  am checking in sm50 it showing that some rfc is going on hold.
    Please suggest .
    Thanks,
    Aparna

    Thanks for the reply Pragati.
    What will be the UDF code for RFC lookup in case of passing the data in Queue. I am currently using the below code for gettng single value.
    Also is it possible to get multiple output values which can be mapped to different target fields. Currently I am using different rfc lookups for different target fields. So if I can combine them into single rfc lookup them this may effect the performance.
       //write your code here
    String content = "";
    MappingTrace importanttrace;
    importanttrace = container.getTrace();
    // Create document builder to create DOM XML document
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = null;
    factory.setNamespaceAware(false);
    factory.setValidating(false);
    try {
            // Create XML document using document builder
            builder = factory.newDocumentBuilder();
    } catch (Exception e) {
           importanttrace.addWarning("Error creating DocumentBuilder - " + e.getMessage());
            return null;
    // filling the string with our RFC-XML (with values)
    String m ="<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns1:ZFI_GET_COCODE xmlns:ns1=\"urn:sap-com:document:sap:rfc:functions\"><COMPANYID>" + a + "</COMPANYID></ns1:ZFI_GET_COCODE>";
    RfcAccessor accessor = null;
    ByteArrayOutputStream out = null;
    Payload result = null;
    try
    // 1. Determine a channel (Business system, Communication channel)
    Channel channel = LookupService.getChannel("BS_SAP_DEC210","CC_RECEIVER_RFC_test");
    // 2. Get a RFC accessor for a channel.
    accessor = LookupService.getRfcAccessor(channel);
    // 3. Create a xml input stream representing the function module request message.
    InputStream inputStream = new ByteArrayInputStream(m.getBytes());
    // 4. Create xml payload
    XmlPayload payload = LookupService.getXmlPayload(inputStream);
    // 5. Execute lookup
    result = accessor.call(payload);
    /*InputStream in = result.getContent();
    out = new ByteArrayOutputStream(1024);
    byte[] buffer = new byte[1024];
    for (int read = in.read(buffer); read > 0; read = in.read(buffer)) {
    out.write(buffer, 0, read);
    content = out.toString();
    if (result == null) {
                    importanttrace.addWarning("result of RFC call is null");
    catch(LookupException e)
    importanttrace.addWarning("Error while lookup " + e.getMessage() );
    Document docResponse = null;
    InputStream in = result.getContent();
    String res = "";
    try {
            docResponse = builder.parse(in);
            if (docResponse == null) {
                    importanttrace.addWarning("docResponse is null");
    res =  docResponse.getElementsByTagName("COMPANY_CODE").item(0).getFirstChild().getNodeValue();
    if (res == null) {
                    importanttrace.addWarning("res is null");
    catch (Exception e) {
          importanttrace.addWarning("Error when parsing RFC Response - " + e.getMessage());
    try {
            // Free resources, close the accessor..
            if (accessor != null) {
                    try {
                            accessor.close();
                    } catch (LookupException e) {
                            importanttrace.addWarning( "Error while closing accessor " + e.getMessage());
    } catch (Exception e) {
            importanttrace.addWarning("Result value not found in DOM - " + e);
    // return the result obtained above
    return res;
    Thanks.

  • Jdbc to file scenario - base mapping error

    hello all,
    i am facing a similar issue discussed in this thread,
    Re: JDBC to FILE scenatio: How to map the resultSet?
    1. i changed the document name and namespace
    2. i checked for the occurence of the filed elements
    3. i tried using the documentname and namespce both from the MONI and MAPPING TEST TAB...but still the same base mapping runtime exception error.
    Please advice.
    Thanks
    i have been following the

    Aarthi,
    Can you give us the following details,
    1. select query that you are using in your JDBC sender adapter
    2.the Document Name and namespace that you have given in the JDBC adapter
    3. the source datatype that you have created for your JDBC side along with the occurence of each element.
    This will help us nail the causwe for your problem.
    Regards,
    bhavesh

  • How to pass values at runtime in JDBC - XI - File scenario

    Hi friends,
    In my scenario, data is coming from R/3 and i need to filter records from oracle database based on this data. There are 4 database tables that need to be queried using 2 select statements. The resultset after the execution of query will be mapped to the target flat file structure.
    here are my queries:
    1) Can I avoid BPM as data needs to be collected from the two database calls which involves two sender JDBC adapter instances with only one target structure?
    2) Can I use stored procedure in this scenario? If yes, than how to pass values to stored procedure at runtime via sender JDBC adapter.
    Thanks and regards,
    Nitin aggarwal.

    Hi Nitin,
    "..So i want to know if i can write multiple select statements in the stored procedure.."
    Read the below line that is mentioned in the SAP help documentation fro Sender JDBC adapter:-
    <i>Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.</i>
    I dont think it can be achieved...but there must be some workaround for this. You can probably use a join statement.
    Read this, again from the documentation:-
    <i>The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.</i>
    Regards,
    Sushumna

  • JDBC to File scenario issue

    we are creating a scenario from JDBC table to text file. payload seems ok to us but at the time of writing file it's creating empty file.

    Hi there
    We are reading directly from SQL table and trying to populate a TXT file, with the following structure:
    AccountNumber
    CoverStartDate
    Status
    IDNumber
    Title
    FirstName
    Surname
    Gender
    DOB
    ResidentialAddress1
    ResidentialAddress2
    ResidentialAddress3
    ResidentialAddress4
    ResidentialAddress5
    PostalCode1
    PostalAddress1
    PostalAddress2
    PostalAddress3
    PostalAddress4
    PostalAddress5
    PostalCode2
    Email
    HomeTel
    WorkTel
    Cell
    MarketingFlag
    Thye Content Conversion parameters are as follows:
    Recordset Structure : row
    row.fieldSeparator: ,
    row.endSeparator: 'nl'
    Please let me know if you need any additional info?
    Thanks
    J

  • JDBC-XI-FILE scenario. How to extract data from multiple tables

    Hi,
    At this moment I didn't have the access for XI system. So here I have some silly question. Could you please clarify the same ??
    If I got to extract data from single table using JDBC adapter I can put the below query in communication channel
    SELECT *FROM orders WHERE new='true'.
    But if I got to extract data from multiple tables, logic to be used should be like as shown below. ( from previous thread------prabhu).
    SELECT <Table_2>.EID, <Table_2>.FName, <Table_2>.LName, <Table_1>.REC_DAT, <Table_1>.DESCRP
    FROM <Table_1> INNER JOIN <Table_2> on
    <Table_1>.CARDNO = <Table_2>.CARD
    where REC_DAT = <condition>
    union
    SELECT <Table_2>.EID, <Table_2>.FName, <Table_2>.LName, <Table_1>.REC_DAT, <Table_1>.DESCRP
    FROM <Table_1> INNER JOIN <Table_2> on
    <Table_1>.CARDNO = <Table_2>.CARD
    where REC_DAT = <condition>
    But my query is ........how to put the above entire code in one line. (i.e in Qery place of communication channel ) ??
    Thanks
    Kumar

    Hi Palnati,
        You either use a select query with join or a stored procedure which will contain the logic to extract the data from multiple tables. But, the limitation in case of stored procedure is u can hv only one selct query in it.
    You write ur actual query provided in the parameter 'Query SQL Statement". u can also wrt a stored procedure in it. Also, u can provide a update statement in it which will update a certain flag so tht u don selct the data again.
    Check the following link
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm</a>
    Regards,
    Akshay
    Message was edited by:
            Akshay Salunke

  • JDBC Sample Test Scenario

    Hi All,
           Could any one guide us to some successfully working Sample Test Scenario Documents for SAP XI 3.0 using JDBC Adapter which we need to work on asap.
    Thanks in advance,
    Venkat!.

    Hi All,
    I am working on a jdbc to file scenario, Now that I am trying to connect to MSaccess, I have provided the following driver and connection parameters.
    Database is in my local machine
    Driver: jdbc.odbc.JdbcOdbcDriver
    Connection url: jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=D:/database_emp/EMP_Details.mdb
    with table as EMPLOYEE
    select query as SELECT * FROM EMPLOYEE WHERE FLAG='No'
    Update as UPDATE EMPLOYEE SET FLAG='Yes' WHERE FLAG='No'
    Having given that, when i m executing the scenario I am getting the following error
    Error during database connection to the database URL 'jdbc:odbc:Driver={Microsoft Access Driver (.mdb)};DBQ=D:/database_emp/EMP_Details.mdb' using the JDBC driver 'jdbc.odbc.JdbcOdbcDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:odbc:Driver={Microsoft Access Driver (.mdb)};DBQ=D:/database_emp/EMP_Details.mdb': SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified'
    in the sender CC.
    Please help.
    Regards,
    Nithiyanandam
    Edited by: Nithiyanandam A.U. on Jan 19, 2009 11:02 AM

  • JDBC TO FILE

    hI,
    i AM DOING A JDBC TO FILE SCENARIO.JDBC ADAPTER IS POLLING THE DATABASE AND IN COMM CHANNEL ITS SHOWING PROSESSING SUCCESFULLY.BUT IN SXMB_MONI ITS NOT SHOWING ANY MESSAGE
    SO WHT I SHOULD DO?

    Hi,
    In JDBC communication channel what Select query you have written.
    Is there any data avaialble as per it and are you maintaining the proper update query also for it.
    Mostly there will be somthing abrrupt about the Select query as per the avaialble data .
    refer below link
    Tips and Tutorial for Sender JDBC Adapter
    /people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
    Thanks
    Swarup
    Edited by: Swarup Sawant on Feb 13, 2008 10:52 AM

  • JDBC to File Adapter

    Dear All,
    I am configuring an JDBC to File scenario.Can anyone please highlight on this scenario in detail.This is the first time i am configuring this scenario and i have a few problems in it.
    Regards,
    Amit

    Amit,
    check the following
    Multiple stored procedures using JDBC Adopter, Synchronous call
    Document Formats for Receiver JDBC adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Re: Multiple stored procedures using JDBC Adopter, Synchronous call
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
    Regards
    Sreeram.G.Reddy

Maybe you are looking for

  • Error in Starting the service.The Service Schedule doesnot Exist.

    when i install the Oracle 8i on Windows 2003 then it installed successfully and import and export data successfully wothout any Problem But after that when i restart the Server then it ask for the User name and Password BUT when i entered the User Na

  • Changing Logo in NWBC 3.0

    Hi everyone, How do I change the logo in NWBC v. 3.0? Most of the posts here are for NWBC v. 1.0 - it doesnt work for v 3.0. Hope you guys can help. Thanks!

  • "Returned mail: Message failed to pass through virus scanner"

    We have a large number of this mail (see below) on our OCS1 cause by virus like MyDoom: From: "Mail Delivery Subsystem" <[email protected]> To: [email protected] Mime-Version: 1.0 Content-Type: multipart/report;      report-type=delivery-status; BOUN

  • CORE3260 error

    I am running Web Server v7.0 Update 8 and I found these messages in an error log. [04/Aug/2010:18:11:30] catastrophe ( 2944): CORE3260: Server crash detected (signal SIGSEGV) [04/Aug/2010:18:11:30] info ( 2944): CORE3262: Crash occurred in function p

  • Derived column source

    I have a report based on a SQL query. In this query I have some IDs which are foreign keys from other tables. I want to hide these IDs and show the names from the IDs primary table. In oracle reports I can show this as a formula column with a source