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

Similar Messages

  • ** 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 - SYSTEM_FAILURE exception comes - urgent help

    Hi Friends,
    I have completed RFC to JDBC scenario. When execute RFC in the system, it throws an exception SYSTEM_FAILURE. What could be the problem ..?  The message is not entered into SXMB_MONI. In the backend system itself, it throws error.
    Kindly reply, friends.
    Kind Regards,
    Jeg P.

    Hi Jeg,
    Check out if u get any info/help in the thread below .. Henrique Pinto's reply and others to this thread.
    How to make Real Time connectivity between R3(RFC) Sender and XI
    File Adapter: SYSTEM_FAILURE_INTERNAL
    More details regarding this exception:
    http://help.sap.com/saphelp_nw04/helpdata/en/22/0425e0488911d189490000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/a2/a002416225f023e10000000a155106/frameset.htm
    kanan

  • 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

  • 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

  • RFC to JDBC Scenario ( Error in Date Transformation ) Urgent!!!

    HI All,
             I am trying a RFC to JDBC scenario where I am taking date from SAP in SAP Format i.e. 'yyyyMMdd' & 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'.
            Also when I am testing that source message in message mapping source date is converting to some other date at receiver side.
            Can anybody help me on this.
    Thanks & Regards,
    Ankur

    Hi Suraj,
      I am using the datetrans function of graphical mapping for doing the transformation. I have specified the source format as 'yyyyMMdd' & the target format as 'MM/dd/yyyy'.
      I have checked the input & output XML structure, but still i am getting the same error of Not a valid Month.
      Value of date I am passing is '2006-05-17' & the output I get is '05/12/2005' in Message mapping test using the XML which we are getting from SAP in MONI.
    Regards,
    Ankur

  • RFC 2 JDBC scenario

    Hi,
    I am trying a RFC to JDBC scenario wherin i am insertin records into Oracle Database.
    I am testing the scenario from XI RWB.
    While testing i am getting error that tables doesnot exists.
    " JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'QSTAG_DO_BR' (structure 'Statement'): java.sql.SQLException: ORA-00942: table or view does not exist  ".
    But i checked it in the database and the tables do exists in the database.
    plzz help.
    Regards,
    Deepak Shah.

    Hi Deepak,
    chk that u have given the table correct and even for the jdbc connection
    chk this link it will be helpfull
    Calling stored procs in MaxDb using SAP Xi
    Regards
    Sampath

  • Jdbc to rfc to jdbc scenario is not working

    Hi...
    We have done the JDBC to RFC to JDBC scenario using BPM, it was working fine in the last month. now we started testing the same scenario, that is not working. In SXMB_MONI it is showing only sender data is successful, it is not showing any RFC Receiver data & Jdbc Receiver data. in the CCM also Jdbc Sender CC is showing successfull and it is showing the successful messages also, but in RFC Receiver CC
    & JDBC Receiver CC it is not showing any thing.
    please help on this...
    Regards,
    Pasi.

    Hi
    Check u r RFC response (put external break point)
    and check wether it has data
    rgds
    srini

  • 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**********

  • 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...

  • How to monitor RFC to JDBC scenario?

    How to monitor RFC to JDBC scenario
    Hello,
    I have update_insert scenario from RFC to Oracle database.
    In TOC SXMB_MONI I have black and white flag.
    In RWB I found for this scenario only successful status.
    But in the database I found only 2 records from the 15 that I sent.
    How can I monitor this problem?
    What are the steps to investigate this situation?
    Have a way to see the exact statement that I sent to the database?
    Regards
    Elad

    Hi Elad,
    If nothing can be seen in the Adapter monitor...go to the Database.
    Oracle has various developer\system tools that can allow you to get information.
    For example Oracle has the TOAD tool which allows you to get the SQL trace of the treatment the XI actually send.
    see if the SQL interpreted by the JDBC adapter was really what you meant.
    Good luck.
    Nimrod.G

  • Reg RFC to JDBC scenario

    Hi Techies,
    This is inregard of RFC to JDBC Scenario.
    Iam having an old RFC to JDBC scenarion which is working fine.
    I want to call other BAPI programme using the same RFC connection.
    I have changed  BAPI and ABAP Programmes.
    But Still in my integration builder, Still the RFC is calling the old stucture.
    How flush the buffer and call the new structure using the same RFC.
    Regards,
    Kiran

    But Still in my integration builder, Still the RFC is calling the old stucture.
    what about the RFC structure that is imported in IR/ ESR....was it re-imported?

  • Can you help with the code to publish Flash to my own domain.

    Thank you for your help, I publish the my site to my own domain, I do not use .Mac, I tested your code and ity works well on .Mac, can you help with the code to publish to my own domain.
    Thank you again

    You appear to have just collected a variety of code snippets and thrown them together, including a section of AS2 code ( gage.onRelease = function() {... )
    The suggestion I offered yesterday still stands.  You should find a tutorial regarding AS3 and the atan2 function.  Beyond that, what you show suggests this is a school assignment.  You should seek help from your fellow students and instructor if that is the case.

  • I need help with this code error "unreachable statement"

    the error_
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errors
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    public class Tools//tool class
    private int numberOfToolItems;
    private ToolItems[] toolArray = new ToolItems[10];
    public Tools()//array of tool
    numberOfToolItems = 0;
    for(int i = 0; i < toolArray.length; i++)//for loop to create the array tools
    toolArray[i] = new ToolItems();
    }//end for loop
    }//end of array of tools
    public int search(int id)//search mehtod
    int index = 0;
    while (index < numberOfToolItems)//while and if loop search
    if(toolArray[index].getID() == id)
    return index;
    else
    index ++;
    }//en while and if loop
    return -1;
    }//end search method
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0;
    int index;
    index = search(id); <-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    }//end delete method
    public void display()//display method
    for(int i = 0; i < numberOfToolItems; i++)
    //toolArray.display(g,y,x);
    }//end display method
    public String getRecord(int i)//get record method
    // return toolArray[i].getName()+ "ID: "+toolArray[i].getID()
    }//end getrecod
    }//end class
    Edited by: ladsoftware on Oct 9, 2009 6:08 AM
    Edited by: ladsoftware on Oct 9, 2009 6:09 AM
    Edited by: ladsoftware on Oct 9, 2009 6:10 AM
    Edited by: ladsoftware on Oct 9, 2009 6:11 AM

    ladsoftware wrote:
    Subject: Re: I need help with this code error "unreachable statement"
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errorsThe compiler is telling you exactly what the problems are:
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0; // <<== HERE you return, so everyting in the if block after this is unreachable
    int index;
    index = search(id);  //< -----------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    // <<== HERE where is the return statement?
    }//end delete method
    public String getRecord(int i)//get record method
    // return toolArray.getName()+ "ID: "+toolArray[i].getID() <<== HERE you commented out the return statement
    }//end getrecod
    }//end class

  • Need help with WMI code that will send output to db

    'm new to WMI code writing, so I need some help with writing code that we can store on our server. I want this code to run when a user logs into their computer
    and talks to our server. I also want the code to:
    * check the users computer and find all installed patches
    * the date the patches were installed
    * the serial number of the users computer
    * the computer name, os version, last boot up time, and mac address
    and then have all this output to a database file. At the command prompt I've tried:
    wmic qfe get description, hotfixid
    This does return the patch information I'm looking for, but how do I combine that line of code with:
    wmic os get version, csname, serialnumber, lastbootuptime
    and
    wmic nicconfig get macaddress
    and then get all this to output to a database file?

    Thank you for the links. I checked out http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx and
    found lots of good information. I also found a good command that will print information to a text file.
    Basically what I'm trying to do is retrieve a list of all installed updates (Windows updates and 3rd party updates). I do like that the below code because it gives me the KB numbers for the Windows updates. I need this information so my IT co-workers &
    I can keep track of which of our user computers need a patch/update installed and preferably which patch/update. The minimum we want to know is which patches / updates have been installed on which computer. If you wondering why we don't have Windows automatic
    updates enable, that's because we are not allowed to.   
    This is my code so far. 
    #if you want the computer name, use this command
    get-content env:computername
    $computer = get-content env:computername
    #list of installed patches
    Get-Hotfix -ComputerName $computer#create a text file listing this information
    Get-Hotfix > 'C:\users\little e\Documents\WMI help\PowerShell\printOutPatchList.txt'
    I know you don't want to tell me the code that will print this out to a database (regardless if it's Access or SQL), and that's find. But maybe you can tell me this. Is it possible to have the results of this sent to a database file or do I need to go into
    SQL and write code for SQL to go out and grab the data from an Excel file or txt file? If I'm understanding this stuff so far, then I suspect that it can be done both ways, but the code needs to be written correctly for this to happen. If it's true, then which
    way is best (code in PowerShell to send information to SQL or SQL go get the information from the text file or Excel file)?

Maybe you are looking for

  • How to sync purchased movie on apple tv to itunes

    I had purchased a movie on my Apple TV but it will not sync to my itunes on my computer. I see it on my iPad 2 but it will not sync to iTunes. If I delete it from my iPad, it will be gone forever. How can I get this to back up to my computer?

  • ITunes stops working when it's not the active window and connected to the internet

    Hi, I have a problem with iTunes where it crashes, only when the wifi is on and connected to a network. Usually it occurs when I click onto another application outside of iTunes. I've tried reinstalling both iTunes and the Apple Application Support b

  • Clearing alerts in Oracle 10g

    I have several alerts in the Oracle 10g Enterprise Manager which I have already catered for. Is there a way to clear these alerts??

  • Creative Cloud won't download apps

    I downloaded the creative cloud app and launched it.  It loads, but never shows any apps to download.  It's just a white application box with no content.  I went to my account through Adobe, clicked on Desktop and selected download for Photoshop from

  • Can I have a live desktop with my todo list?

    What I would love: a live desktop with my todo list If I make a change or amendment, then my desktop gets changed In Windows a few versions ago, you used to be able to have a web page as the desktop - but I dont think its possible now Is there a way