Join query in sender JDBC

How to write a join sql commend in SAP PI sender JDBC, please give me example.

>> how can I divide this rows in XI in my Integration Process????,
I m not really sure about your actual scenario but if you are looking to club together values based upon some key,you can easily do that in message mapping by using formatByExample standard function.
Please have a look at the below blog to see its functionality.
New functions in the Graphical Mapping Tool XI 3.0 SP13

Similar Messages

  • Two select query in sender JDBC adaptor

    Hi
    We are doing JDFC-RFC scenario, in which i need to fetch the data from two tables (header  and item table) whch correspondes to the 2 table parameter of RFC .
    Any clues how to configure sender jdbc CC having  2 select query ??????
    Regards
    Vijay

    Swatantra,
    You can have a look at the below URL for more info on JOIN.
    http://www.w3schools.com/sql/sql_join.asp
    Best regards,
    raj.

  • Dynamic query configuration in sender jdbc adapter

    Hi,
    According my undertsnading in XI.3.0 dynamic query in sender JDBC adapter is not possible.
    could any one confirms the possibility of this feature in XI 7.0 .
    Thanks,
    venu

    Hi VJ,
    sorry for late responding to your answer.
    One of our requirements is the query statement that we write in sender communication channel should be changed dynamically, for example in where condition the condition parameters values required to change.
    Thanks,
    venu

  • Retreiving data from 2 tables using a sender JDBC Channel

    Hi all,
    We got anew requirement where we have to select data from 2 tables and update fields in 2 tables at the sametime.
    I have a few queries regarding this.
    Can we retrieve data from 2 tables using select query in sender JDBC channel?
    If yes, how we can achieve this?
    Can we use inner/outer joins in the select query?
    Can we update field of 2 tables using the Update query in Sender JDBC channel?
    Your help is greatly rewarded.
    With Regards
    Sudha.

    Hi,
    Even i have the same requirement where data has to be read from 2 tables and later update the falg once done .
    SELECT query :
    SELECT t1.KUNNR,t1.SETT_KEY,t1.QUART_START,t1.QUART_END,t2.PAY_METH,t2.MAT_NDC,t2.AMOUNT   FROM TSAP_REBATE_MEDI t1  INNER JOIN  TSAP_REBATE_LINE t2  ON  t1.KUNNR=t2.KUNNR AND t1.SETT_KEY=t2.SETT_KEY  WHERE  t1.PROCESSING_STATUS = 'N' AND t2.PROCESSING_STATUS = 'N'
    This is working fine.
    Can somebody help me with update query with this. where flag PROCESSING_STATUS has to be updated with 'P'.
    I tried a lot but couldnt get the answer
    Br,
    Manoj

  • Sender jdbc adapter - no update query

    hi ,
    i am using pi 731 single stack.
    the scenario is - PI has to pick data from view of a hana database. i am using jdbc sender for it.
    pi will not have access to update the table,only pi can read the view of database.So,PI can't use UPDATE query.
    If in jdbc sender channel ,I use SELECT query only and no UPDATE query - will it work ? what will happen if there are 100 records in the view and PI failed after fetching 43 records..will it pick from 44th record next time OR it will start from 0 again ?
    rgds

    Hi SAP PI,
    It has no sense to use the sender JDBC without update query because then always will be taken the same records.
    If you cant update the source DB you only have the choice to talk with the DB administrators that they develop for you a stored procedure that it has to do the work to get different records in every PI access.
    If the PI record process fail with impossible source database update update, the only way (afaik) is to do a PI alert and to communicate it to db sender administrators. There are another option like to store the data in a intermediate table, and so on but all possibilities that i can think now are not to enough good.
    Regards.

  • Upto how many characters will accept in SELECT query  SENDER JDBC (PI 7.1)

    Hi Friends,
    I have to use Sender JDBC adapter in SAP PI 7.1, I need to use SELECT query only.
    I have a SELECT query is around 2 pages. Is this will accepet in SENDER JDBC in PI 7.1
    Thanks in advance.

    Hi Challarapu,
    You can check it out and if it is not accepted by the same then you need to check the maximal length @ DB settings or JDBC Settings whether it is limited. If not then you are allowed.
    Hope this helps.
    Regards
    Pothana

  • Deciphering column names in a join query using jdbc

    hi all....
    I am making a database adapter for a generic report generater. This adapter would be forming queries involing various tables. There are two ways of doing it . I fire an sql on parent table to get the keys and then go to child table for each one of them or i form a join query to get desired result.
    i want to go with the later approach where my query would be forming a join. The problem comes when table involved in this join has columns with the same name. for eg if a column "NOTE" is there in table A as well as table B on which i have a join. Resultset returns me with two "NOTE" columns and i cannot recognize which one belongs to which table.
    all API calls including getString("Note") seems to be referring to the first occurence of "Note" column.
    Also getTableName() and getSchemaName() APIs on resultsetMetadata doesnt return in anything in case of joins.
    Any pointers would be most appreciated.
    cheers
    vivek

    thanks for suggesting this solution ... though i had thought of the same onece .... unfortunately i cannot implement something like this coz out of the result set i have to instantiate an object hierarchy depending on the schema ....
    this also puts me in a doubt whether i can use join in my case.
    for eg ... .
    lets say we have a customer talbe and and address table which has one to many relationship .... one contact can have multiple addresses.
    Assuming a contanct "Joe Bloggs" having 3 addresses ...a query like following
    select contact.firstname contactfirstname , address.streetname addressstreetname from contact , address where contact.contactid = address.contactid
    this would return me 3 rows and i can also recognize various columns with their aliases ..
    but i would lose an important fact that i have to create one java object for contact class and 3 instances for addresses which i have to return finally.
    this means that i would like to return an object hierarchy with one contact object and 3 address object underneath it linked with contactid.
    Any other suggestions after reading the complete requirement are most welcome ...sorry for not puting the entire thing at first.
    i guess the only soln left is to visit contact and address table separately. :(

  • Calling Stored Procedure from Oracle DataBase using Sender JDBC (JDBC-JMS)

    Hi All,
    We have requirement to move the data from Database to Queue (Interface Flow: JDBC -> JMS).
    Database is Oracle.
    *Based on Event, data will be triggered into two tables: XX & YY. This event occurs twice daily.
    Take one field: 'aa' in XX and compare it with the field: 'pp' in YY.
    If both are equal, then
         if the field: 'qq' in YY table equals to "Add" then take the data from the view table: 'Add_View'.
         else  if the field: 'qq' in YY table equals to "Modify"  then take the data from the view table: 'Modify_View'.
    Finally, We need to archive the selected data from the respective view table.*
    From each table, data will come differently, means with different field names.
    I thought of call Stored Procedure from Sender JDBC Adapter for the above requirement.
    But I heard that, we cannot call stored procedure in Oracle through Sender JDBC as it returns Cursor instead of ResultSet.
    Is there any way other than Stored Procedure?
    How to handle Data Types as data is coming from two different tables?
    Can we create one data type for two tables?
    Is BPM required for this to collect data from two different tables?
    Can somebody guide me on how to handle this?
    Waiting eagerly for help which will be rewarded.
    Thanks and Regards,
    Jyothirmayi.

    Hi Gopal,
    Thank you for your reply.
    >Is there any way other than Stored Procedure?
    Can you try configuring sender adapter to poll the data in intervals. You can configure Automatic TIme planning (ATP) in the sender jdbc channel.
    I need to select the data from different tables based on some conditions. Let me simplify that.
    Suppose Table1 contains 'n' no of rows. For each row, I need to test two conditions where only one condition will be satisfied. If 1st condition is satisfied, then data needs to be taken from Table2 else data needs to be taken from Table3.
    How can we meet this by configuring sender adapter with ATP?
    ================================================================================================
    >How to handle Data Types as data is coming from two different tables?
    If you use join query in the select statement field of the channel then whatever you need select fields will be returned. This might be fields of two tables. your datatype fields are combination of two diff table.
    we need to take data only from one table at a time. It is not join of two tables.
    ================================================================================================
    Thanks,
    Jyothirmayi.

  • Sender JDBC adapter : Update SQL Statement : stored procedure

    Hi,
    Can we use a stored procedure in the sender jdbc adapter in 'Update SQL Statement'.
    The problem i am facing is like, we are selecting data from two tables in 'SQL statement for query' and then in 'Update SQL Statement' , we need to delete that data from these two tables.
    Please let me know if it is possible.
    Thanks,
    Rohit

    you can use a Stored procedure in the
    Query SQL Statement
    You have the following options:
    ·        Specify a valid SQL SELECT statement to select the data to be sent from the specified database.
    ·        Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
    The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.
    so have your whole select and update as part of this single Stored procedure

  • Executing an Oracle Stored Procedure from Sender JDBC adapter

    I could really use some help from someone who had done this before. 
    I've read the help about using the JDBC sender adapter, but it's not helping enough.
    I found this line: "Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
    The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs."
    That's definately what we want to do, but we can't figure out the syntax.
    The procedure in oracle looks like this:
    CREATE OR REPLACE PROCEDURE test_ref_cursor
    ( cur_generic IN OUT result_sets.cur_generic)
    as
    BEGIN
    Open cur_generic for
    select
       proposal_number,
       to_char(sequence_number),
       column_name,
       column_value,
       update_timestamp,
       update_user
       from
       coeus.sap_test;
    END test_ref_cursor;
    And we have tried every kind of statement we can think of, but the file adapter always gives us an "invalid sql statement" error.
    Does anyone know what syntax we need to put in the "Query SQL Statement" in the JDBC sender adapter in order to call this procedure?  Or is there something wrong with the procedure that is causing the error?
    <i>I will absolutely return and give points, but PLEASE read my whole post before answering and do not just link me to or quote the help for configuring a sender JDBC adapter or blogs that are about the JDBC adapter in general but do not deal with the issues I am having. Thank you.</i>

    Hi Vanda,
    Unfortunately, the sender JDBC adapter does not support Oracle's store procedure/function.  Unlike stored procedures from other database vendors, Oracle returns a cursor, not a resultset.  The sender JDBC adapter must send a resultset to XI.
    There are 2 possible ways you can accomplish this:
    1.  Use BPM and call the Oracle stored procedure using a receiver adapter via a asynch-synch bridge.
    2.  Develop a user-module for the adapter, which can be used with a sender adapter.
    Thanks
    Prasad

  • Sender JDBC Adapter with Mutiple SQL Database Tables.

    Hi All,
    My requirement is SQL->PI7.0->BI.
    I have a plan to go with the senario like this : JDBC sender->SAPPI->ABAP Proxy.
    And also I need fetch the data from more than 10 data tables with different database tables with key fields.
    Could you please suggest me, How to extract all tables data to SAP PI System. Either need to go with Stored procedures or Any Join conditions or each table like as one Interface.
    Please provide me your suggestions.
    Regards,
    Chandra

    Hi ,
    Chandra ,
    Best way is Database Views
    Involve a Database guy in your scenario : Tell DBA the fields required , tell DBA the PrimaryKey and ForeignKey Relation Between All your 10 Tables.
    DBA will create a View for you on 10 Tables.
    So in Ur SELECT Query . you can write simply
    Select * from <ViewName>;
    And One more thing to Tell DBA to create a UPDATABLE VIEW not only READ-ONLY View.
    By this way you can way you can Update VIEW  also in UPDATE QUERY of sender Adapter...
    Regards
    PS

  • Configuring sender jdbc adapter

    Hi all,
    I have a requirement in which i have to select certain data from Oracle table and send it to an IDOC via SAP XI.
    Problem is the select can happen from several tables. For example:
    SELECT col1,col2,col3 FROM <tablename>
    The <tablename> has to be variable. I do not need to do any JOIN. At a time select will be only from a single table i.e. col1, col2, col3 will all belong to the same table. But the adapter should poll multiple tables.
    One more requirement is that once a particular record from a particular table has been selected some UPDATE also need to be done on the same record.
    Pls can anybody provide me with a proper solution.
    This requirement is a bit urgent.
    Thanks in advance.
    Regards
    Neetu

    Neetu,
    You need to have the Table name dynamic in the Sender JDBC adapter's Select Query . This is not possible
    You can consider using a Reciver JDBC adapter for which you can have a look at this blog ,
    /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
    Or, you need a Separate sender JDBC adapter for every table to be polled.
    >><i>One more requirement is that once a particular record from a particular table has been selected some UPDATE also need to be done on the same record.</i>
    If you are using the Sender JDBC adapter, this would be simple using the UPDATE field of the Sender JDBC adapter .
    If you are planning to use Receiver JDBC adapter, then You need a separate Send Step for this Update.
    Better way to go would be to have separate sender JDBC adapters.
    Regards,
    Bhavesh

  • Sender JDBC channel stop send messages

    Hi,
    We have  a sender JDBC scenario which is working correctly time ago.
    However, sometimes this channel   stop sending messages although the Adapter Monitor shows that they regularly execute the polling interval.
    We have confirmed that there isn't any connection from XI to target BD.
    In other ocasions, we  are required to restart XI and, after that, this scenario works without any problem.
    What could be the cause?
    How to solve it?
    thanks, in advance
    Carme

    This is rather strange.
    A few of my observations -
    1. When the sender jdbc adapter polls , and there is no data matching the select query, you will still see a message id in Comm Channel Monitoring but with no hyper link.
    2. The actual message id / message is created only if there is data in the database and also the hyper link is enabled.
    3. If you are confident that the data is being commited on the database and that it is XI not pulling the right data, one issue might be - driver issues. Can you check if you have the right compatible drivers for your database on XI server - is there a new'er driver available?
    We hit a similar issue with JMS adapters and we learnt that the JMS server had been updated as a result of which a new driver had to be installed which we did not until we hit intermittent problems like these.
    Hope this helps
    Regards
    Bhavesh

  • Sender JDBC to Receiver RFC scenario

    Hi All,
    I have to configure an scenario of sender JDBC to receiver RFC wherein SAP PI will be pulling data from third party database (Oracle).
    Since I am configuring such scenario of sender JDBC, I want help on every important key aspects/prerequisites of configuring sender JDBC adapter/channel. I want to understand about Database Connection, Processing Parameters, etc. details while configuring sender JDBC channel and their significance/relevance.
    Also I need guidelines about the source data structure (message type or external definition) to be used/created in ESR.
    How sender JDBC channel and receiver JDBC channel differs from each other?
    Please guide me on this.
    Thanks & Regards,
    Amit Patil

    Hi Amit,
    First of all you should read the sap.help documentation:
    Configuring the Sender JDBC Adapter - Advanced Adapter Engine - SAP Library
    Configuring the Receiver JDBC Adapter - Advanced Adapter Engine - SAP Library
    Later, you can read Rajs's blog to advance concepts and perfomance JDBC Receiver scenarios best practices part-1
    Finally, search the other blogs and documents in the SCN.
    How sender JDBC channel and receiver JDBC channel differs from each other?
    JDBC sender always does a poll to a DB table (with join some tables) in wich table you will need a field checkbox to mark the registers read, and the the receiver JDBC you can do a typical SQL construction like SELECT, INSERT, DELETE, etc. Both cases need the JDBC DB driver installed (check the SAP notes for this, also you can find some examples in the SCN:http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8000cffc-6b92-2d10-3493-f2ac1399242f?quicklink=index&…  PI/XI: deploy a JMS/JDBC driver without JSPM? ).
    Regards.

  • Stored procedure in Sender JDBC Adapter

    Hi All,
    My Scenrio goes like this ...
    Stored Procedure(SQL Server) --- PI  -
    File
    I need to write the results of  stored procedure to File.Here I don't need any mapping.So how many DT , MT and MI need to be created?
    The interface need to run by 6AM from Monday to Thrusday, how can i achieve this ?
    Stored Procedure has only select statement and no Update statement , but it takes Date as Input parameter , so what i need to provide in sender JDBC adapter.
    Thanks,
    Monish

    Hi Monish,
    As per your requirement it is JDBC to File. Please be careful with the structure to be created for sender JDBC. I am unable to understand why you donot require a mapping for this. How XI will send the data to a file then.As per my knowledge if it's file to file and just pick and drop then we can neglect IR and go for ID.But here you are working with JDBC and File so you will be in need of it.
    IR:
    DT: 2
    JDBC_Sender_DT
    File_Output_DT(Optional)
    You can use the JDBC sender data type structure for File output also.
    MT as per your DT
    MI:2
    Outbound MI: JDBC structure
    Inbound MI : File structure
    MM: 1
    IM: 1
    ID as similar to other scenarios.All 1 objects for RD,ID,Sender Agreement and Receiver Agreement.
    Sender JDBC channel:
    Query: Select * from table where date
    But I have a query how are you providing date in input paramerter.It will be dynamically entered into the query right.
    You can mention the Avalibility planning for your interface to work in RWB.
    Go to RWB>Component Monitoring>Adapter Engine->Communication Channel Monitoring>Avaliablity Planning
    Please explain.
    Regards,
    Nutan

Maybe you are looking for

  • The ways to return data from a stored procedure.

    Hi, I know there are three ways to pass out a value from a Microsoft SQL stored procedure, but I have no clear idea what Oracle SP can do, I know Oracle doesn't support multi-recordset(v8), can not return a recordset by a inner select query, but I do

  • Unable to access my other macs in the airport network

    Since I have installed Leopard 10.5.1 I am unable to access my other MACs in my airpot network for file sharing. Interesting that I can accesss my older IMAC which has TIGER 10.4.11 installed. This bug is new since I updated to 10.5.1. Its funny but

  • Exchanging data with C-DLL via arrays

    hi I'm trying to implement a program in java that reads audio data and sends it over the network (netmeeting clone). to reduce the bandwidth I want to use the G723 audio codec, from which I have an ansi-c implementation. Concerning the exchange of da

  • Error Undeploying a EAR File Containing Resource Adapter

    Hi, I am trying to undeploy a ear file that contains a 1) one inbound R.A(resource adapter), 2) one outbound R.A and 3) few EJBs. The undeploy command "java -jar admin.jar undelpoy..." executes without any error, however the thread process started by

  • Use a Secondary CE in actual Periodic Repostings cycle

    Hi, I need your help to figure out how to move on with this process. May you help me out? I want to settle a CE group for a CC group to some WBS "dummy" with different percentage on the receiver tracing factor. Afterwards I would like to settle each