Execute a RFC-Model in another WD-Project

Hi everybody,
my purpose is to execute a RFC-Model in an other WD-Projekt in order to use the result node.
WD-Project(A) -references-> WD-Project(B)
WD-Project(A) executed the RFC-Model in WD-Project(B) which is only used by WD-Project(A) .
I provide an execute method in Interface Controller in WD-Projekct(B) but if i call it from WD-Project(A) i get no result! in my context node? But if i start the WD-Project(B) as standalone it works properly.
Unitl now i thought that calling a method of another Interface-Controller will start the hole application, in this case WD-Project(B).
What is my mistake?
regards,
Sid

Hi,
Check whether you have defined the usage of project(B) in project(A) correctly. Also check the lifecycle for the controller of project(B).
Check this [Link|http://help.sap.com/saphelp_nw70/helpdata/EN/89/b21640dc88e769e10000000a155106/content.htm]
Hope it helps.
Regards,
Manoj

Similar Messages

  • Call to RFC model

    I need to call the method execute() of RFC model in my webdynpro inside a task.
    Input Parameters of abapi are in the context of webdyinpro  that is mapped to BPM context. The problem is that when i run abapi inside wdDoInit() method of webdynpro , the context of webdynpro not yet  initialized.
    What webdynpro method i must use to run my abapi???

    The issue is that the usage of embedded components comes with a few caveats you need to be aware of. E.g. the following:
    Using Web Dynpro component usages at runtime, data is set to Web Dynpro context elements at a certain point of time in the Web Dynpro componentu2019s lifecycle. Consequently data processing of data that is set from an outside (loader) Web Dynpro component, for example from the process desk, should be done afterwards. Referring to the hook methods of a Web Dynpro component, this is after the component controlleru2019s wdDoInit() method.
    Source: http://help.sap.com/saphelp_nwce711/helpdata/en/48/cae1791e774da5e10000000a421937/frameset.htm
    Hence, the WD context has not yet been injected from the outside in the wdDoInit() call.

  • Export of RFC Model to Java Project DC ?

    I've got a Web Dynpro project where I used the Wizard to import an RFC Model. Now my client has this requirement that all Web Dynpro Models should be based on Command Beans that reside inside their own separate java DCs.
    My question : is it possible to export my RFC Models packages and folders (along with my other Model classes) to a java DC project - to be later reimported back into the Web Dynpro project ?
    Thanks for any input on this

    Hi Romeo,
          To answer your question first there is no standard supported way in which  you could expose RFC Model in seperate Java DCs.
    If the question is just to have the classes (proxy) created for RFC to connect to r/3 and get the data then you could use SAP Enterprise Connector, but i would not recommand that as you loose out the complete declarative way of using RFC and so called CMI Model support for Web Dynpro.
    Secondly if RFC Model which you are planning to expose as part of java dc has to be consumed in Web Dynpro then i do not understand the need why some one will require to expose the RFC Model in Java DC and the inherit concept of RFC Model is related to Web Dynpro and not with normal Java DC thus its a matter of choice do you want to use plaiin java classes without Model driven approach or more declarative way as in case of Web Dynpro.
    Thanks

  • Use webservice models from another DC

    Hi Experts,
    I am trying to develope a Web Dynpro Java application according to the best practice tutorials from sdn.
    So firstly I created a DC (model DC) in which I created the required models (adaptive rfc and webservice). Then I added these models to the public part of the DC.
    In the next step I created another DC, the "model component DC", and added the models from the public parts of the "model DC" to the Dependencies of this DC. After this I added the models to the "Used Models" folder of the "model component DC". Till this point everything seems to work - every model (rfc and webservice) appears under "Used Models". But when I try to create a service controller for the models I only can choose between the rfc models - the webservice models are not available. Even trying to code a service controller on my own leads to syntax errors.
    When I add the web service models under the "Models" folder I can select the models for a service controller without problems. But as this project is for my thesis I want to create this application according to the best practices.
    Hope anybody can help me with this.
    Thanks and regards,
    Michael

    Personally, i would
    create a seperate DCs for all the webservices,
    create some plain java EJBs in src folder,
    write certain methods to consume these webservices
    and then create public parts of those EJBs.
    consume the public parts.
    It becomes easier to maintain and since one w/s may be consumed in multiple DCs, it saves me time to import reimport the model in all Dcs and make changes in only one EJB instead of all places where i consume it.
    I am using this approach.
    Regards,
    Nitin

  • 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

  • Error while using Adaptive RFC model

    I am  using adaptive RFC model to consume a function module from BI system. The function module expects a Boolean input. While executing the function module we need to give u2018Xu2019 for that input. When I consumed the function module in the webynpro java project , used it and give the input as u2018trueu2019 on runnig the application it gives the following error: u201Ccom.sap.conn.jco.ConversionException: (122) JCO_ERROR_CONVERSION: Cannot convert a value from type java.lang.Object to CHAR at field I_READ_ATTRu201D
    There is corresponding dictionary type created called u2018BOOLE_Du2019 but I could not access the dictionary type in the controller java file.
    Is there a way to rectify the same or any workaround condition?
    With regards,
    Sougato.

    Hi saurabh,
    I need to give the value from webdynpro. Hers is the sample code.
    rssem_Cha_Values_Get_Input.setI_Read_Attr();
    // It expects a boolean value but if i pass a value to the method the obove error is show.
    Where as there is a simple type "Boole_d" generated when i consumed the RFC in the webdynpro.
    but i couldn't access this simple type in the code.
    With regards,
    Sougato.

  • Error while creating adaptive RFC model

    Dear All,
    I am trying to create Adaptive RFC model by  which i can fetch data from R/3 trough BAPI and display on the webDynpro UI.
    I am getting error
    Exception: org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
    JCO.nativeInit(): Could not initialize dynamic link library librfc. Found version "640.0.55" but required at least version "640.0.76".)
    Kindly suggest.
    Thanks
    Ashish

    Hi,
    Check this link....
    com.sap.mw.jco.JCO$Exception (104) RFC_ERROR_SYSTEM_FAILURE

  • How to find out the destination of an "Adaptive RFC Model - DEPRECATED"

    Hi All,
    How to find out the destination of an "Adaptive RFC Model - DEPRECATED" of an running application
    and Where is the destination created in the server .
    I have got the code of the running project from NWDI .
    Thanks in Advance
    Regards
    Piyas Kumar

    Hi,
    I am not sure I fully understand the question, but as per the guide
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50f7192d-2808-2d10-189b-df3fa5f71abf
    Excerpt from Page 7
    Caveat Confector!1
    ARFC1 destinations were created using the Web Dynpro Content Administrator tool. This tool is
    still available for compatibility reasons, but the destinations it creates are not used by ARFC2
    models!
    Instead, you should use the u201CDestinationsu201D tool found on the Configuration Management screen of
    the NetWeaver Administrator.
    Therefore I think if you look up the application in the WD content Admin, there you can find out what kind of JCO/RFC connections are belonging to it. You can find it on http://<host>:<port>/webdynpro/dispatcher/sap.com/tcwdtools/Explorer
    Browse your application here, and then select the JCO Connections tab on the right hand side.
    I hope this helps.
    Best Regards,
    Ervin

  • 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

  • Access rfc-model over an scheduled message-driven-bean

    Hi there
    The problem is, that I've got a WebDynPro Project in which one a RFC-Model exists.
    In this project I do also have my singleton-classes which one hold the data of the rfc-model
    during the period of their lifetime. I did publish the singleton-pointer/reference in the jndi.
    Within the SAP Java Scheduler (there is a tutorial @ sdn) I've created a ejb which
    should run for example every hour. This one is of course in an other container (because of that i do use the jndi)
    So i run the ejb and get the reference of my singleton over the jndi. Till here every
    thing works fine!
    Now I do call a method of the singleton (in the ejb) which should open an jco-connection over the existing model and the following error appears:
    Couldn't load new data! Problem found:
    Unable to access Task Scope in DynamicRFCModelClass. Either run in Engine, or turn Test mode on in WDModelFactory!
    I read already something about this test-mode, but it isn't recommended at all to activate this mode!
    So the J2EE has the reference but can't access the task scope. I tried to select the task-scope with the ejb, but
    i didn't found any solution till now.
    Has anybody an idea?
    Regards Marco

    Hi there
    The problem is, that I've got a WebDynPro Project in which one a RFC-Model exists.
    In this project I do also have my singleton-classes which one hold the data of the rfc-model
    during the period of their lifetime. I did publish the singleton-pointer/reference in the jndi.
    Within the SAP Java Scheduler (there is a tutorial @ sdn) I've created a ejb which
    should run for example every hour. This one is of course in an other container (because of that i do use the jndi)
    So i run the ejb and get the reference of my singleton over the jndi. Till here every
    thing works fine!
    Now I do call a method of the singleton (in the ejb) which should open an jco-connection over the existing model and the following error appears:
    Couldn't load new data! Problem found:
    Unable to access Task Scope in DynamicRFCModelClass. Either run in Engine, or turn Test mode on in WDModelFactory!
    I read already something about this test-mode, but it isn't recommended at all to activate this mode!
    So the J2EE has the reference but can't access the task scope. I tried to select the task-scope with the ejb, but
    i didn't found any solution till now.
    Has anybody an idea?
    Regards Marco

  • How import relations of a model in Web Dynpro project

    I am importing a bean as model in my webdynpro project.
    This bean is having a List(customerList) and a currosponding getter method. This List will become a relation. Can anybody tell me how to use this relation in my Webdynpro project when I import this bean as a model to my project?

    Hi
    I am having both the TestBean and HelperBean in the same package. Below is the code of TestBean. This bean is in turn calling HelperBean ,which is returning a List. I am importing both these beans in model but still I am getting an error while creating model -
    <b>[Error]:     There are one or more relations unresolved. Importing the model without resolvoing the relations might result in erratic output.</b>
         public class TestBean implements Serializable{
         private List customerList= null;
         HelperBean helper = new HelperBean();
              public void execute(){
              try{
                                            customerList = (ArrayList)helper.getCustomerList();
                   catch(Exception ex){
                        ex.printStackTrace();
          * @return
         public List getCustomerList() {
              return customerList;
          * @param list
         public void setCustomerList(List list) {
              customerList = list;
    Please inform if there is some solution.
    regards,
    Sujit

  • Problem in using the RFC model in webdynpro aplication

    Hi,
    I am trying to access FM CRIF_GET_EMPLOYEE_FOR_USER from the backend system in webdynpro application in two different ways
    1.By using JCO classes in a java class
    IRepository repository;
      public int getPernr(String user)
      int ret = 0;
    String user = "SRESP5";
      double pool = Math.random()*100000000;
    //     the repository we gonna be using
      try{
    //      Add a connection pool for the specified system
         wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(""+pool);
      JCO.addClientPool(
      "DE1", //alias for this pool
      100,
    //     max. number of connections
      "540", //SAP client
      "", //userid
      "", //password
      "EN", //language
      "sapde1ci.zrh.swissre.com", //host name
      "10" //system number
    //      Create a new repository
      repository = JCO.createRepository(
      "MYRepository", "DE1");
      wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
         "ExceptionwwwwwwxSS");
      catch(JCO.Exception ex) {
      wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
      "Exceptionwwwwwwx"+ex.getMessage());
      JCO.Client client =
      null;
      try{
    //      Get a function template from the repository
         wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
         "SSS");
    //     wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("ExceptWWWW");
      JCO.Function function = repository.getFunctionTemplate(
      "Z_CRIF_GET_EMPLOYEE_FOR_USER").getFunction();
      wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
         "ddd"+function); 
         wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("ExceptioWWW");
    //      Fill in input parameters
      JCO.ParameterList input = function.getImportParameterList();
      input.setValue(user,
      "USER_NAME" );
    //     input.setValue(String.valueOf(new Date()), "BEGINDATE" );
    //     input.setValue(String.valueOf(new Date()), "ENDDATE" );
    //      Get a client from the pool
         wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("ExceptionQQ");
      client = JCO.getClient(
      "DE1");
    //     wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Exception");
    //      Execute function the remote system
      try{
       client.execute(function);
      }catch(Exception e){
         wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("dd"+e.getMessage());
      wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
       "Exceptionw"); 
    //      Print return message
      ret=function.getExportParameterList().getInt(
      "EMPLOYEENUMBER");
      System.out.println(
      "3");
      System.out.println(
      "RETURN MESSAGE: " + ret);
      wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
         "SSSWSS");
      catch(Exception ex) {
      System.out.println(
      "Caught an exception333: " + ex);
      finally{
    //      Always release client !!!
      //JCO.releaseClient(client);
      JCO.removeClientPool("DE1");
    //     try
      return ret;
    it is returning the PERNR of the username passed as an input parameter.
    2.But when I am trying to use an adaptive RFC model and it is giving NO_EMPLOYEENUMBER_FOUND
    here is the code
    in view
    public void wdDoInit()
        //@@begin wdDoInit()
         wdThis.wdGetTestAppController().executeBapi();
        //@@end
    In Controller
    public void wdDoInit()
        //@@begin wdDoInit()
        Z_Crif_Get_Employee_For_User_Input input = new Z_Crif_Get_Employee_For_User_Input();
         wdContext.nodeZ_cr().bind(input);
              input.setUser_Name("SRESP5");
        //@@end
    public void executeBapi( )
        //@@begin executeBapi()
         try{
                        wdContext.currentZ_crElement().modelObject().execute();
                        wdContext.nodeOutput().invalidate();
                      }catch(Exception e){
                   wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("User111:"+e.getMessage());
        //@@end
    please help me in solving this issue.points will be awarded for sure for the helpful answer.
    Bala

    Hi,
    Change this line of code:
    wdContext.nodeZ_cr().bind(input);
    to
    wdContext.nodeZ_Crif_Get_Employee_For_User_Input().bind(input);
    Try executing your application now.
    Regards,
    Murtuza

  • 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

  • Should i Map thecommon RFC Model to component contrl or custom controller?

    In my webDynpro project , I have two modules one is DirectCustomer and InDirectCustomer. so i have set of RFS's in a single RFC model. In this  RFS's some are common to both the modules. some are independent to each other. so  i have created two controller component one for each module.Then i mapped the independent RFC'c to each controller seperately. But now the RFC's which are common to both modules to map, Better, should i map to  existing Componentcontroller or should i create new customcontroller (like commoncontroller).
    which i option is better, can u suggest me. I feel that, The common RFC's will be mapped to component controller, bcz it the Base controller for the both customcontroller , indrectly to the viewcontroller.
    Can any body give me the suggestion on this

    Hi Vishal,
    As far as I know it's recommended to use a custom controller for every RFC. This makes sense because if the RFC changes some day you only have to do changes in the specific custom controller.

Maybe you are looking for

  • Creating a video library

    I am creating a video library of approximately 100 video clips - suggestions or thoughts from anyone who has done this before and the best way to do it, and best file format? I am leaning towards wmv simply because that is how the videos are now - an

  • Http keep-alive with SOAP webservices

    Just had an interesting experience with a web service setup behind UAG...under low load conditions all SOAP responses were coming across with no issue...once a high load was introduced by the client app the behavior changed where an initial request w

  • Images from Canon 5D Mark III not appearing super sharp in Photoshop CS6 or Lightroom 4

    I have a brand new Macbook Pro with Retina Display and am running CS6, shooting with a Mark III in full resolution raw format.  Focus is on in camera but when I open the images in Photoshop, they do not appear super sharp when zoomed in.  Is this a d

  • HT4527 Can't play songs after copying to new PC

    I've followed the instructions to copy iTunes from an old PC to a new one, but still get the message on the new PC that iTunes cannot locate the songs when i try to play them.  Can anyone help?  Please?

  • Recording with M-Audio Fast Track  USB Audio Interface

    New Mac owner and am completely lost. I am wanting to record guitar and vocal tracks into GB and when I plugged in the M-Audio I could see a wave file when after I hit the record button but I couldn't hear anything. I selected it as the default for i