Data from 2 tables for jdbc sender adapter

how to pickup data from 2 tables at a time when using a jdbc sender adapter?

select <fields> from table1 where <condition>
union
select <fields> fromt table2 where <condition>
also u can combine this with joins as pointed

Similar Messages

  • How to extract data from table for huge volume

    Hi,
    I have around 200000 material doc number for which need to get material number from MSEG table but while using SE16 it gives dump , i have even tried breaking it into batches of 20000 records but still SAP gives dump on executing SE16 for MSEG. Please advise if there is any alternate way to get data from SE16 table for such a large volume.
    Note: In our system SE16N does not work, only SE16 is there for our SAP version.
    Thanks,
    Vihaan

    Hi Jurgen,
    Thanks for your reply.
    I am getting Dump when i enter more than 5000 records as input parameter in MSEG, if I put more than that then it gives dump as "ABAP runtime errors    SAPSQL_STMNT_TOO_LARGE ".
    I understand that I can extract data restrciting 5000 every time but I have around 250000 material docs so that means if we consider batches of 5000 I need to run the step more 50 times--> 50 excel files. I wanted to avoid that as that is going to take lots of my time.
    Any suggestion, please help.
    Also wanted to highlight that apart from Material Doc number I am entering Plant (8 plants) and Mvt type (14 mvt type) also as input parameter.
    Regards,
    Vihaan
    Edited by: Vihaan on Mar 25, 2010 12:30 AM

  • How to update two tables in a single call using JDBC Sender adapter

    Hello All,
    The scenario is, database entries have to be selected from two tables and at the same time those tables have to be udpated with the flag.
    We are using JDBC sender adapter and in Select Query, we are fetching the data by joinin the two tables.
    Update Statemtent: We can only update one table using this statement.
    Is it possible to update two tables using the Update Statement without using Stored Procedures.
    Let me know.
    Regards,
    Sreenivas.

    Hi Sreenivas,
    > Is it possible to update two tables using the Update Statement without using Stored Procedures.
    Yes its possible through join statement
    Check this links
    Update in JDBC Sender adapter for more than one table
    data from 2 tables for jdbc sender adapter
    Regards
    Ramesh

  • Two JDBC-Sender adapter

    Dear all,
    I've to process all data from the first JDBC-Sender-adapter and afterwards I've to trigger the second JDBC-Sender-adapter. The second JDBC-Sender-adapter must not poll until processing of first has finished?
    How can I achieve this without BPM?
    Kind regards, Stefan

    You can start the second JDBC channel from first interface mapping. All that you have to do is you have to set external channel control ON for second JDBC channel using RWB.
    In the second interface mapping you can stop the channel, since it already pools the data. So, two individual scenarios and no BPM.
    check this link @ http://help.sap.com/saphelp_nw2004s/helpdata/en/45/0c86aab4d14dece10000000a11466f/content.htm. You need to do some settings.
    IN FIRST SCENARIO'S OPERATIONAL MAPPING --> STOP THE FIRST JDBC CHANNEL, START THE SECOND JDBC CHANNEL (using UDF java code)
    IN SECOND SCENARIO'S OPERATIONAL MAPPING --> STOP THE SECOND JDBC CHANNEL, START THE FIRST JDBC CHANNEL  (using UDF java code)
    Make sure that you give enough polling time interval's for the 2 JDBC Sender channels. Actually the START & STOP mechanism's will take care.
    Regards,
    Praveen Gujjeti.
    Edited by: Praveen Gujjeti on Apr 28, 2010 7:01 PM

  • How to Convert JDBC sender adapter data to a canonical then give to BPM

    Hi All,
    My Scenario is as follows:
    JDBC Adapter --> BPM (Business Rules + Many JDbc calls).
    I get the data from a database using sender adapter.
    I understand that this is of a Specific Format of the result set like <Row>. Can i convert this to a canonical format and then give this to Integration Process (receiver)
    Can  I include a mapping to transform this adapter specific format to a canonical format  before I give this data to the integration process?
    This is because I pull data from 3 applications and I want to use a common outbound interface (Canonical) for all the 3.
    Is this possible, please explain me how.
    Thanks,
    Meher

    Hi Meher
    BPM is right fit here . In BPM designing you need to use Fork Block with three branches - In each branch you use one receiver where you get data from 3 tables in 3 different message types.
    Use 4 abstract message interfaces with the 4 different message types required.
    Need to map these 3 Message type to a common Canonical message format you are expecting. It will provide the single structure of message type needed.
    http://sap.com/xi/XI/System/Patterns
    BpmPatternCollectMergeMultiIf
    If you have BPm patterns on you XI system follow this pattern .
    Let me know if you have any queries.
    Nanda

  • JDBC Sender Adapter Message format

    I am somenone who is new to SAP PI so please help me out in the format of datatype for JDBC SENDER Adapter ?

    Hi Rajesh
    The source xml structure for JDBC adapter is like below
    <resultset>
    <row>
    <column-name1>column-value</ column-name1>
    <column-name2>column-value</ column-name2>
    <column-name3>column-value</ column-name3>
    </row>
    <row>
    <column-name1>column-value</ column-name1>
    <column-name2>column-value</ column-name2>
    <column-name3>column-value</ column-name3>
    </row>
    </resultset>
    Then in the sender JDBC adapter, write the select and update query
    SQL statement for query: SELECT * FROM table WHERE processed = 0;
    SQL statement for update: UPDATE table SET processed = 1 WHERE processed = 0;
    processed is the indicator in the database.
    Check this link for details
    https://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm

  • JDBC Sender Adapter - Single Select and Single Delete

    Hi,
    I have the requirement where I have to select the single row (or 1st row) from database through JDBC Sender Adapter and delete that record after selection in single polling.
    Please help me out with proper SQL query or with any other approach.
    Thanks and Regards,
    Vijay

    I think in SQL select statment you have something like Select TOP number....where number is 1,2..
    The detailed syntax for the SELECT clause is as follows:
    SELECT [ALL | DISTINCT] [TOP nExpr [PERCENT]] Select_List_Item [AS Column_Name] [, ...]
    for more details...check out..
    http://msdn2.microsoft.com/en-us/library/95c6ex88(VS.80).aspx
    Document sent on your email id.
    Nilesh

  • Can we proceed even if no ResultSet Returned In JDBC Sender Adapter ?

    Hi friends ,
                           My scenario  is  JDBC to RFC .  I am reading table using JDBC Sender Adapter  and i am passing values to RFC .
                          If my select Query has not returned  any row then it won't come to Pipeline right ?
                            What i want is
                          <b>  If no rows returned then call one RFC  to insert the remarks .
                            If rows found call another RFC  to insert the values </b>
                           How can i handle the Situtation ?
                          Expecting your reply asap
    Regards.,
    V.Rangarajan

    Hi Rangarajan,
    i answered your question and shown up a solution: If Connection Lost in JDBC or no resultset returned how to handle ?.
    Double postings makes it difficult for all involved people to inform theirselfes about the point of discussion.
    The polling sender adapter is doing nothing, if no rows selected. So how do want to send a message?
    You have to use the JDBC receiver adapter, invoke the message by a job in ERP, for example with a self written RFC or a proxy. You can decide at ERP side, which function module it to be called. Of coz there are other possibilities, for example to put the logic into a business process, but you wont have success with the sender adapter.
    Regards,
    Udo

  • Sender JDBC.....pick data from table view?

    Hi Experts,
    working on JDBC for first time, so have few questions.
    data base guys want to create a table view and we need to pick the data from table view.
    my question is can we import the structure form data view?
    if i am not able to import, so i need to create the structure same as in data base table view and is it case sensitive?
    they dont want to update the data base table view, very time the SQL query will pick all the records form data base.
    the records will be less then 10,000.
    my question is as we are not updating the table view, what we need to write in update query as it is mandatory?
    Regards,
    Chinna

    Hello,
    i hope below option help in update query
    In place of the SQL statement, you can also enter <TEST>. Once the data determined from Query SQL Statement has been successfully sent, the data in the database remains unaltered.
    This is recommended if the data has not only been read, but also changed by a stored procedure entered under Query SQL Statement.

  • JDBC sender adapter provides incomplete data

    Hi,
    I have a JDBC sender adapter which reads data from a MySQL table, and passes it to a proxy which writes the data then in a SAP table.
    - Query SQL statement = SELECT Field1, Field2, Field3, Field4 FROM jdbctest WHERE Processed = 'N'
    - Update SQL statement = UPDATE jdbctest SET Processed='Y' WHERE Processed='N'
    I did a stress test with a program that writes data simultaneously to the MySQL table (up to 10000 records), and the JDBC sender adapter which checks the table every 15 seconds.
    At the end, my SAP table contained only 9965 records.
    This means that probably there have been records added between the Query and the Update statement (So they haven't been read, but their status is changed).
    Does anyone have a solution for this?
    Best regards,
    Nicolas De Corte

    Hello Dharamveer,
    I don't really understand your answer.
    My point is that the JDBC adapter only processed 9965 records out of 10000, but it updated all 10000.
    So now in my MySQL table there are 10000 records with status Processed, but only 9965 have been really processed. And I think this is because records have been added between the execution of query and the update statement.

  • In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String

    In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .

    Hi Srinath,
    The below blog might be useful
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
    PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
    regards,
    Harish

  • PI 7.1 JDBC sender adapter huge load from DB select

    Hi,
    We have the problem that the JDBC sender adapter is selecting a huge amount of data from a Oracle DB. The Adapter seems to be able to cope the load but when sending to the integration server it causes problems. We found values to adjust but I dont think increasing them is a good solution.
    My question is:
    Is there any way to send the data in blocks with using the PI standard JDBC adapter ?
    Thank you and regards,
    Andreas

    Hi,
    You can use the below parameter in JDBC sender.
       Specify additional Parameter Names and Parameter Values in the table.
    Due to messages of large size it may cause issue
    Following are the parameters to be set in the table to limit the message size per polling:
    ●      msgLimit :
    ●      maxMsgSize :  SAP note 1253826.
    ●      maxRowSize : SAP note 1253826.
    Additional parameters are published in SAP Note 801367.
    Refer the link.
    Defining Additional Parameters in Advanced mode
    http://help.sap.com/saphelp_nw73/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm

  • Deadlock issue while sending data from PI to JDBC !!!

    Hi All,
    We are getting below error while sending data from PI to JDBC (Database).
    Error - JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'store_order_details' (structure 'Order_details_Statement'): com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 61) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    This is happening when more than one PI message is trying to deliver data at the same time to database.
    Can anyone let us know the root cause of this issue and how we can rectify this.
    Is there some setting which we can use to do parallel processing as Delivering one message at a time to database is causing performance issues & taking lot of time.
    Thanks
    Neha Verma

    Hello Neha,
    Strange but can please get below information.
    Please check with the DB admin about if the user is getting locked or is there any hanging threads related to user.
    Also confirm with DB admin if the exclusive lock is on table or on the row when you try insertign or updating information.
    You can share the user from the receiver channel.
    Regards,
    Hiren A.

  • Sample pgm for moving data from table control to internal table

    Hi Experts,
          I am newbi to ABAP. I don't have good material for Table control . Appreciate if you direct me to some good source of knowledge on Table control.
    The problem at hand : I am trying to move info/data from table control (in screen painter/ input and output mode ) to ITAB but couldn't . Sample pgm if possible.
    <b>Modify ITAB index TC-Current_Line .</b>
    The above statement is not inserting new lines to ITAB . Help me!
    Thanks for your time

    hi,
    do like this...
    <b>PROCESS AFTER INPUT.</b>
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TAB1'
      LOOP AT itab_det.
        CHAIN.
         FIELD itab_det-comp_code.
          FIELD itab_det-bill_no.
          FIELD itab_det-bill_date.
          FIELD itab_det-vend_cust_code.
          FIELD itab_det-bill_amt.
          MODULE <b>tab1_modify</b> ON CHAIN-REQUEST.
        ENDCHAIN.
        FIELD itab_det-mark
          MODULE tab1_mark ON REQUEST.
      ENDLOOP.
    <b>MODULE tab1_modify INPUT.</b>
      APPEND itab_det.
    <b>ENDMODULE.                    "TAB1_MODIFY INPUT</b>

  • Multiple select queries for JDBC sender

    I am working on JDBc to IDOC scenario.
    I need to process two select queries in PI where output of 1st query becomes the input of second.
    Now i need to map the output of second to IDOC through XSL mapping also i need to use BPM to process(without using the stored procedure) the scenario.
    In my JDBC communication channel i have option for only one select query and second query should fetch the data through BPM.
    In BPM i have used the following sequence mentioned below:
    Start --> Receive step ( receives all the header lines) --> Transformation (to split the header messages to single message) --> Block Start( To processEachRecord) --> Send Syn (to map the request message i,e. output of first query with Response i,e. structure of the second query)  --> Send Asyn (to send the output of second query to XSLT mapping) -->Block End --> stop
    Output of XSLT mapping is the input for IDOC
    Now i need to understand how to process the second query?

    >> I need to process two select queries in PI where output of 1st query becomes the input of second
    Use SQL Nested Queries. 
    Example:
    SELECT Model FROM Product WHERE ManufacturerID IN (SELECT ManufacturerID FROM Manufacturer
    WHERE Manufacturer = 'Dell')
    Here first table is Manufacturer .. we do select query in manufacturer to return data and pass it to the first table Product.
    >> Now i need to understand how to process the second query?
    You dont need at all. In your sender jdbc channel, write sql statement nested query and you will get only output of the second table. you map the second table output to the idoc.
    Note: Dont know why do you need BPM for this case..
    Jdbc sender adapter  help links
    http://help.sap.com/saphelp_srm40/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    Check this thread for update statement in jdbc cc
    Re: sender jdbc adapter

Maybe you are looking for

  • I have transfered my i tunes lebrary to an exterbal hard drive, and when i try to play music in i tunes a message comes up:

    Hi I have transfred all of my i tunes library to an external hard drive attached to my pc, but when i go to play music from the transfered library, a message comes up on screen : can not find roiginal file , do you want to locate it. Can anyone help

  • ASA 5505 NAT rules blocking inside traffic

    Previous attempts to set up these NAT rules has been met with minimal success. We have been able to get the NAT rules created, and able to ping our inside servers and receivers from a  different outside network, but every time we get that far our int

  • IS the problem in my PSU?

    Hi guys, i am kinda new on this forum, but ive got a problem that is driving me crazy I have just build a new comp> AMD Athlon XP 2800+ (barton box), KT6V mobo, Apacer 512 MB DDR400 CL 2.5, FX 5200( i know is kinda crap but i am from very poor countr

  • RSAR238 : IDoc type for source system T90CLNT090 is not available

    Hi all, I am working on ECC 6.0. Have created a ODS object using RSA1OLD. While activating the ODS, am getting this error: 1. Error: R7I028 Object could not be activated 2. Error: RSAR238 IDoc type for source system T90CLNT090 is not available Error

  • Web Galleries and overall image migration

    Hey all, I've got a question regarding the MobileMe web galleries. I'm pretty sure that you can create them in three places; Aperture, iPhoto and iWeb. So my question is kind of relating to two methods of creating and collaborating web galleries. Say