RFC - XI - JDBC

I have created an RFC function Module which sends the materail number to the third party system.
Where it would trigger the stored procedure and get back the result set into an rfc enabled function
module structure.Here there is problem when mapping back result set to the rfc Function Module.
Can any one tell me.How to map the result set from the stored procedure to the RFC fucntion Module.I have
created a structure to hold the data returned from the stored procedure.
I doubt what should with header (NODE),which contains subelements materialnumber and otherfields.The elements
under NODE are mapped properly.But i doubt with Header structure mapping the node should disable the field enable and mapit
to the header strucuture of the target.
I would appreciate if any one help me how to do the mapping back to the rfc enable function module
or either pass on the blog or the http of help documentation.
Thank you,
KishoreJ.

Hi Kishore,
As you will be using the JDBC adapter as your Reciver that will select data from the database, the Adapter will be SYNCHRONOUS and the format of the Datatype has to be,
<DT>
<StatementName4>
<dbTableName action=”SELECT”>
<table>realDbTableName</table>
<access>
<col1/>
<col2/>
<col3/>
</access>
<key1>
<col2>val2old</col2>
<col4>val4</col4>
</key1>
<key2>
<col2>val2old2</col2>
</key2>
</dbTableName>
</StatementName4>
</Dt>
The COL between ACESSS will contain the column names that have to be selected from the database.
The values between KEY will contain the conditional values.
The response will be of this format,
<DT_response>
<row>
<column1>value11</column1>
<column2>value12</column2>
</row>
<row>
<column1>valueN1</column1>
<column2>valueN2</column2>
</row>
<DT_Response>
Just create the Datatypes of this formats for the request and response JDBC and it will work fine.
Also go thru these links and clear all your doubts:
http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
/people/alessandro.berta/blog/2005/10/04/save-time-with-generalized-jdbc-datatypes
http://help.sap.com/saphelp_nw2004s/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm
Regards,
abhy

Similar Messages

  • Help on RFC to JDBC and JDBC to RFC

    Help on RFC to JDBC and JDBC to RFC
    Hi Gurus
    I have the scenario where an RFC will be triggered in SAP , to write to a DB2 database and insert new records in a table
    and vice versa the JDBC has to read som data from a table based on a primary key, mark them as read for not be read next time and send the data to an RFC where a table in SAP will be updated.
    I have never worked with JDBC before , pls advice.
    is there any new issue to consider in PI 7.0 regarding JDBC
    Thanks.

    The requirement looks standard,
    SEARCH IN SDN FOR JDBC scenarios,you will find many docs for sender as well as Receiver.
    >
    > is there any new issue to consider in PI 7.0 regarding JDBC
    >
    no issue with PI7.0.
    Regards,
    Raj

  • Error"SYSTEM Failure" while testing the RFC in SE37  : RFC to JDBC Scenario

    Hi All,
    I am doing RFC to JDBC scenario. When I am testing the RFC in SE37 using the RFC destination created in SM59, I get an error "SYSTEM FAILURE".
    Please suggest.
    Thanks,
    Shyam
    Edited by: Shyam Sreepada on Dec 18, 2007 5:46 PM

    Hi,
    You must run RFC with RFC destination in background mode, I suggest to read following post in order to understand it better.
    Syntax would be:
    CALL FUNCTION func IN BACKGROUND TASK
                       [DESTINATION <your RFC destination>]
                       parameter list
    http://help.sap.com/saphelp_nw04/helpdata/en/8f/53b67ad30be445b0ccc968d69bc6ff/frameset.htm
    If you read it you will find that you can't test it directly from SE37, for this either you need to create dummy ABAP program or another RFC where you will call this RFC with background syntax.
    Regards,
    Gourav
    Reward points if it helps you
    Edited by: Gourav Khare on Dec 18, 2007 6:07 PM

  • Mapping problem in message response  RFC -- xi -- JDBC

    Hi all,
    I'm using the follow scenario:
    RFC <-> xi <-> JDBC
    It's a synchronous interface.
    In JDBC the message do a SELECT in database and returns selected rows in message response.
    The message response transfers selected rows to RFC.response in the mapping.
    It seems working right but no data are transfered to RFC.
    In SXMB_MONI I can see the selected rows from database.
    There is no error in JDBC and RFC adapter. Bellow is the message response in the SXMB_MONI:
      <ns1:MT_jbdc_select_response xmlns:ns1="http://braskem.com.br/xi/sapxi03">
      <t7_productionorder_response>
      <row>
      <PRODUCT>Nafta Media</PRODUCT>
      </row>
      <row>
      <PRODUCT>Nafta Media</PRODUCT>
      </row>
      </t7_productionorder_response>
      </ns1:MT_jbdc_select_response>
    I think that there is an error in message mapping between RFC.response <-- message_response, because I'm just mapping the fields <row> and <product>, because if I make a link beteween <t7_productionorder_response> and return table of RFC, a Short DUMP happens.
    Bellow the structure of MESSAGE RESPONSE:
       <t7_productionorder_response>
          <row>
             <PRODUCT/>
          </row>
       </t7_productionorder_response>
    Bellow the structure of RFC RESPONSE:
    <RFC.response>
      <t_return>
         <item>
             <product/>
         </item>
      </return>
    </RFC.response>
    When I make a link in the mapping between
    <t7_productionorder_response> -> <t_return>
    a short DUMP happens in RFC call in R/3.
    Anyone could help me about this problem ?
    Thanks in advance
    Regis Ferrato

    Hi,
      <i>because if I make a link beteween <t7_productionorder_response> and return table of RFC, a Short DUMP happens.</i>
    After doing this mapping, did you test it in the IR mapping editor? was it successful?
    Do specify the occurence of all the headers so we can help you better.
    Regards,
    Smitha.

  • Error in RFC-XI-JDBC scenario

    Hi All,
      I have a Interface like RFC-XI-JDBC and triggering the RFC in SAP system i am getting the error like "<b>alternativeServiceIdentifier: party/service from channel configuration are not equal to party/service from lookup of alternative</b>".
    Can anybody help me what could be the reason and where i need to do settings.
    Thanks and Regards,
    KP

    Go through  See SAP Note - 730870
    This should solve the issue
    OR
    <b>/people/michal.krawczyk2/blog/2005/09/07/xi-why-dont-start-searching-for-all-errors-from-one-place
    <b>alternativeServiceIdentifier: party/service from channel configuration are.
    <b>/people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walkthrough-part-1
    Thanks '
    Abhishek Mahajan
    ******Please Reward points if Helpful**********

  • RFC - XI - JDBC - cannot insert in Table !

    Hi Experts...
    I have a scene RFC - XI - JDBC !
    When executing the application in the SXMB_MONI my status is processed successfully!
    But cannot insert the data in SQLServer Tables !
    Im Message Monitoring i have the erros:
    Error No "action" attribute found in XML document ("action" attribute missing or wrong XML structure)
    Error Exception caught by adapter framework: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure).
    I need to insert in 4 tables --> CRHE, CRFT, CRFV and TLINES
    Where CRHE is the father table.
    This is my RFC Structure:
    CONTROL_RECIPE_DOWNLOAD
      CLIENT
       CRFT
         item
           CRID
           FTNO
           FTTYP
           COSTR
           VORNR
           FTRNR
       CRFV
         item
           CRID
           FTNO
           FVNO
           ATNAM
           ATWRT
           ATFOR
           FVLNR
       CRHE
         item
           CRID
           WERK
           BID
           ADRES
           TSTKZ
           CRSTAT
           KTXT
           MATNR
           MATXT
           INSPLOT
           BATCH
           DEST
           SCHED_START_DATE
           SCHED_START_TIME
        TLINES
          item
            CRID
            FTNO
            FVNO
            TDFORMAT
            TDLINE
    This is my XML Receiver Structure:
    msgType_ibatch_po
       TABLE1
         Statement
            CRHE
              action
              access
                CRID
                WERK
                BID
                ADRES
                TSTKZ
                CRSTAT
                KTXT
                MATNR
                MATXT
                INSPLOT
                BATCH
                DEST
                SCHED_START_DATE
                SCHED_START_TIME
       TABLE2
         Statement
            CRFT
              action
              access
                CRID
                FTNO
                FTTYP
                COSTR
                VORNR
                FTRNR
       TABLE3
         Statement
            CRFV
              action
              access
                CRID
                FTNO
                FVNO
                ATNAM
                ATWRT
                ATFOR
                FVLNR 
       TABLE4
         Statement
            TLINES
              action
              access
                CRID
                FTNO
                FVNO
                TDFORMAT
                TDLINE 
    How to resolve this problem ??? ...i believe the problem is in the action of Message Mappings ?? ...but have some problems to resolve it !
    Some one can Help me !!!
    Thanks Very Much for the atention !!
    Regards..
    Boni.

    Hi Bravesh...
    I don't have error in JDBC adapter !! This is OK !!
    When i send the message from XI to R/3 ...in SXMB_MONI it does not contain errors !
    When executing the application in the SXMB_MONI my status is processed successfully!
    But cannot insert the data in SQLServer Tables !
    Im Message Monitoring i have the erros:
    Error No "action" attribute found in XML document ("action" attribute missing or wrong XML structure)
    Error Exception caught by adapter framework: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure).
    thanks.
    Boni.

  • Performance problem in RFC to JDBC interface

    Hello everybody!
    i'm working whit SAP PI 7.1
    We defined some interfaces RFC - PI - JDBC (SQL server) but we have some performance problem.
    If we have many row to write on the table then interface finish in timeout :
    Synchronous timeout exceeded.
    Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessageExpiredException: Message 1d1f00b0-fecf-11de-8738-0015600446f0(OUTBOUND) expired.
    I read the PI tuning document and i tried to apply configuration whit Advanced Adapter Engine but whitout result.
    Now we want change the timeout in visual admin and maybe we solve the error but i'm asking myself....:
    It's normal that for write 1500 row in a table we need more than 4 minuts????
    It's possible accelerate this process??? After go live we will write messages whit more than 50.000 row.
    somebody may help me?
    PS: please no link to tuning guide or to notes (to increase the timeout parameter).

    This could be because your Database system (JDBC server) is taking more time to insert. The problem is not on PI side but on the receiving system side. Try inserting the same number od rows on the database server itself and check for the time taken for execution. Adding indexes on your database table solves the issue lot of times.
    Here PI is not the culprit but definitely  the receiver system.
    VJ

  • Reg error in interface mapping in RFC to JDBC scenario

    Hi Techies,
    Iam trying to map the scenario RFC to JDBC.
    In configuration window Iam testing the configuration.
    when Iam testing it is giving the error.
    " com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_mm_mapping_: Parsing an empty source. Root element expected! "
    My mapping is as follows
                       mt_receiver                    
                                                            statement               
                                                                ROW          
                                                     action---insert     
                 ZHRT002----
         Table     
         Item----
    access     
              MANDT               
              PERNR                                     PERNR
              PERID                            PERID
              SHOPN                           SHOPN
    Sender
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:ZTEST_PI_ZHRT002 xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
       <ZHRT002>
          <item>
             <MANDT/>
             <PERNR/>
             <PERID/>
    </item>
       </ZHRT002>
    </ns0:ZTEST_PI_ZHRT002>
    Reciver
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:mt_receiver xmlns:ns1="urn:sap-com:RFC2JDBC"><Statement1><ROW action="INSERT"><TABLE>ZHRT002</TABLE><access><PERNR></PERNR><PERID></PERID></access></ROW></Statement1></ns1:mt_receiver>
    Please give suggestion how to go about this.
    Thanks in advance,
    Regards,
    Kiran

    Hi,
    Please check the payload you are using to test the configuration.
    The structure seems to be Incorrect.
    Regards,
    Deepak

  • Can we able to create a scenario in XI like, RFC to JDBC

    Hello,
    I want to know whether  there is any way to create a scenarion like RFC to JDBC.
    RFC sends a rfc call with some parameters on sender side.
    JDBC stores the data in the receiver side.
    Thanks ,
    Prakash

    Hi Prakash,
    Step-by-step RFC to JDBC scenario:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/step%2bby%2bstep%2brfc%2bto%2bjdbc%2bscenario
    XI: How-to on JDBC receiver response:
    /people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response
    -Pinkle

  • 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

  • Czech letters in RFC- XI-JDBC scenario

    Hello experts,
    we want to transfer data to a database in a RFC->XI->JDBC scenario. Everything works fine, but when we transfer czech characters, we only see "?" in the database where a "Č" is expected. In the XI system the letters are displayed correctly (before and after mapping).
    How can we solve this problem? Is there any setting for this in the receiver CC?
    Best regards,
    David

    hi David,
    try using ![CDATA[]] in your mapping, i mean send value in to the target field as ![CDATA[ Č ]].
    Regards,
    Karna...

  • RFC-XI-JDBC Scenario: Help with RFC code

    HI,
    I am doing RFC-XI-JDBC Scenario, where I have to poll the contents of my Ztable in SAP to Oracle.
    The appraoach i am using here is :
    1. Created a FM with import parameters as the fields of my Ztable and without any  export parameter or source code.
    2. Created a report to call that FM in background. The code of my report is as follows :
    ************************REPORT***********************************************************
    Data:       it_zrfc_read_table type table of zrfc_read_table,
                wa_zrfc_read_table like line of it_zrfc_read_table.
    PARAMETERS: tab_name like DD02L-TABNAME.
    Data:       l_tabname type DD02L-TABNAME.
    At selection-screen.
    select single tabname from DD02L into l_tabname  where tabname = tab_name.
    if sy-subrc <> 0.
      message 'incorrect table name' type 'E'.
    endif.
    start-of-selection.
    select * from (tab_name) into corresponding fields of table it_zrfc_read_table.
    loop at it_zrfc_read_table into wa_zrfc_read_table.
    CALL FUNCTION 'ZRFC_READ_TABLE2XI'
    IN BACKGROUND TASK DESTINATION 'ORACLEGIS_RFC_SENDER'
      EXPORTING
        valve_id       = wa_zrfc_read_table-valve_id
        equnr          = wa_zrfc_read_table-equnr
        ernam          = wa_zrfc_read_table-ernam
        invnr          = wa_zrfc_read_table-invnr
        groes          = wa_zrfc_read_table-groes
        elief          = wa_zrfc_read_table-elief
        gwlen          = wa_zrfc_read_table-gwlen
        gwldt          = wa_zrfc_read_table-gwldt
        serge          = wa_zrfc_read_table-serge
        typbz          = wa_zrfc_read_table-typbz.
        endloop.
        commit work.
    NOw my problem is that although I am able to send a table with a single record, but when my records > 1, it is not able to poll.
    Please guide me what can be altered in the code or any other suggestion.
    Thanks,
    Puneet

    Hi,
    Instead of calling RFC many times I would:
    1) create RFM with only one import parameter
    TYPE your_table type
    2) call only once RFM in the report:
      CALL FUNCTION 'ZRFCNAME'
        IN BACKGROUND TASK
        DESTINATION 'RFCDEST'
        EXPORTING
          pt_table = i_table.
      COMMIT WORK AND WAIT.
    This will also improve the performance.
    Regards,
    Jakub

  • RFC-XI-JDBC testing is not working

    Hi,
    I created rfc-xi-jdbc. I created 2 dt, 2 msg types, 2 msg mappings, 1 msg interface(synchronous, abstract), 1 interface mapping.
    In the CD, I defined, 1 sender, 1 receiver agreement. 1 receiver, 1 sender determination, 1 interface determination, and two comm channels.
    My RFC destination is working fine. But in se 37 , when I execute the FM, and submit the RFC destination I am getting dump. Please tell me what causes this error.
    In the message mapping when I tested it (rfc-jdbc) mapping, it gets the action as "insert" and not getting table value. Is it supposed to get a table name? or not?
    Thanks. I appreciate your help.
    Raj.

    Michal,
    As I said I already have this zreport program. This is how I am calling:
    CALL FUNCTION 'Z_PA_DINERS_TXN'
         destination 'DINERSIM' *RFC Dest 4 sender adapter
           EXPORTING
                ID            = lw_id
                INIT_ZDINERS  = lw_delete
           TABLES
                IT_ERROR   = IT_ERROR
                IT_ZDINERS = IT_IM_ZDINERS.
         commit work.
    Is that correct? I didnot create any seperate program for this, I am using the existing program. Please advice on further steps.
    In the RFC destination, do I need to mention XI server params in the gateway server host and service? or my sending system's details?
    Thanks,
    Raj.
    Message was edited by: Raj Peddisetty

  • RFC- XI- JDBC- XI- RFC

    Hi All,
    Can we do RFC->XI->JDBC->XI->RFC scenario without BPM?
    In this SAP-RFC executed with SELECT and Table name
    And SAP-RFC expect data from JDBC connection.
    If not then what could be the expected steps of BPM?
    Regards

    Hi,
    Are you talking about a Sync call. I mean are the Sender and Receiver RFC are the same. If it is a Sync step you can do without a BPM.
    Like RFC will initiate the process the XI and the the data is selected from JDBC and the response is given back to RFC.
    If the above is not the case you can avoide using BPM by having to separate scenarios.
    1. Scenario 1 RFC --> XI --> JDBC
    2. Scenario 2 JDBC --> XI --> RFC
    If there are some dependencies or due to some constraints if you need to use BPM then you will have the steps like
    Receiver Async(RFC)Send Sync(JDBC)Send Async(RFC)
    Thanks,
    Prakash

  • ** RFC to JDBC scenario - Need not source code - Correct ?

    Hi Friends,
    I am doing RFC to JDBC scenario. It is a synchronous scenario. I think it is need not required to write any code in the source code tab of  RFC. Is it correct ...? (Only Import and Export parameters are enough.)
    Kindly reply, friends.
    Kind Regards,
    Jeg P.

    Hi,
    RFC needs only configuration and we  will call remote method in R/3. Actual logic present in R/3.
    Thanks,
    RamuV

  • RFC to JDBC Scenario, Date Transformation error

    HI All,
    I am trying a RFC to JDBC scenario where I am taking date from SAP in SAP Format i.e. 'yyyy-MM-dd' & sending this to oracle DB Where the format is 'MM/dd/yyyy'.
    In Runtime Workbench I am getting Following error: 'java.sql.SQLException: ORA-01843: not a valid month'.
    Can anybody help me on this.
    Thanks & Regards,
    Ruchi Agrawal

    Hi Bhavesh,
         The Date Problem is Solved. It is Working fine with your UDF code. There were some small changes in your UDF.
    Here is the modified code:
    String b="";
    try
    java.text.SimpleDateFormat sdf= new java.text.SimpleDateFormat("yyyy-MM-dd");
    java.util.Date date = sdf.parse(a, new java.text.ParsePosition(0));
    java.text.SimpleDateFormat sdf1= new java.text.SimpleDateFormat("dd-MMM-yy");
    StringBuffer sb = new StringBuffer();
    sdf1.format(date, sb, new java.text.FieldPosition(0));
    b=sb.toString();
    catch(Exception e)
                                                  e.printStackTrace();
    return b;
    Thanks,
    Ruchi

Maybe you are looking for

  • Final cut express hd won't open

    i was trying to render some video while monitoring the footage through my dv cam and then on to a tv screen. as has happened before, the camera cut out and the warning for removing hardware came up. the ext hard drive had also gone off and the video

  • Filtering of messages in PI

    Hi, This is a master data push scenario where i am sending data from SAP to Ariba through PI. i have a case where in a particular namespace i need to make sure the message is not passed through based on the value in a particular field in SAP. How do

  • How to create a dynamic page from a parameter table at runtime?

    I have a table which has the information of item names,types,default values of an input form. Is it possible to create a dynamic page at runtime from these parameters? I saw htmldb_item but what i need is something like attaching athis input form to

  • How to specify alias for local filesystem in JBOSS

    hi, I want to specify alias for localfilesystem in JBOSS. I know how to do it in Apache_2.0.52-Openssl_0.9.7e-Win32. In this we can specify alias as, Alias /icons/ "C:/Program Files/Apache_2.0.52-Openssl_0.9.7e-Win32/icons/" in httpd.conf and futher

  • Lightroom 3 freezing on mac

    lightroom3 is freezing and slow- this just started. I am on mac 10.6.8. I have a project due this weekend and can't work on it at all right now An y ideas?