One adaptive RFC Model and Multi Backend System.

Hi All,
I am trying to fetch data from multi backend system by using an adaptive RFC model.
It is not tidy to create multi model for a RFC function to fetch data from multi SAP system, because we have dozens of SAP systems.(over 40)
So, I would like to switch to multiple SAP systems with an adaptive RFC model at runtime.
  1 model(Same Function) -
> System A
> System B
> System C
Is there any sample or tutorial about this sort of senario?
Thanks in advance.
Message was edited by: JeongEog IM
Message was edited by: JeongEog IM

JeongEog,
You may use SAP java Connector for doing that. Refer the following links for the step-by-step approach.
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/561106b8b3bc449f890cddfdc8d3e2/content.htm">Example program 1</a>
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/f0/eedf3d0eb8af5ee10000000a114084/content.htm">Open Connection</a>
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/24/efdf3d0eb8af5ee10000000a114084/content.htm">Calling a Function and Closing a Connection</a>
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/14e13d8ee4535ee10000000a114084/content.htm">Example program 2</a>
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/eedf3d0eb8af5ee10000000a114084/content.htm">Connection Pool</a>
Bala

Similar Messages

  • Adaptive RFC Model - disconnectIfAlive()

    Hi,
    In my Web Dynpro application, I am using Adaptive RFC model and executing the RFC as below
    ZRfc_Test_Input input = new ZRfc_Test_Input();
    // set input
    input.setParam1("xxx");
    input.setParam2("xxx");
    input.execute();
    My application works fine for couple of days and suddenly I get an error that
    "com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException:Could not create JCOClientConnection for logical System: WD_TEST_MODELDATA_DEST - Model: class com.test.TestModel. Please assure that you have configured the RFC connections and/or logical system name properly for this model!"
    Our basis guys are unable to figure out why the SLD is misbehaving suddenly. If we restart the SLD, everything will be fine for next couple of days.
    I just want to make sure that it is not happening due to my application or due to the way the RFCs are being executed.
    After I execute my model, do I have to explicity disconnect the connection using below statement?
    <b>input.modelInstance().disconnectIfAlive();</b>
    Do I have to do this even when I am using Adaptive RFC model?
    Default min and max number of connections are used while creating JCO destinations.
    Appreciate your input.
    Thanks
    Kumar

    Hi Siva,
    >>> It is always better to close the connection after executing the RFC<<<
    Thanks for the response. I am sorry for being adamant, I agree that it would be nice to disconnect but IS IT MANDATORY? If the pool size is increased appropriately, doesn't web dynpro runtime takecare and disconnect the connections after the execution.
    In SAP tutorials and help.sap.com (at least the ones I have gone through), it is never mentioned any where that one MUST close the connections EXPLICITLY after the execution. All these days I am under the impression that it is not needed for Adaptive RFC models. I may be wrong.
    Could you please confirm if we should close the connections explicity?
    Thanks
    Kumar

  • Problem in displaying a field in webdynpro using Adaptive RFC model

    HI,
    I created a webdynpro application using adaptive RFC model and i have a problem in displaying one of the output fields.
    When i execute the function module it is giving the exact value for my output field in this case telephone number (of type STEXT which is char with length 40).But when i am trying to display that telephone number in webdynpro application it is taking only first 4 digits.
    i deleted the model and recreated it still it doesnot work.
    please let me know how to resolve it.
    points will be awarded for sure
    Bala

    Hi Bala,
    Whenever you reimport the model server restart is necessary otherwise the changes will not get reflected. You will get an error when you deploy the application.There is no go around except restarting the server as the meta data gets cached in the server as long as the server is runnig.So, Once you restart the server the cache will be cleared.
    Check once again whether you are fetching data from correct BAPI field. Still problem persist try debugging.
    Regards, Suresh KB

  • How to set the tables parameter to a BAPI using adaptive RFC model

    Hi,
    I have a BAPI ZBAPI that has a tables parameter ZPernr of type ZTable with two elements pernr and name.
    I used adaptive RFC model and created model classes for the BAPI.
    My question how do i set list of pernr and name to the tables parameter in the webdynpro for java.
    I have the following methods available
    ZBAPI input = new ZBAPI();
    1.ZTable table = new ZTable();
    table.setPernr(pernr);
    table.setname(name);
    input.addZPernr(table);
    how do i set the table parameter for multiple pernr and name
    2.
    add all the pernr and name to list and set that list to input in the following way
    input.setZPernr(list) and list of typecom.sap.aii.proxy.framework.core. AbstractList
    out of two methods mentioned which one is correct.
    Please let me know the solution
    Thanks
    Bala Duvvuri

    Hi Bala,
                In your code:
    List pernrList = new ArrayList();
    pernrList  should be declared as the  type of class HROBJECT   ( The structure name in the model  e.g. the node PERFWARN type is Zhrecmfm_002_Perfrat_Warning_Input )
    Try this:
    HROBJECT  pernrList = new HROBJECT();
    pernrList.setPernr(pernr);
    input.setPernr_List(pernrList);
    // call BAPI execute method
    If you want to pass list of pernrs, you can pass in alternate way
    IPrivate<viewname>.I<nodeame>Node prNode = wdContext.node<node>();
    IPrivate<viewname>.I<nodeame>Element prEle;
    for (int i = 0; i < table.size(); i++) {
    HROBJECT  pernrList = new HROBJECT();
    pernrList.setPernr(pernr); // Set the pernr from current record
    prEle = prNode.create<nodeame>Element(pernrList);
    prNode.addElement(prEle);     
    // call BAPI execute method
    Once I execute the BAPI how do i iterate thru second table parameter PERNR_PERFRAT to get pernr and performance rating text
    Say your node name is  PERNR_PERFRAT
    for (int i = 0; i < wdContext.nodePERNR_PERFRAT().size(); i++) {
    wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPernr();
    wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPerfrat();
    Regards,
    Siva

  • Dynamic JCo Connection with Adaptive RFC Model 2

    Hi gurus,
    I'm trying to dinamically change a model data connector inside my web dynpro. I'm using an Adaptive RFC Model 2 to communicate with the R/3 backend. I've found that is possible to change the connector modifiyng the code inside the web dynpro. In detail I've found this example:
    IWDDynamicRFCModel model1 = (IWDDynamicRFCModel) WDModelFactory.getModelInstance(Model1.class);
    I put this code into wdDoInit method but I get the following error:
    "<comp_name>.wdDoInit failed to create or init instance of model 'model_name' in scope NO_SCOPE with instanceId 'null'"
    Furthermore I've used the deprecated Adaptive RFC Model and when I instantiate a model, ModelName m=new ModelName(), I see that the methods m.setJcoClient(client) and m.setSystemName(systemName) are visible, while when I try to do the same with Adaptive RFC Model 2, with my model m, the methods before there aren't.
    So this is my question: is it possible to change data connector dinamically with Adaptive RFC Model 2?
    Thanks a lot

    Dear Lukinho,
    You may try this ;
    try {
    IWDJCOClientConnection clientCon =  WDSystemLandscape.getJCOClientConnection("<name of the JCO connection>");
    String clientName      = clientCon.getClientName();
    String lang          = clientCon.getLanguage();
    String passowrd          = clientCon.getPassword();
    String sysID          = clientCon.getSystemIdentifier();
    String user          = clientCon.getUser();
    //etc...
    } catch (WDSystemLandscapeException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    I got this code from the thread   [Multiple Client Logon in JCO   |Re: Multiple Client Logon in JCO;
    Also have a look at this thread
    [JCo Destination   |Re: JCo Destination;
    Hope it helps!!
    Warm Regards
    Upendra Agrawal

  • Adaptive RFC Model vs. Adaptive Web Services Model

    Hi All,
    I would like to compare Adaptive RFC Model and Adaptive Web Services Model
    What are pros and cons ? What kind of data can be transferred in both models?
    Is there any literature out there (I don't mean tutorials on usage, I've seen those)?
    Thanks, Johannes

    Hi Johannes,
    Go through below help documents.
    Adaptive Web Service Model:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b04308ed-62d5-2910-b3a6-c26771b1c78e
    Do and Don't with Adaptive RFC Model:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de
    Benefits and important infomation about the Adaptive Webservice model:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7
    Once you go through the above mentioned documents, you will understand which one to use in which scenario.
    Thanks
    Krishna

  • Exception with Adaptive RFC Model: WDDynamicRFCExecuteException

    Hi All,
    I have created an Adaptive RFC Model and called the RFC in my Coding the standard approach that used to work before. Now, I keep receiving the following exception when executing the modelObject.execute() Method.
    com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException
    Does anybody know what going on? I am calling an RFC that works well and has been able to be called as an RFC before...
    Is this somemthing related to the framework? Do I need a supprt package or so? Am I doing soemthing wrong?
    Thanks, Johannes

    Hi,
    Place a break point in the BAPI in SAP and try to execute the application and see if the break point is triggered and check what is the output value passed back to  the application.  If this works fine then there should be no issue in the RFC side, else need to find out what is happening in the webdynpro application side.
    Regards,
    Manjunath

  • Changing the default logical system names for adaptive RFC models

    Hello,
    When I create an Adaptive RFC model the dialog that asks me to specify the model name, package, source folder, etc. has default values in the "Default logical system name for model instances" and "... RFC metadata".
    I know I can type in another name there but I'd like to change the default name to something that fits our naming conventions. Can I change that? If so, can someone tell me where?
    Thanks in advance!
    David.

    Suresh,
    Thank you for your response. However, that is not what I was looking for. Sorry if my post was not clear.
    I knew that I could change it AFTER the import. I also know that I can type in something else besides the default DURING the import.
    What I am asking is if there is a way to change some configuration setting so that the 'default' that comes up in the drop down DURING the import is something different than what comes 'out-of-the-box' with NWDS.
    Hope that clears up what I'm looking for.
    David.
    Message was edited by:
            David Z. Pantich

  • Creating Adaptive RFC model without logon name and pwd?

    Hi All,
    I have this requirement where when I log on to an application I need to get a mapped user name and pwd from EP and then connect to the R/3 system.
    However, you cannot create a Adaptive RFC model without username and password. So i needed to know if this can be done in some other way.
    Thanks,
    Malita

    hi
      To my  understading , you need  user and pwd created  for your portal and  call the RFC or Bapi .
      Hope this is possible . 
      Creating  the  users and pwd for the portal  for  your application  is possible , but parallelly
      calling the RFC with same user name and pwd  i hope its not , as you have to deploy the application
      which created the userid and pwd , then call the RFC ,
       and for more you can provide more information what exactly is your requirement .

  • SAP R3 Conector System at the Adaptative RFC model

    Hi folks!
    We´ve generated a Web Dynpro project using the Adaptative RFC model. When running the application we get the exception:
    com.sap.dictionary.runtime.DdException: at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker$1.fillSldConnection(DataTypeBroker.java:89)
    This surely happens because we haven´t defined the SAP R3 connector system:
    Could someone please show us how to do this?
    We are using SAP R3 Dedeicated connection, should we use the SAP R3 ConnectionString? At least, we need to know which is the Gateway Host, the SAP R3 machine or the J2EE WAS one? Is the other the Application Server Host? What would be the Gateway Service?
    In the other hand, at defining the RFC Destinations on the SAP R3 server, we´re using the "Registered Server Program" Activation Type. Is this correct? When testing the connection, it fails because the program is not registered at the server.
    Thanks in advance.

    Hi Bernanrdo,
    I have given answer to your another post.
    Just look at that. It will help you.
    Regards,
    Bhavik

  • Adaptive RFC model connectivity to SAP R/3 4.6 B

    We are developing a new webdynpro application which uses the backend R/3 version is 4.6B using Adaptive RFC model.
    We are able to connect to Web As systems without any issues but getting error messages while creating the Adaptive RFC model to R/3 4.6 B system as backend.
    Appreicate your help.
    Message was edited by: Udaya Chada

    Hi ,
    I think SLD,s/w Catalog and Creating Logical Systems were Configured,
    Go through the Following Steps Like,
    -- General Data, Enter the Client of the System and Client No. (JCo Connection is Pointing to)
    --J2EE Cluster, Select the J2EE Cluster you wish the JCo destination to be assigned
    -- Select the Destination Type, Either Application/Dictionary data
    -- Appl.Server, You may only select Servers/Logon Groups From the Drop down list that have first been defined as technical Systems in SLD.
    -- Message Server, Application Data JCo destination is connected must have atleast one logon group.( if this is not done ,use SMLG transaction code to create in SAP System)
    --Security, If you have selected connection Type as Application Data , then in the Security Screen you would appear Authentication Techniques and select a appropriate one .
    if you have selected connection type as a Dictionary meta data then provide User Name and Password
    If this is useful to you ,don't forget to award Points
    --Venkat

  • Error while creating a Adaptive RFC Model

    Hi all,
    I am trying to create a Model using a Adaptive RFC Model, I assign a Model name and the logical system names, enter the details in SAP Logon Information for the Single server,here it gives me a Gateway error. What could be the issue here?
    NB: In the Host Name , I tried with both the Host name of the r/3 server and also with the SAProuter string ( as we have the server at other place) ,still it doesnt work. and I am able to login to the R/3 system from the SAPLogon GUI from my desktop normally.
    Is there any issue of the firewall related to this, if so whats the port number that should be opened so that i can connect to the r/3 system get the list of BAPIs present there into my Webdynpro application .
    Need help on this
    Regards,
    Vijay

    Hi Lohi n Gopi ,
    I have checked out with the your given suggestion of trying with the host name as well as  IP address and also typing all the details,without copy pasting the details . In both the cases it gave the " Connect to gateway failed " error mesg.
    But one intersting thing here that i observered when trying with hostname, IP address, or SAProuter string is as follows .
    <b>with IP address</b>
    <i>Connect to SAP gateway failed
    Connect_PM GWHOST="ipaddress",GWSERV=sapgw10,ASHOST="ipaddress",SYSNR=10
    LOCATION CPIC(TCP/IP) on local host
    ERROR      patner not reached(host "ipaddress",service=3310)</i>
    <b>with SAProuterString</b>
    <i>Connect to SAP gateway failed
    Connect_PM GWHOST="SAProuterString",GWSERV=sapgw10,ASHOST="SAProuterString",SYSNR=10
    LOCATION SAPRouter on " some HostName"
    ERROR      hostname unknown</i>
    <b>with HostName</b>
    <i>Connect to SAP gateway failed
    Connect_PM GWHOST="hostname",GWSERV=sapgw10,ASHOST="hostname",SYSNR=10
    LOCATION CPIC(TCP/IP) on local host
    ERROR      hostname "hostname " unknown</i>
    Is there any firewall port blocking issue here ?if so , whats the port that needs to be opened ?
    Appreciate your help.
    Thnks,
    NR

  • Importing adaptive RFC model in NWDS CE 7.1 doesn't work

    Dear all,
    I am unable to create an adaptive RFC model in my Web dynpro DC in NWDS CE 7.1.
    This is what happends:
    I select create model from the web dynpro, fill in name and jco destinations on the first page and move to the second page where I fill in SAP login information.
    After clicking next I come to "Select RFC modules", but I never see the studio logging in to the server system. The result is that I dont find any function modules when i click search.
    I am new to NWDS 7.1 so I suppose there is a setting that I have missed.
    Have anyone else experienced the same problem and solved it?
    I currently have an old SAP system (NW04) and a new system (NWCE7.1). On my PC I have installed NWDS 04 and NWDS CE7.1. The old studio can connect to both the new and old backend system just fine but the new studio cant connect to any of them.
    I am very grateful for any help or pointers in the right direction.
    Sincerely,
    Richard Linnander

    Never mind. I solved this myself.
    It was caused by DLL-hell. I was running an old version of librfc32.dll that was for NWDS 04. Works fine with the version that comes fresh with install of NWDS CE 7.1

  • Error in Import Adaptive RFC Model

    Hi SDN,
    I am trying to develop an application using Import Adaptive RFC Model, while creating a model i could not able to connect to the backend system after giving the single server parameters. When i click on the next button a pop up is displayed with an error message *"User Name or Password wrong" *.
    But i could able to login to R/3 with the same userid and password from SAP logon pad.
    Really i am at Six and Seven's to trace out this error. Please suggest me how to overcome this error and create the model succesfully.
    Regards
    Basha

    Hi Praveen & Chaitanya
    Thanks for your quick response and informative threads.
    Actually in order to import an adaptive rfc model
    I have right clicked the model node to create a model and given the model name,package name,model data and metadata names and clicked next button. Then in the next screen
    Tab Strip -> Single Server:
    Host name :
    System Number :
    client details:
    Tab Strip -> Load balancing:
    System :
    Message Server:
    System Name:
    Group:
    (in Tcode: SLMG i have added the group public also)
    client details:
    After entering the required details either in Single Server or Load balancing and clicked the next button  I could not able estabilish a connection to the backend R/3 and get the list of Bapi's or RFc's. Instead i am getting a pop up message "User Name or Password Wrong". I could not able to proceed from here.
    But with the same above parameters i could able to logon to R/3 from SAP Logon Pad. I have tried by giving the user name in Cap's and small letters but no use.
    As i was strucked at the intial step while creating the model but not during the execution of the program, as far as my knowledge is concerned i think we no need to worry on SLD or JCO connections during the creation of the model. Please correct me if i am wrong and suggest me to rectify the error.
    Regards
    Basha

  • Problem with Adaptive RFC Model.

    Hi.
    I have a problem with creating an Adaptive RFC Model.
    When i choose a function from function list, that appears, and click next, the model wizard display log information with following text:
    <b>[Warning]:     Creating a connection with Metamodel language <en> failed.  Continuing with language <ru>
    [Fatal]:     com.sap.mw.jco.JCO$Exception: Missing R3NAME=... or ASHOST=... in connect_param in RfcOpenEx
    [Info]: .................</b>
    The SLD server and SLD bridge is running.
    How this can be fixed?
    Thank you.

    Hi
    Open SAPLogon. Select the server profile say "Dev" and click on groups. In the window that appears enter the 3 letter id as System id. This you would get when you logon to SAP and see the right hand bottom corner. It would be a 3 letter "XXX". If not ask your basis administrator.
    In the Message server space enter the Hostname or ip address (try both in case one of them doesnt work) of your R/3 server. Click on Generate List. You should get some groups appearing in the view below.
    If it works then your message server is working fine. Let me know if that helps you.
    regards
    ravi

Maybe you are looking for