Should i Map thecommon bapi's to component controller or custom controller?

Hey Can any body give the clarification for this doubt
we have one web dynpro component , It contains some views. Created some BAPIs. Now we have two different applications in the same component. So we have created the two controllers for each application. the created BAPI's are mapped to o each controllers with respect to application.   . Now we have a small doubt, the Bapis  which common are common to both application not binding to any of that two controllers. so the common bapis should be map to the component controller or created one more controller like util Controller.
Once bapis  mapped to any of this we can add this controllers to views. Please suggest which one is better, either mapping bapi's to component controller or custom controller.
vijay

Hi Raj, thks for the quick responce again.  I made small mistake in the sentence.Plz look at now again
In my webDynpro project , under that i have created only single WebDynpro component with two applications .I have two modules(applications) one is DirectCustomer and another one is InDirectCustomer. so i have set of RFS's in a single RFC model. In this RFS's some are common to both the views. some are independent to each other. so i have created two custom controllers one for directCustomer another for Indirectcustomer.Then i mapped the RFC' model objects to each custom controller seperately . But now the RFC's which are common to both views to map, Better, should i map common RFC model objects  to existing Componentcontroller(which comes by default when create the webDynpro component) 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.
Wht is your suggestion on this disign issue?

Similar Messages

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

  • Difference between component controller & Custom controller

    Hi all
    what is the main difference b/w component controller , custom controller & interface controller.
    i want to know the difference of these three in the real time environment.
    if anybody explains me with any simple example then it is great help to me....
    Thanks
    Suresh babu.

    Hi Suresh,
    Component Controller and Custom Controller are more or less the same. Both are related to a particular component in the webdynpro application you create.
    Component Controller:-
    For each component of yours there will be a component controller, were in you can define context variables and methods, events etc.. This usefull while using models.
    Simple example where we can see this is, when you create global context variable in this controller and map this variable to the view controller context variable of different view, which enables you to pass the value of the variable from one view to another.
    Custome Controller:-
    They also have the same the function but as the name suggest there function can be customised. That is we can have more than one custom controller for a component. This is usefull when we need to create seperate execute methods for inputs from model import( Both webservice and rfc call).So you can seperate each other. Example is there in the more sample codes and application section.
    Interface Controller:
    There is only one interface controller for a component. It is mainly used when we need to communicate between two components.There is sample application for communication between two components in the sample codes and application section.
    Regards
    Sreedhar.

  • Difference between custom controller and interface component

    Hi,
        Can anybody tell me what are the differences between component controller and custome controller , component interface.
    Thanks in advance.
    Regards
    sireesha.

    hi,
    When any component is created web dynpro framework automatically generates the controller(controller is nothing but entity which controls the working of views and acts as a binding layer between model and view), this controller is called Component controller.
    We can have as many controller as we want, but they should be used sparingly, Controller should encapsulate the functionality which is common to whole component , like if your application fetches master data and appliaction data so better you should have 2 controller , 1 for master and 2 for application so as to have modularisation in your application.
    Component Interface is the entity which is used when you want to use the functionality defined in some other component i.e. if your main  component is acting as a parent comopnent then the child component usage should be defined via this interface controller under Component Interface, so that main compo will access it via childs Interface Controller.
    Other node under this , Interface view , gets generated for every creation of window , Interface view is entry point into our application for web Dynpro framework
    jsut check out following links,
    Re: Difference between Component Controller and Custom Controllet...?
    Re: custom vs component controller
    check out these ex for the Component Interface and node under this,
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/19e6e990-0201-0010-eca6-a62e342eaad3 [original link is broken]
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/1208c2cd-0401-0010-4ab6-f4736074acc6 [original link is broken]
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/1ee0e990-0201-0010-75bf-a087c241cb83 [original link is broken]
    hope it helps
    regards

  • Component controller Vs interface controller

    Hi Experts
    Please state me the difference and similarities between the component controller and interface controller
    Regards
    Noel

    Hi
    Similarities between these two is that both are controller but each having different purpose in the application
    Component Controller
    1.Starting point of any application,(you can't create any app without defining any Component)
    2.Master Controller of the complete Component structure (View ,Model ,interface ,window)
    3.If function defined in Component Controller or Custom Controller it is available to any controller within your  component (Interface, View, Custom) but not available outside.
    Interface Controller
      1. To make Contents outside of the world one separate controller called Interface  Controller come into picture
          whose only task is to exposing of the content to outside.
    take further help from following threads
    1.[Component Controller,Custom Controller,interface controller|Component Controller,Custom Controller,interface controller;
    2. [Basic Question regarding component Controller and component interface|Re: Basic Question regarding component Controller and component interface;
    3.[controllers and components|Re: confused with controllers and components.;

  • FM / BAPI for get component overview

    Hi all
    Let me know FM / BAPI for get component overview based on production order?

    Could you please tell us which was the FM? It should be useful for other people -;)
    Greetings,
    Blag.

  • Error in mapping the BAPI to the model in vc

    Hi all,
    I am new to the visual composer.
    I have created the new model, i am trying to map the bapi to the model. iam  getting the followin error when tried to select the avialable bapi in the VC
    error :  Failed to fetch the meta data
    This selected  element can not be added to the New model
    Can any body guess what is this error.
    Regards
    Vijay

    Hi Vishal,
    This error is coming because you are trying to map the bapi to the model itself. You can only map a bapi to an iView.
    Go to <b>Compose Model</b> tab on the right, and select an iView from the Components given. Double click or drag to add it to your model. When you go inside your iView, you will be able to map your bapi now.
    Go to page 34 in the following doc:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/63f2052e-0c01-0010-b9a2-e1f7457a7fbe">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/63f2052e-0c01-0010-b9a2-e1f7457a7fbe</a>
    Bye
    Ankur
    Reward points if it helps!!

  • Error while mapping the BAPI exception to the Fault Messge

    Hi
    I have a scenario SOAP to BAPI ...
    when i try test the scenarion from Altova XML SPY for BAPI exception ... i am getting the following error....
    When i tried to map the BAPI exception to the Fault Message its giving me the error...
    com.sap.aii.af.ra.ms.api.DeliveryException: com.sap.aii.af.ra.ms.api.MessagingException: Could not parse XMBMessage due to Unexpected length of element <sap:Error><sap:ApplicationFaultMessageNamespace> =

    Hi,
            Fault messages can be used for inbound proxies....for BAPI also it can be used i am also not sure....How are you tracking that the data is getting posted into the SAP table with the help of BAPI?
    Thanks
    Arijit

  • Concept of 'x' fields mapping in BAPI

    Hi Experts,
    Please explain the concept of 'x' fields mapping in BAPI. Why do we need that ?
    Thanks
    ~Sid
    "Max points are guarenteed"

    As the previous answer says, it's a "true / false" flag to say you want the changes applied to a particular field... the BAPI code cannot just say:
      if not some_field_name is initial.
        change value of some_field_name.
      endif.
    because the initial value may be a valid value for "some_field_name" so you wouldn't be able to clear the field out with this logic.. so instead the BAPI logic is more like:
      if some_field_name_flag = 'X'.
        change value of some_field_name.
      endif.

  • Google Map direction path to any component in flex

    Hello,
            Is it possible to set google map direction path to any component with respect to the fields from source to destination?
    For Example.. I am searching for "from hyderabad to secunderabad " then I ll get route path like the way how we have to go.. I want to store this information in the database.
    Can anyone please help me?
    Thanks in Advance.

    Hi,
    please refer following link:
    http://www.mm-v-mm.com/static/as3Ref/langref/flash/display/LoaderInfo.html
    http://livedocs.adobe.com/flex/2/langref/flash/display/LoaderInfo.html#includeExamplesSumm ary
    I think you have to look for any output parameters for SWF u r loading then only u will get information which u r SWF has.
    Thanks.

  • BAPIMTCS mapping to BAPI incorrect while downloading SI_CONNOBJ

    Hi ,
    I am getting the error " BAPIMTCS mapping to BAPI incorrect "  in SMW01 while downloading SI_CONNOBJ from ISU to CRM . Please suggest me solution if any one had faced the same problem before .
    Thanks & Regards,
    Rahul D

    Hi,
    Any guess please .
    Below are the error messages I am getting .
    Error 1 :  " Validation error occurred:Module VALIDATE_MSGBDOC_FOR_CONNOBJ, BDoc type
               SI_CONNOBJ   SMW3 18 "
    Error 2: " BAPIMTCS mapping to BAPI incorrect  IBSSI_CRMTO_MESSAGES 11 "
    Regards,
    Rahul D

  • Diff between Component controller,Custome controller and  View controller

    hi,
        Can any body tell me the following details,
    1.difference between the Component controller,Custome controller and  View controller in WD-ABAP.?
    2.what is Lead Selection?   
    Regards,
    Ravi

    Hi Ravi.
    The component controller is visbile to all views in a component. So all context nodes and methods you create here can be accessed from all views in the component. This way you can share data between the views by mapping context nodes or thru method calls. You can also mark methods and nodes as interface so that they are acessable from other components that define component usages to this cmponent.
    Custom controller is quiet similar to the component controller. You can define it if you want to group some views with a custom controller for a certain functionality.
    If you want to access a custom controller in a view you have to define the usage first on the properties tab of the view.
    A view controller is only visible in the view itself. So all methods or context nodes you define here are only accesable by the current view.
    The lead selection is in most cases the current selected element in a context node. The lead selection is used by many UI elements to determine which element has to be shown (e.g drop down).
    If you have a table with single selection the current selected table row is the lead selection element of the bound context node.
    SO you can get the lead selection element easily in any mthod by calling context_node->get_element( ).
    Hope this clears your questions.
    Cheers,
    Sascha

  • How to Call BAPI From the Custom Controller

    Hi
    I developed frist WD Application Using RFC Adapter.
    i did the following steps
    1. created the project
    2. created the model.
    3. created the customer controller and mapped the model of the controller to the model.
    4. mapped controller context to the views
    5. created one action in the start view
    6. created one method in the customer controller.
    so please let me know the lines of code to call BAPI using RFC.
    and  how to pass input valus to the bapi and how to execute the BAPI
    plese send the reply ASAP
    regards
    mmukesh

    Hi
    i did like this
    In  Start View OnActionSearch () method code
    public void onActionsearch (com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
           wdThis.wdGetTestCustControllerController().executeGetlistBapi();
    in CustomController Init method
    public void wdDoInit()
        Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();
        wdContext.nodeBapi_FlightGetlist_Input().bind(input);
        input.setDestination_From(new Bapisfldst());
        input.setDestination_To(new Bapisfldst());
    In CUSTOMECONTROLLER executeGetlistBapi();
    METHOD
    public void executeGetlistBapi( )
        //@@begin executeGetlistBapi()
        try{
           wdContext.currentBapi_FlightGetlist_InputElement().modelObject().execute();
           wdContext.nodeOutput().invalidate();
        }catch(Exception ex){
           ex.printStackTrace();
    Then let me know what is wrong in this
    i did as per pdf
    please correct if there is any worng in this code.
    this is flight example .
    regards
    mmukesh

  • Difference between Component Controller and Custom Controllet...?

    Hi
    Can any one tell me Difference between Component Controller and Custom Controllet...?
    Best Regards
    Ravi Shankar B

    Hi RaviShankar B,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/web%20dynpro%20sample%20applications%20and%20tutorials.htm
    Also refer to the below link
    Component and custom controllers
    Component Controller:-
    For each component of yours there will be a component controller, were in you can define context variables and methods, events etc.. This usefull while using models.
    Simple example where we can see this is, when you create global context variable in this controller and map this variable to the view controller context variable of different view, which enables you to pass the value of the variable from one view to another.
    Custom Controller:-
    They also have the same the function but as the name suggest there function can be customised. That is we can have more than one custom controller for a component. This is usefull when we need to create seperate execute methods for inputs from model import( Both webservice and rfc call).So you can seperate each other. Example is there in the more sample codes and application section.
    regards
    Anil Dichpally

  • Please tell me a BAPI to get Closing balance of customer account based on Sales Organization?

    Hi Experts,
    A requirement has come up where I want to get Customer closing balance based on its sales organization as this particular customer is extented to 2 different sales organizations. I want to get the closing balance of individual sales organization vise.
    Please tell me a BAPI to get Closing balance of customer account based on Sales Organization?

    AFAIK there is no such BAPI, cause there is no database table with balance for customer per sales organisation. (No KNCx table for VKORG)
    First ask functionals (*) how to recover sales organisation from a FI document (I suppose for SD invoice it is easy if no merging between organisation) will be a little tricker for pure FI document like payment transactions (hope thet are quickly cleared...)  Then start from non cleared records of BSID (also BSAD if you use a past date of reference, in case you have to add the records of BSAD with clearing date greater than reference date) and cross it with SD information to break FI into sales organisation.
    Regards,
    Raymond
    (*) Ask for where do they store VKORG in FI documents

Maybe you are looking for