Do I need to use a custom controller & view set

Good Day,
Please excuse the long question.
I am in the process of creating a new BSP application.  In a nut shell, my application is going to accept a bunch of data in the URL and pass the data to an external system.  Depending on what is returned from the external system, it will prompt the user to either supplement the data or to confirm what the external system has sent back. 
I would like to have all of the business logic that communicates with the external system and decides what type of user interaction to be located in one central class.  I was thinking that I could have a custom controller that is resident for the life of the application.  It would call the external system and navigate to other views depending on what is required.  When the user responds, the response would go to the custom controller and be sent to the external system.  So, my first question is does this sound reasonable?  For my second question, is it possible to have a view associated with the custom controller.  If so, I can use it for the confirmation "screen".
While looking at the Web IC cookbook, I ran accross the section on view sets.  Are there pros and cons to using a vew set for an application like this?  I expect the browser window to contain one view at a time and it kind of seems like view sets may intended more for where there are several views displayed within the browser and the view set allows you to change only one.  Is that true?
Thank you very much for any insight you can offer.  I promise to award points for helpful responses.
Thanks and kind regards,
John

Hi John,
My suggestions would be to use a model class for the business logic and call to the external system.  The controller would only be for eventing and determining what view to call.  I would create a parameter called view_name on the controller and toogle this between your views depending on what returns from your model methods.  As a personal preference I would pass the 'bunch of data' in the form rather than the URL.  Validate it in a model method before sending it to the external system.  I tend to use URL querystrings for small stuff rather than large application data.  Also what would happen to the application if someone saves your URL as a favorite and launchs the app.
Those are my thoughts hope it was helpful.
Regards
Matt

Similar Messages

  • Accessing Custom Controller from setter and Getter methods

    Hi Gurus
    How can we access the custom controller from setter and getter methods,is there any way to do that.
    Thanks & Regards
    Rajasekhar

    Hi Steve.
    Thanks very much for valuable information,  the main controller class is getting tracked in mo_owner which is declared as  CL_BSP_WD_VIEW_CONTROLLER, and I'm getting the reference through
    mo_owner ?= owner. (since mo_owner = owner is not getting converted of type mo_owner ). After doing this on whatever the contexnode class (say zl_xxxx_xxx_cnxx) the corressponding context node values are getting turned as  <#ERROR IN METADATA.
    I mean when I'm checking the configuration in bsp_wd_cmpwb configuration tab -> Available Fields->Enlarge the contex node->BTSTATUS (say for Example) there the values are showing as <#ERROR IN METADATA , After executing the above procedure
    I cross checked several times before and after redefining the context node method IF_BSP_MODEL~INIT, before redefining this method UI is working fine, after redefintion UI is throwing below error .
    Exception Details
    CX_SY_REF_IS_INITIAL - Dereferencing of the NULL reference
    Method: CL_BSP_MODEL=>IF_BSP_MODEL_BINDING~IS_ATTRIBUTE_VALID
    Source Text Row: 13
    Thanks & Regards
    Rajasekhar

  • What is the use of Custom Controller in ABAP WebDynpro?

    Hi,
    Can you explain me about Custom Controller and its uses and some example on it?
    I have gone through SAP help but not understand clearly. Wish to see some good explanation here?
    Thanks in advance.
    Regards,
    Meera.

    In addition to above,
    1. Custom controller can acts as "Config Controller"
    2. it is bit different than component controller in the manner that Hook methods will be different here ( only two ) and
    these methods will not participate in the phase model unless there is a method call of custom controller as opposed to component controller which always participate in the phase model.
    someone please correct me for the last statment if i am wrong.
    Edited by: kranthi kumar on Dec 31, 2010 11:37 AM

  • Need Helping using VBA custom code to query AS400 database

    Hi
    I am trying to connect the AS400 using the custom page programmability in etester. I am able to make the connection for SQL queries but when i try to do the same for a SPROC, I am not able to do it successfully. Any help is very much appreciated.
    Thanks
    Subu

    The easiest thing to open the ODBC interface and create a DSN entry for your AS400. (You will need the appropriate drivers loaded on the windows machine) Once you have done that, you can use the Microsoft Active-x data objects to connect, query, read and write data.

  • I need to create a custom controller. How is this done?.

    With the CRM 7 WebUI I need to copy data from the left pane of the Contact screen to the right pane. The left being the details of the Account/contact and the right pane holding details of the Contact (BP).
    The left pane is controlled via component BP_CONT, view ContactDetails and the right pane is controlled via component BP_ADDR view StandardAddress. When I press F2 when on a field of either of the two panes I can see that both panes have a parent point to component BP_CONT, view ContactViewset.
    However, the parent component and view has no context nodes, so I can place appropriate code in the do_process_output method.
    I have been advised that I should create a custom controller, and then bind the appropriate context nodes to it. However, I don't know how to go about doing this and wondered if anyone had come across any suitable documentation of video that might be of help?.
    Jason

    I found a link which may answer all my quesitons....
    http://blogs.moovar.com/sap/sap-crm-create-custom-controller-for-a-web-ic-component/
    Jason

  • Need to Use google APIs in View .htm Page

    Hi Experts,
    I have the following requirements:
    I need to capture the Geo code based on the user click from Google maps and update the same in the CRM.
    I need to load the Google maps with multiple Location Marking and Marking Icons will be changing based on some condition.
    I had implemented the Mash-ups to Load Google Maps in the WEB UI screen.
    I found that Mash-ups will be helpful only to load the web Page Via URL(parameters passing) and it will not return back any info.
    So i  created a custom view and write the Java Script logic which contain the Google APIs,functions to load the Maps dynamically with
    multiple Geocodes Etc., How ever while am loading the view in the CRM am not able to load the maps.
    So I create a Page with Flow Logic in the same BSP Component and i provide the same code which i given in View's .htm page,while testing its working fine.
    Q1 > Using Mashups in CRM can use the Google APIS and can we raise events on click on the Maps?
    Q2>  Why Java Scripts contain Google APIS are not loading in the View's .htm page like Pages with flow Logic.
    Q3>  How can i Load the Page with flow Logic in the View's .htm page with out using Iframe?
    Any Suggestion will be helpful.
    Thanks and Regards,
    Y. Ravi Kumar.

    Hi,
    I just wanted to post some of my experience on java.nio.channels.FileLock.
    If a file is in use by an application, for example if a jar file is launched, the file is obviously locked by the system in a way we can't delete it.
    However it is still considered as unlocked by java as an exclusive FileLock could be set.
    If an exclusive FileLock has been set on a file no other exclusive FileLock could be set by any other application. (relieved ! the basic lock operation works !)
    When a FileLock is set on a jar file it DEFINITELY corrupt the considered jar !!!!!
    the message "Invalid or corrupt jarfile" is displayed when I try to execute it using java
    and any zip utility can't open it any more.
    And it is not a locking problem !
    Even after the exit of the application that lock the file, release of the lock, copy of the considered jar, the jarfile is definitely corrupted.
    I guess it could/should be the same thing on other file types.
    What an awful bug :(
    My config is Windows Vista sp1
    java version "1.6.0_05"
    Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
    Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)
    Considering the question "if I then use a FileLock and lock my file, can I still delete it?"
    The answer is no you can't delete it:
    You can't delete it with the application that locked it
    (not even with File.deleteOnExit() method -- still with the above config --)
    neither with another application.
    Of course you can release the lock and delete it ...

  • Using a Custom Method to Set the Bind Parameters in a View Object

    Hi all:
    i tried to follow the tutorial in oracle jdeveloper 10.1.2 documentation about creating a simple search page but i'm receiving this error when i tried to test the application module after i added a where clause to my view object(i.e where dept_id= :1) and define a custom method to bind variables in the appmodule class
    i keep getting this error
    JBO-27122: SQL error during statement preparation. Statement: SELECT Employees.EMPLOYEE_ID, Employees.FIRST_NAME, Employees.LAST_NAME, Employees.SALARY, Employees.DEPARTMENT_ID Employees.DEPARTMENT_ID = :1
    ????? IN ?? OUT ????? ?? ??????:: 1
    when i used the setwhere metohd it works
    i'll apprciate ur answer
    regards

    I have the same problem:
    Just like in Toystore Demo I am calling the following method in my VO:
       * Find an account by username and password, leaving the account
       * as the current row in the rowset if found. BUT EVEN IF WE FIND ACCOUNT BY
       * USERNAME AND PASSWORD, IT WILL RETURN FALSE IF THE ACCOUNT IS DISABLED!!!!
       * @param username the username
       * @param password the user's password
       * @return whether the user account exists or not
      public boolean findAccountByUsernamePassword(String username, String password) {
         * We're expecting either zero or 1 row here, so indicate that
         * by setting the max fetch size to 1.
        setMaxFetchSize(1);
        setWhereClause("staff_id = :0 and passw = :1");
        setWhereClauseParam(0, username);
        setWhereClauseParam(1, password);
        executeQuery();
        RowSet rs = this.getRowSet();
        String userEnabled = new String("N");  // Default setting
        if (rs != null){
          int currentSlot = rs.getCurrentRowSlot();
          Row r = rs.getCurrentRow();
          if (r == null){
             r=rs.first();
             currentSlot = rs.getCurrentRowSlot();
          //check if we found the user
          if (currentSlot == SLOT_VALID){
            Object[] av = r.getAttributeValues();
            LoginUtils.userLoggedIn    = av[0].toString();  // '0' is username
            LoginUtils.userFirstName   = av[1].toString();  // '1' is user first name
            LoginUtils.userAccessLevel = av[6].toString();  // '6' is user level
            LoginUtils.userEnabled     = av[7].toString();  // '7' is user level
            userEnabled = av[7].toString();
        boolean found = (first() != null) & userEnabled.equals("Y");
        setWhereClause(null);
        setWhereClauseParams(null);
        setMaxFetchSize(0);
        return found;
      }It gives the same exception...
    JBO-27122: SQL error during statement preparation. Statement: SELECT Staff.STAFF_ID, Staff.FIRST_NAME, Staff.MIDDLE_NAME, Staff.LAST_NAME, Staff.POSITION, Staff.PASSW, Staff.USER_LEVEL, Staff.ENABLED, Staff.PHONE, Staff.EMAIL FROM STAFF Staff WHERE (Staff.STAFF_ID = :0 and Staff.PASSW = :1)
    This worked in 10.0.1.2 but now it does not work in 10.0.1.3!!!

  • Need to use IPhoto library to view photos in Frontrow?

    Hi
    just setting up my Mac mini. I have all my pictures organized in folders stored on a NAS.
    Is there a way to browse those folders/pictures in Front Row or will it only work if I have all the photos imported into IPhoto?
    I have tried to make an alias of the directory on the NAS where the pictures are stored in the local pictures folder on the mac mini harddisk. Doesn't seem to work (unless I am doing something wrong here as I am a fairly recent convert from Windows).
    How do I go about it?
    Thanks
    mini   Mac OS X (10.4.7)  

    As far as I know, a photo has to be in your iPhoto library for Front Row to be able to see it. An alias won't work because the photo has to be in iPhoto's database in order to be made into a slideshow, in much the same way that a music file has to be in iTunes' database.
    All the photo section in Front row does is open iPhoto and use that to display your photos. If you look at a photo in Front Row, you will see that iPhoto has started in the background.

  • Custom Controller in IC Web Client

    I am trying to using the Custom Controller to pass a model between classes. I am not using the BOL context node. I made my own models. Does anyone know what do I need to do or have any example that I can follow? thanks.

    hi,
    For help
    http://help.sap.com/saphelp_crm40sr1/helpdata/en/9d/1ca7f91b76ad4493d62b8ecc7c83db/frameset.htm
    If you are calling controller2 from controller1 then
    subcontroller ?= create_controller(
                              controller_name = 'address.do'
                              controller_id = 'ad'
    set some attributes with standard method
      subcontroller->set_attributes( name = 'model'
                                     value = lv_model ).
    model is the name of the attribute.
    lv_model is the instance of the model.
    The above sets the model to the controller2. You can just get the model in controller2 by me->get('model').
    Regards,
    Abdul raheem S

  • Transformation: Need for calling a custom function module on source system

    Hi Gurus,
    I need to use a custom FM residing on source system within the transformation to determine the type (e.g. posting type) of a document item. The logic is quite complex with many exceptions (many if statements) and 2 customizing & few transparent tables are in use as well in the FM.
    From my point of view, there are few options for achieving the outcome:
    1. Copy the FM logic 1:1 in transformation
    2. Transport the FM from ERP to BW system
    3. Source system delivers the info (e.g. with an extra field "posting_type")
    4. Access the FM directly via RFC/BAPI
    However, there are pros and cons for each of the alternatives:
    *Option 1*
    pros:
    cons: consistency problem, need for importing customizing tables & source tables, high maintenance effort
    *Option 2*
    pros: better consistency compared to Option 1
    cons: need for importing tables, administrative efforts
    *Option 3*
    pros: no logic is needed at BW side, no transformations means no impact on performance, high consistency, no administrative effort
    cons: structure in source system has to be changed, impact on historical records
    *Option 4*
    pros: best consistency (better than Option 3 as FM might change), no administrative effort
    cons: impact on performance during transformation
    Could you please verify my assumptions and give suggestions on solving the problem?
    Thanks a lot!
    Regards,
    Meng

    Hi Joon,
    According to me.
    If Historical data amount is so high, historical data is available in BW(at PSA level or acquisition layer or corporate memory layer) and headache to load history data(because of overload on ECC due to huge amount of data) from ECC then I will suggest combination of 3 and 4 steps.
    If fetching history data from ECC is not headache for you then go for step 3.
    Step 3 is most common approach in BW, which is easy for implementation and support.
    Regards,
    Ashish

  • Custom controller - WEBDYNPRO

    My friends what is the use of custom controller at what situation we should use that.
    And if we declare custom controller will it be considered globally
    Edited by: VENKATESH MADANAGOPAL on Sep 30, 2008 7:33 AM

    Hi Venkatesh,
    Try going through the SAP documentation you will come across the desired information. The below lines are taken from 1 such source.
    Regards,
    Uday
    Custom controllers are optional controllers that must be defined by the developer. These controllers can be used to modularize the component content. For example, custom controllers can act as local controllers for some views, or they can be used to encapsulate the logic related to a certain model class (business logic).
    This allows you to reduce the content of the component controller by populating sub-functions.
    Custom controllers are optional. They have to be defined at design time and can be used to encapsulate sub-functions of the component controller. Multiple custom controllers can be defined in a component. Custom controllers are instantiated automatically by the Web Dynpro framework and the instantiation order is undefined; therefore, the coding in a custom controller should

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

  • Unable to Set Custom Paper size setting of 15 (width) x 12 (Height) using J

    Hi,
         I am unable to print the report using the custom paper size setting of  15 (width) x 12 (Height)  with printer friendly fonts so that we can print on Line or dot matrix printer.
         This problem is not solved from last 3 months and we dont get help anywhere.
         We are using Java with Crystal Report XI R2 design for the same. 
                           ITable table=null;
    DatabaseController dbCtrl=null;
    ReportClientDocument oReportDoc=null;
    try {
    String reportName=fileName;
    oReportDoc=new ReportClientDocument();
    oReportDoc.open(reportName,0);
    dbCtrl = oReportDoc.getDatabaseController ();
    rs=ad.sqlStringBigST(query);
    table = dbCtrl.getDatabase ().getTables ().getTable (0);
    dbCtrl.setDataSource (rs, table.getName(), "Runtimeres");
    Object oreportSource=oReportDoc.getReportSource();
    IReportSource reportSource=(IReportSource)oreportSource;
    PrintReportOptions printOptions = new PrintReportOptions();
    printOptions.setPrinterName("EPSON FX-2175 ESC/P");
    printOptions.setPaperSize(PaperSize.useDefault);
    options.setPaperSource(PaperSource.manual);
    oReportDoc.getPrintOutputController().printReport(printOptions);
    } catch (Exception e) {
    System.err.println(e.toString());
    Please let me know what is the solution for the same.
    Regards,
    Raj

    Hi,
        Yes i can understand that you need to first understand the root of the problem to give me the solution.
        I am here to answer to your questions until you understand what is the problem.
        Yes if i set the standard page size which are given in API doc , it sets up the page correctly.
        Following page size as given in the API doc works fine.
        http://devlibrary.businessobjects.com/businessobjectsxi/en/en/RAS_SDK/rassdk_java_api_doc/doc/rassdk_java_apiRef/com/crystaldecisions/sdk/occa/report/document/PaperSize.html
       It is rejecting the custom paper size and custom fonts (which in my case are printer friendly fonts).
    Regards,
    Rajshekhar SIpoy

  • How to call a custom controller method from view

    Hi,
    I ve created a simple web service and consumed it in a model. Mapped the input & output parameters to custom controller context which in turn mapped to component controller's context which in turn to view's contexts.
    How to call a custom controller method from view?
    Please explain the syntax.
    Regards,
    Manoj.

    Hi Patralekha,
    Give some idea for the below scenario:
    I ve created a simple web service and consumed it in a model. What I did was
    1) for the input parameters, mapped the node from view->custom controller->model
    2)for the output parameter, mapping from model->custom controller->view.
    It works fine.
    But I don't want to access model nodes directly, rather I want to set the input param in somewhere else (like custom controller) before calling the appropriate method, same for the response also.
    Share me your thoughts.
    Regards,
    Manoj.

  • Custom device / I am trying to use a vehicle controller model developed in LabVIEW with compactRIO (cRIO-9024)

    Now I have developed a vehile controller model with LabVIEW so as to run on VxWorks operating system. ( compactRIO cRIO-9024)
    And I converted a controller model of labview into *.lvmodel in order to use it as I did with simulink models. 
    However, converted *.lvmodel was not supported for VxWorks operating system. so after searching for this, I found out that I have to use a custom device. 
    I am now studying the custom device, but it looks diffcult because I dont have much experience in real-time system.
    Here are my questions.
    1. Simulation model in VeriStand
    Should I convert a labview controller model into *.lvmodel even if I use the custom device in order to run on VxWorks operating system? 
    If not, what should I do after building a controller model with labview?
    2. Operating system
    It is silly question. anyway, as long as I run a controller model on compactRIO cRIO-9024, the operating system always has to be set to VxWorks. Is it right?
    3. Custom device
    This is the most difficult thing. I dont know even what to do. What functions should be inside a custom device template tool? The controller model send output signals to a vehicle model, and receive input signals from a vehicle model.
    Thank you in advance. 
    Hognjun

    Hi,
    You should post this on the Veristand Forum.
    http://forums.ni.com/t5/NI-VeriStand/bd-p/440
    Ravi

Maybe you are looking for

  • I need a Guru fast

    <p style="margin: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman">I'm designing a very strange report using Crystal Reports XI.  I created a picture of what the report would look like when it's finished, because this might

  • Component -reg

    While making material booking in iw32->components tab,the following error appears; Entry    does not exist - check your entry - Error : 0058. But the matcode is present in the respective plant.so what is the setings to be done to capture the matcode

  • How to embed ePub to .folio?

    Hello, we would like to prepare ad for client who is selling books. I would like to embed sample of book to publication, not linking to external web, but to have it directly in .folio. Does anyone have experience with this, how this behave on iOS and

  • Memory error while installing BI

    I have Win Server 2003se and 3Gb of RAM and try to install Business Inteligence from Oracle 10g AS R2(10.1.2.0.2). Every time I click setup.exe and after a while I see: "Instruction from "0x4d503935" reffers to memory address "0x4d503935". Memory cou

  • How can I dew laptop without losing all my music?

    how can I download my iTunes Library from my iPod Classic to my new laptop without losing all my music during the synch?