JDBC - BAPI

Hi,
  I have a scenario where i have to sent a set of lines of data from the SQL server and the receiver BAPI should recieve this data in an internal table.Is this possible?If yes,what all steps shud i do?
Thanks and Regards
Jishi

Usually 0:unbounded data (in case of JDBC <b>row</b>) is mapped to the BAPI structure table 0:unbounded.
That is BAPI structures made by <b>Table Types</b>, they exactly represent the way you create the data types in XI.
regards
Shravan

Similar Messages

  • One Message Two Possibles receivers (iDoc or BAPI) in an System

    Hi All,
    My Scenario is:
    JDBC - > BAPI or IDOC
    the legacy system sends customers to SAP XI... and those customers could be old or new...
    so... in my interface... I ask with a RFC LookUp.. if the customer exists or have to create a new one.
    for create we use the iDoc: DEBMAS06... but it doesn't support modify a customer.
    Modifications with: BAPI: BAPI_CUSTOMER_CHANGEFROMDATA1.
    which is the best way to do this???
    2 messages mappings??? with 2 receivers determination???
    1 message mapping whit 2 diferent messages?? and 1 receiver???
    Have read about Enhanced Receivers... but doesn't work...
    Help Please....
    Thx, and Regards

    In the Configuration Part of the Integration Builder, in the Interface Determination you can add more Inbound Interfaces, even the same one twice.
    When you do that, a new column appears between the two you already had, named 'Condition'.
    In here you can select all the values from your (Outbound) Interface and compare them to a fixed or dynamic value of your choosing. The interface will then use the Interface Mapping you selected only when the condition is true. This way you can let the same outbound message use multiple possible mappings/interface mappings.
    Don't forget that you now need to make a Receiver Agreement for every condition you added.

  • Multi response for Async/Sync bridge.

    Hi everyone!
    We have a scenario with Async/Sync Bridge. It is JDBC-BAPI-JDBC. So it uses 3 communication channels. Sender/Receiver for JDBC and Receiver for BAPI.
    Now we need to modify scenario so that it will send BAPI response not only to JDBC but also to E-mail. Is it possible to acheive without BPM? And if it is possible than how? Any idea would be greatly appreciated.
    Thanks in advance,
    Andrei

    >Now we need to modify scenario so that it will send BAPI response not only to JDBC but also to E-mail. Is it possible to acheive without BPM? And if it is possible than how? Any idea would be greatly appreciated.
    One way to avoid BPM for this situation is use UDF in the response and send mail using UDF. This way in addition to JDBC response you can also do sending email. But downside is u will lose email monitoring..
    explore this link .....
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=90570965

  • JDBC- PI7.1- BAPI Synchronus

    Hi Experts,
    I have a scenario where Data of Sales orders are to be picked up from SQL Server using a STORED PROCEDURE and need to be sent to a BAPI -Sales Order which creates sales order in SAP ECC system and I would need to send the Sales ordenumber created back to the database using Update statement.
    Can any how you give  me links or steps of how to start my Datatypes and Message types and Graphical mapping programm for a Sender STORED PROCEDURE  to BAPI and in the same for BAPI -RESPONSE SQL UPDATE statement.
    Thanks in Advance.
    KishoreJ.

    >
    RAVI  KISHORE wrote:
    > Hi Experts,
    >
    > I have a scenario where Data of Sales orders are to be picked up from SQL Server using a STORED PROCEDURE and need to be sent to a BAPI -Sales Order which creates sales order in SAP ECC system and I would need to send the Sales ordenumber created back to the database using Update statement.
    >
    > Can any how you give  me links or steps of how to start my Datatypes and Message types and Graphical mapping programm for a Sender STORED PROCEDURE  to BAPI and in the same for BAPI -RESPONSE SQL UPDATE statement.
    >
    > Thanks in Advance.
    >
    >
    > KishoreJ.
    you have two flows here,
    JDBC -> RFC.Request and RFC.Response -> JDBC.
    Since the RFC is a sync one, your scenario is Async - Sync
    ref:
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    http://wiki.sdn.sap.com/wiki/display/XI/File-RFC-File(Without+BPM)
    Regarding stored procedures, you cannot use a single stored procedure in this case. So you can have a SP at the sender JDBC and another at the receiver JDBC.
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures

  • BAPI Sync Call using JDBC Staging Table..

    Hello..  (a bit of a newbie so I apologize in advance)
    I'm having a problem with an integration.  It looks like the xml is coming into XI fine from the JDBC source, but not getting to the correct mapping program.   In Runtime Workbench, I get two messages in the Adapter engine.  One says successful and has the payload of the JDBC pull data.  The other is at a Waiting status and has the same data structure.  The error messages says unable to find channel ID.  Here are the details.
    Synchronous Integration:
    - JDBC table Source (polled every 5 mins)
    - Mapped to BAPI_PO_CREATE1 (request)
    - BAPI call to BAPI_PO_CREATE1
    - BAPI resonse BAPI_PO_CREATE1.Response (for PO number)
    - Mapped to custom message for JDBC insert command.
    - JDBC table updated with PO number from BAPI_PO_CREATE1.Response
    I have created two separate Interface Mappings for this, one is a Synch interface outbound with the JDBC source message type output and the JDBC target (with PO number) message type input.   The second Interface Mapping is also outbound and has the BAPI CREATE1 as output and the BAPI Response as input.

    I have gotten this to work and submit to the adapter.  As it turns out, I had a problem in my source data structure.  The JDBC call (sql) was pulling in the format below.  I was missing the subelement "row"
    Now I am onto more mapping questions.  Thank you for your help though!
    <?xml version="1.0" encoding="utf-8" ?>
    - <PO_Combined_in>
    - <row>
      <MANDT />
      <EBELN>D02</EBELN>
      <EBELP>00010</EBELP>
      <ACTION_KEY>A</ACTION_KEY>
      <CR_DATE>2005-12-12 00:00:00.0</CR_DATE>
      <CR_TIME>12000000</CR_TIME>
      <BSART />
      <SEQUENCE>1</SEQUENCE

  • Hi doubt BAPI to JDBC scenario

    Hi experts,
      Can you send step by step procedure for BAPI to JDBC sceanrio.
    thanks
    dhanush,

    Maybe you can consider searching on SDN for sender rfc adapter scenarios and Jdbc adapter scenarios? Or is searching really that difficult a task?

  • Any Blog for Scenario Webservice to BAPI/JDBC/*

    Hi All:
    Can any one send me a blog for webservice to BAPI/JDBC/* scenario. Also how to deploy it in j2ee engine.
    I will reward max points for it.
    Thanks
    Farooq.

    How To Develop a Simple Web Service Application Using SAP NetWeaver
    Developer Studio & SAP XI 3.0
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5f3ee9d7-0901-0010-1096-f5b548ac1555

  • Converting SQL Server text field containing XML string to XI XML via JDBC

    Hello
    My client has a SQL Server database containing a field of type Text which contains an XML string e.g.
    <DispatchJob> <DispatchDateTime>2003-09-29T13:29:15</DispatchDateTime> <AssignedFSE>F118</AssignedFSE> <DispatchJobPurchase> <DealerID>14C5</DealerID> <DateOfPurchase>1997-10-01T00:00:00</DateOfPurchase> </DispatchJob>
    I am using JDBC to access this but could someone please recommend the best and easiest solution for converting this string to XI XML for subsequent mapping to BAPI or IDOC or ABAP Proxy and transmission to SAP. There are other fields as well in the database table so thoughts at the moment are to use a normal graphical message mapping followed by an XSL mapping. Will an XSL mapping be able to do this and if so is that the best solution?
    Also I need to do the reverse of this and take fields coming from SAP via BAPI,IDOC etc. and convert them to a single database table field as an XML string also via the JDBC adapter. What is the best way to do this. Could it be done simply with functions in the graphical mapping e.g. concatenate?
    Thank you in advance.
    Trevor

    Hi Michal
    Thanks for the prompt reply.
    I was anticipating XSLT for reading from the SQL Server database and converting the XML string.
    But how would you convert the individual fields from SAP into a single field as an XML string for storing in the SQL Server database? What approach would you use?
    Regards
    Trevor

  • JDBC Sender Adapter - Records sent one at a time

    Hello everyone,
    Here's a summary of my scenario JDBC > XI > RFC.
    My select statement (JDBC) looks like this:
    SELECT * FROM BATCH WHERE STATUS='Y'
    The problem is, whenever it returns multiple rows, the RFC can only accept one record at a time (1...1), so I need to pick up the records from the DB and send them one at a time.
    Currently, this is how the output XML looks like:
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <row>
      <number>200000000472</number>
      <status>Y</status>
      </row>
      <row>
      <number>200000000473</number>
      <status>Y</status>
      </row>
      <row>
      <number>200000000474</number>
      <status>Y</status>
      </row>
    </ns:SQL_RESP_MT>
    Instead, I need each row to be picked up and sent one at a time.
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <row>
      <number>200000000472</number>
      <status>Y</status>
    </ns:SQL_RESP_MT>
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <number>200000000473</number>
      <status>Y</status>
      </row>
    </ns:SQL_RESP_MT>
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <number>200000000474</number>
      <status>Y</status>
      </row>
    </ns:SQL_RESP_MT>
    Does anyone know the changes I need to make in my current SELECT statement or the JDBC Sender Adapter to make this possible.
    Thanks in advance!
    Glenn

    Thank you all for your replies. I'll check out your link in a bit, Phani. Thanks!
    A SpliByValue won't work since the BAPI Header is (1...1).
    Luckily, during testing, I found out that the BAPI (BAPI_PRODORDCONF_CREATE_TT) handles multiple lines in one of the subelements of the header so that was where I mapped the Rows.
    I might need to trigger multiple BAPIs in the future, so I'll take a good look at your suggestions, but for now, I'm marking this question answered.
    Warm regards,
    Glenn

  • Stored procedure from JDBC in VC

    Hello
    We're starting to use VC 7.0 SP14.
    We've already made few applications using JDBC tables or view and BAPI.
    Now we want to use stored procedures of the same DB.
    Our DB system was created as a "SAP_BI_JDBC". But when I look in VC, I can see my system but it only proposes me to "look for a table" or to "browse table catalog". Here I don't see my stored procedures.
    Hence, I tried to create a "JDBC Systems" but now I can connect to it (connection test fail).
    Can any one help by giving me the parameters to use on the DB side, or portal's system parameters, ...
    Thank you !
    Benoit

    Hi,
    You test the Connection in the prortal if it fails then it is problem woth Usermapping.
    Do the usermapping for that DB
    then try again
    Govindu

  • Synchronous - asynchronous interface (RFC - XI - jdbc)

    hello to everybody!
    i want configure a synchronous - asynchronous interface (RFC - PI - jdbc) whit my PI 7.1
    This RFC send 2 output tables to PI/XI and i want write it into 2 different tables in a SQL Server Database.
    How can i do it?
    i tried whit one mapping to a unique outbound datatype...but only header table was insert and not rows.
    i tried whit 2 Receiver Interfaces but i have on mapping the follow error:
    Multiple inbound interfaces not supported for synchronous calls
    so??
    other possibility?
    BPM?
    please help me
    Thanks
    Alessandro

    Hi,
    I have a similar problem; I have JMS - PI - RFC synchronous scenario. I will receive message from JMS, and depending on the data received, I should call either of two RFCs (NOT BOTH). The BAPI return message should then be sent back to JMS.
    Hence, I have one "Sender/Outbound" Message Interface, one receiver determination for that Message Interface - in which there is "one" receiver (backend SAP system).
    In "Interface Determination", I specifed the two BAPIs as two Interfaces, and defined conditions based on "context objects" - since I need to know the Interface Mapping "dynamically"
    However, I get the error - "Multiple inbound interfaces not supported for synchronous calls ". any suggestions on how to proceed?
    I am posting this question here as it is a related issue. Hope it is fine.
    Thanks,
    Archana

  • SQL to BAPI  Message Mapping Issue

    This is my datatype for source, which refered by resultset
    <?xml version="1.0" encoding="UTF-8"?>
    <mt_PhysCountInfo>
       <row>
          <PROCESSED/>
          <TRANS_ID/>
          <TRANS_RFC/>
          <SAPABX_STATUS/>
          <SIGN/>
          <OPTION1/>
          <LOW/>
          <HIGH/>
       </row>
    </mt_PhysCountInfo>
    When  JBDC Sender Adapter polls SQL Database, SQL select statement is written in such way that its picks data from 5 tables among them datatypes in 4 tables is same(SIGN, OPTION1, LOW, HIGH) with different values....which in turn will be mapped to 4 corresponding tables in BAPI.
    Here is my souce once JDBC adapter picks from SQL tables:
    <?xml version="1.0" encoding="utf-8"?>
    <mt_PhysCountInfo>
         <row>
              <PROCESSED>N</PROCESSED>
                    <TRANS_ID>1847201</TRANS_ID>
                    <TRANS_RFC>BAPI_MATPHYSINV_GETITEMS () <b>plant_ra, stge_loc_ra, count_status_ra, phys_inv_no_ra</b>, items, headers, return</TRANS_RFC>
                    <SAPABX_STATUS>x</SAPABX_STATUS>
                    <SIGN><b>I</b></SIGN>
                    <OPTION1><b>EQ</b></OPTION1>
                    <LOW> </LOW>
                    <HIGH></HIGH>
                    <SAPABX_STATUS>x</SAPABX_STATUS>
                    <SIGN><b>I</b></SIGN>
                    <OPTION1><b>BT</b></OPTION1>
                    <LOW></LOW>
                    <HIGH><b>ZZZZZZZZZZZZZZZZ</b></HIGH>
                    <SAPABX_STATUS>x</SAPABX_STATUS>
                    <SIGN><b>I</b></SIGN>
                    <OPTION1><b>EQ</b></OPTION1>
                    <LOW><b>WOIL</b></LOW>
                    <HIGH></HIGH>
                    <SAPABX_STATUS>x</SAPABX_STATUS>
                    <SIGN><b>I</b></SIGN>
                    <OPTION1><b>BT</b></OPTION1>
                    <LOW>    </LOW>
                    <HIGH><b>ZZZZ</b></HIGH>
         </row>
    </mt_PhysCountInfo>
    This is how my target stucture looks like now. But I am not getting right mapping here. If you see values for SIGN, OPTION1, LOW and HIGH they all are same for all tables...means its mapping first set values from source to all tables in target.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:BAPI_MATPHYSINV_GETITEMS xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
       <b><COUNT_STATUS_RA></b>
          <item>
             <SIGN><b>I</b></SIGN>
             <OPTION><b>EQ</b></OPTION>
             <LOW> </LOW>
             <HIGH/>
          </item>
       <b></COUNT_STATUS_RA></b>
       <HEADERS/>
       <ITEMS/>
       <b><PHYS_INV_NO_RA></b>    
          <item> 
             <SIGN><b>I</b></SIGN>
             <OPTION><b>EQ</b></OPTION>
             <LOW> </LOW>
             <HIGH/>
          </item>
       <b></PHYS_INV_NO_RA></b>  
       <b><PLANT_RA></b>
          <item>
             <SIGN><b>I</b></SIGN>
             <OPTION><b>EQ</b></OPTION>
             <LOW> </LOW>
             <HIGH/>
          </item>
       <b></PLANT_RA></b>
       <RETURN/>
       <b><STGE_LOC_RA></b>
          <item>
             <SIGN><b>I</b></SIGN>
             <OPTION><b>EQ</b></OPTION>
             <LOW> </LOW>
             <HIGH/>
          </item>
       <b></STGE_LOC_RA></b>
    </ns0:BAPI_MATPHYSINV_GETITEMS>
    But target should look like this after mapping:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:BAPI_MATPHYSINV_GETITEMS xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
       <b><COUNT_STATUS_RA></b>     
           <item>
             <SIGN><b>I</b></SIGN>
             <OPTION><b>EQ</b></OPTION>
             <LOW> <b>WOIL</b></LOW>
             <HIGH/>
          </item>
       <b></COUNT_STATUS_RA></b>
       <HEADERS/>
       <ITEMS/>
       <b><PHYS_INV_NO_RA></b>
          <item>
             <SIGN><b>I</b></SIGN>
             <OPTION><b>BT</b></OPTION>
             <LOW> </LOW>
             <HIGH><b>ZZZZ</b></HIGH>
          </item>
       <b></PHYS_INV_NO_RA></b>
       <b><PLANT_RA></b>
          <item>
             <SIGN><b>I</b></SIGN>
             <OPTION><b>EQ</b></OPTION>
             <LOW> </LOW>
             <HIGH/>
          </item>
       <b></PLANT_RA></b>
       <RETURN/>
       <b><STGE_LOC_RA></b>
          <item>
             <SIGN><b>I</b></SIGN>
             <OPTION><b>BT</b></OPTION>
             <LOW> </LOW>
             <HIGH><b>ZZZZZZZZZZZZZZZZ</b></HIGH>
          </item>
       <b></STGE_LOC_RA></b>
    </ns0:BAPI_MATPHYSINV_GETITEMS>
    Can I achieve this by using Message Mapping??? or If I have to do with XSLT or JAVA can anybody provide me code.
    Thank You
    Indrasena

    Hi,
    >>>Can I achieve this by using Message Mapping???
    it depends:)
    do you always get 4 values (one for each target table?)
    if so then you create a few user advanced functions
    that will return values in direct order:
    first function:
    result.addValue(a[0]);
    sencond one:
    result.addValue(a[1]);
    and so on
    then you can use those functions
    to map values to different tables
    if you have more then you can do some if conditions
    in the user advanced function
    Regards,
    michal

  • Help required in JDBC to RFC to JDBC

    Hi Guys,
    I have a requirement where I'll query my database which will give me back multiple rows. Each row has a flag which indicates CREATE,DELETE or MODIFY.
    According to the value in these flags, I have to call different BAPI's i.e
    BAPI_CREATE
    BAPI_DELETE
    BAPI_CHANGE
    After calling the BAPI, I need to insert the response back to my database.
    My design logic is
    Inside my BPM, receive my jdbc message and do multimapping transformation with the 3 BAPI types and bundle them.
    After this , I need to use a BLOCK for each STEP where I'll insert the sync send step
    Bundle all the response messages obtained so far and call the jdbc transformation
    Guys I need your help in suggesting any changes in my design
    Am i approaching this situation in the right way???
    Please help me on this guys
    Thanks
    Varun

    Varun,
    Just one thoought over your design....
    Rather than calling BAPI's for every row, just send all rows to the abap proxy or zbapi.
    You can process all your rows at a one time ( which I think would be better design and fast processing) and gather all response from Individual BAPI's for every row  in one internal table and send it back to XI as BAPI's response message.
    In this way you can avoid BPM as well..which will be more faster.
    Let me know if you need more details.
    Nilesh

  • Updating database table based on BAPI response in case of error

    Dear Experts,
    My scenario includes pulling records from database stagging table, and push one record at a time to BAPI_ALM_NOTIF_CREATE.
    I am using sender JDBC adapter(with select query and update query to mark records as processed).
    My question is : Once XI selects records, immediately status is updated in stagging table for the selected records as processed. what if BAPI could not create document? In this case I need to update status of that record as "Not processed".
    What should I use?
    If BPM, then please tell me the steps.
    Is this possible without BPM?
    What are the chances of failure between XI and BAPI?
    Please provide your inputs.
    Thank you.
    Div

    >
    S.R.Suraj wrote:
    > Hi Divyesh,
    >
    > Your steps are correct..
    >
    > 1. JBDC will read record with code = 0 and make it 1...
    > 2. Once the bapi process is completed all these read records shoudl be made as 2 (if completed successful) else 0 if bapi went into some error.. so that again the jdbc adapter can poll these records and give back to bapi for processing...
    >
    > Now your questions
    > >>So after selection and updation only proxy call will be done right? So for every polling of jdbc adapter ,proxy call will happen?
    > YEs every poll of jdbc will result in a proxy call and every time it will contain next set of records (as the earlier one have already marked as 1)
    >
    > >>How to achieve this?
    > Since this is a synchronous scenario JBDC->XI->Proxy and reverse, I have suggested to use responseonewaybean as a module in sender jdbc adapter (because sender jdbc cannot act synchronously thats why you need to use this module)..
    >
    > >>Do i need to use BPM? please suggest steps.
    > and if this is not working then go for BPM..the steps as i mentioned in my first thread..
    >
    > Regards
    > Suraj
    Hi Suraj,
    Thanks a lot for your support.
    It would be good if you can provide your inputs.
    Stagging table records status:
    Flag = 0 (XI will poll records)
    Flag = 1(XI has polled records and XI will se tthis flag by JDBC adapter)
    Flag =2 (should be done based on response from Proxy Tables parameter) Proxy will set tables parameter which will include info on error message and type.
    (Now based on new requiremets: for error records status should not be reset to 0 so that XI can poll records again, now stagging table should contain error records(for which proxy can not create notification in SAP) with error message and status flag 2)
    Now scenario would be JDBC to Proxy.
    Polling interval for JDBC adapter should be 1 minute.
    So I think status 0 to 1 will be done by XI after immediately selecting records.
    But how about Status 2 that has to be set only for error records only and  with error information.
    I have to update stagging table records with status 2 and error info based on proxy table response. How this can be done?
    This updation will be done in case of error only.
    I was thinking this aproach:
    We can have two interfaces.
    First interface will be jdbc to proxy:
    JDBC adapter select and update records with flag =1 and then send to proxy call and create document in SAP. At SAP side if document can not be created then they will store that error info in some table.
    Second Interfgace:
    Client SAP Proxy will periodically run and send these error records info to XI and XI will update stagging table records accordingly.
    Suraj, What is your sugestion in this solution? Do I need to use Responseonewaybean?
    Thanks Suraj
    Div

  • JDBC--XI---ABAP Proxy

    Dear Experts,
    I have a scenario from DB system I am given a stored procedure that gives me the contents for creating sales orders in SAP ECC system. Now I have written a ABAP proxy code, internally I have used BAPI for sales order creation,  the sales order which gets generated in ECC system through BAPI   and Intendet number  coming from DB needs  to be updated back to the same table where the stored procedure is picking up the data, the updation Stored Procedure has been provided and I have done the mapping part of it also.
    For this my approach I designed is
    Sender JDBC Adapter using Stored procedure and creating Sales orders in ECC using Receiver ABAP Proxy and for this I have not used Synchronous Updates and similarly in ABAP proxy  I have used BAPI which creates Sales Orders and returns the Sales order and i would need to pick the Intendts and Sales orders , both of which I need to send back to DB system, for this I am using the same Inbound proxy code which generates Sales order number and i would want to call the Outbound proxy from the same Inbound proxy to send back the Sales order number and Intedent.
    My question can any of you give me some reference as to how i can call an Outbound proxy (Sending Sales order number,Intedents) in the same Inbound Proxy(which creates Sales orders) to send the Updates to the DB system.
    I have created 2 Outbound Asynchornous Service interfaces and 2 inbound Asynchronous Interfaces.
    Regards,
    KishoreJ.

    Hi Stefan,
    Thanks for the example, using that I have delcared and called the Outbound proxy in my Inbound proxy using its relevent method. Now there is a small problem, The system states that SalesOrder number not compaitable which which i am passing to the method.
    For your reference
    create object lo_salesorderout.
    TRY.
    CALL METHOD lo_salesorderout->si_ob_sap_to_fms_ordernumber
      EXPORTING
        output = salesorder  .----
    Error is being thrown here
    CATCH cx_ai_system_fault .
    ENDTRY.
    So for the reference in Inbound proxy I have defined this as
    Data: salesordernumber type vbeln
    and in SAP XI this is regarded as a String, should I first convert the String type to VBELN of type Char 10.
    Thank You,
    KishoreJ.

Maybe you are looking for