Have a problem in calling a subcontroller

I try to use the model class and call a subcontroller class to display data in another view by using the following code.
<b>In the do_init</b>
    Create the model of this class
      l_model = create_model( model_id = c_model_id
                              class_name = lc_class_name ).
    Create sub controller
      l_controller ?= create_controller(
                                    controller_name = lc_control_name
                                    controller_id   = c_subcontrol_id ).
      controller_set_active( controller_id = c_subcontrol_id
                             active = 0 ).
      l_controller->set_model( model_id       = c_model_id
                               model_instance = l_model ).
<b>In the do_request</b>
    controller_set_active( controller_id = c_subcontrol_id
                           active = 1 ).
    call_controller( l_subcontrol ).
    clear current_event.
At the view of subcontroller, after any event occurs, the parent controller is triggered again. Why? How can I solve this problem?

I do appreciate your immediate reponse. However, there may be some misunderstanding. Of cource, I put the checking coming event in the do_handel_event. The details of my application is shown below.
<b>In the do_init method</b>, all source code is the same that I posted. It has creating a model class and then a subcontroller class.
<b>In the do_request method</b>, I have a code like this.
  <b>dispatch_input( ).</b>
  main_view =
        create_view( view_name = 'main.htm' ).
  l_model ?= get_model( c_model_id ).
<i>To separate tasks between calling a view and calling a subcontroller, I have to have a flag, <b>current_event</b>, to check whether the coming event is search. This flag is set at the method <b>'do_handle_event'</b></i>
if  current_event eq lc_search.
    l_subcontrol  ?=  get_controller( controller_id = c_subcontrol_id ).
    controller_set_active( controller_id = c_subcontrol_id
                           active = 1 ).
    call_controller( l_subcontrol ).
    clear current_event.
  elseif current_event is initial.
    call_view( main_view ).
  endif.
In the do_request of my subcontroller class, I call the view of the subroutine.
dispatch_input( ).
  l_model ?= get_model( 'mm' ).
  stock_view  =  create_view( view_name = 'stock.htm' ).
  stock_view->set_attribute(
                     name = 't_display' value = l_model->t_display ).
  stock_view->set_attribute( name = 'ITERATOR' value = me ).
  stock_view->set_attribute( name = 'show_popup' value = show_popup ).
  call_view( stock_view ).
After any event occurs in this view of subroutine, I catch this event at the method do_handle_evnt.
if htmlb_event is bound.
    case htmlb_event->server_event.
      when  'onSelect'.
        CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
        tv  ?=  cl_htmlb_manager=>get_data(
                                      request  =  request
                                      name     =  'tableView'
                                      id       =  'stock_tv_display' ).
        if tv is not initial.
          table_event  =  tv->data.
          row_index    =  table_event->row_index.
          if row_index is not initial.
            show_popup  =  abap_true.
          endif.
        endif.
      when  others.
    endcase.
  endif.
After the program run through this method, it goes back to the do_request of the parent controller, main.do. This is my problem. <b>I don't want to call the parent controller again. And, my application has already been stateful.</b> Is there any way to prevent it. I sincerely appologize if I couldn't catch what you said. But, please give me some suggestions to solve this problem.
Message was edited by: Amateur willbeProfessional
Message was edited by: Amateur willbeProfessional

Similar Messages

  • Hello apple I have the problem with my iPhone and my friends have this problem too. My iPhone have the problem about calling and answer the call. When I use my iPhone to call I can't hear anything from my iPhone but the person that I call can answer it bu

    Hello apple
    I have the problem with my iPhone and my friends have this problem too.
    My iPhone have the problem about calling and answer the call. When I use my iPhone to call I can't hear anything from my iPhone but the person that I call can answer it but when answer both of us can't hear anything and when I put my iPhone to my face the screen is still on and when I quit the phone application and open it again it will automatic call my recent call. And when my friends call me my iPhone didn't show anything even the missed call I'm only know that I missed the call from messages from carrier. Please check these problem I restored my iPhone for 4 time now in this week. I lived in Hatyai, Songkhla,Thailand and many people in my city have this problem.
    Who have this problem??

    Apple isnt here. this is a user based forum for technical questions. The solution is to restart, reset, and restore as new which is in the manual after that get it replaced for hard ware failure. if your within your one year warranty its replaced if it is out of the warranty then it is 199$

  • Since i update my iPhone 5 with IOS 7.0.2, I start to have serious problems to call or receive calls from other telephones: is not possible to open the call at the first try. Somebody have the same problem?

    Since i update my iPhone 5 with IOS 7.0.2, I start to have serious problems to call or receive calls from other telephones: is not possible to open the call at the first try. Somebody have the same problem?

    Try
    Reset: Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Note: You will not lose any data

  • Hi I have a iPhone 4 and I seem to have a problem during calls. If I make or receive a call I can hear the person who is on the line with me but the other person can't hear me. This problem has occurred 1 week ago so please get back thank you

    Hi I have a iPhone 4 and I seem to have a problem during calls. If I make or receive a call I can hear the person who is on the line with me but the other person can't hear me. This problem has occurred 1 week ago so please get back thank you

    You use Restore to get the latest firmware build, not the Update button. You can only use the Update button, if there is an iOS update, say iOS 5.1.
    this link talks about updating to 9A406 to fix the "No Service" issue with iPhone 4S:
    http://iphone-and-i.blogspot.com/2011/12/fixing-iphone-4s-signal-problem.html

  • I have the problem of calls getting failed.. Black Iphone 4S 16gb IOS 6.1.3. O2 Network.  Airtel India.     I have full bars of signal but cannot  make calls. Goes to "No service" then to "searching".     I constantly get "Call Failed" when making calls.

    I have the problem of calls getting failed.. Black Iphone 4S 16gb IOS 6.1.3. O2 Network - Airtel India.
    I have full bars of signal but cannot  make calls. Goes to "No service" then to "searching".
    I constantly get "Call Failed" when making calls.
    What could be done to solve the problem?

    Try settings/general/reset/reset network settings.  If that does not do it then contact your carrier

  • Since installing iOS 6, I have had problems receiving calls and messages. Calls go straight to answerphone and messages do not appear until I switch off and on again. I have also installed iOS 6.1.1

    Since installing iOS 6, I have had problems receiving calls and messages. Calls go straight to answerphone and messages do not appear until I switch off and on again. I have also installed iOS 6.1.1

    Try a reset. Press & hold the Power and Home buttons simultaneously, ignoring the red power off slider, until the Apple logo appears. Then release both buttons. This should not affect any content on the iPad, it is similar to rebooting your computer.

  • A problem in calling a subcontroller

    I try to use the model class and call a subcontroller class to display data in another view by using the following code.
    <b>In the do_init of main controller</b>
    * Create the model of this class
    l_model = create_model( model_id = c_model_id
    class_name = lc_class_name ).
    * Create sub controller
    l_controller ?= create_controller(
                          controller_name = lc_control_name
                          controller_id   = c_subcontrol_id ).
    controller_set_active( controller_id = c_subcontrol_id
                           active        = 0 ).
    l_controller->set_model( model_id       = c_model_id
                             model_instance = l_model ).
    <b>In the dispatch_input( ) of main subcontroller</b>
    main_view = create_view( view_name = 'main.htm' ).
    l_model ?= get_model( c_model_id ).
    <i>*To separate tasks between calling a view and calling *a subcontroller, I have to have a flag, current_event, *to check whether the coming event is search. This flag *is set at the method 'do_handle_event'</i>
    if current_event eq lc_search.
       l_subcontrol ?= get_controller(
                          controller_id =   c_subcontrol_id ).
       controller_set_active( controller_id = c_subcontrol_id
                              active        = 1 ).
       call_controller( l_subcontrol ).
       clear current_event.
    elseif current_event is initial.
       call_view( main_view ).
    endif.
    In <b>the do_request of my subcontroller class</b>, I call the view of the subroutine.
    <b>dispatch_input( ).</b>
    l_model ?= get_model( 'mm' ).
    stock_view = create_view( view_name = 'stock.htm' ).
    stock_view->set_attribute(
              name = 't_display' value = l_model->t_display ).
    stock_view->set_attribute( name = 'ITERATOR' value = me ).
    stock_view->set_attribute( name  = 'show_popup'
                               value = show_popup ).
    call_view( stock_view ).
    After any event occurs in this view of subroutine, I catch this event at <b>the method do_handle_evnt</b>.
    if htmlb_event is bound.
       case htmlb_event->server_event.
         when 'onSelect'.
           CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
           tv ?= cl_htmlb_manager=>get_data(
                                   request = request
                                   name = 'tableView'
                                   id = 'stock_tv_display' ).
           if tv is not initial.
              table_event = tv->data.
              row_index = table_event->row_index.
              if row_index is not initial.
                 show_popup = abap_true.
              endif.
           endif.
         when others.
       endcase.
    endif.
    After the program run through this method, it goes back to the do_request of the parent controller, main.do without passing the do_request of subcontroller. This is my problem. <b>I don't want to call the parent controller again. And, my application has already been stateful.</b> Is there any way to prevent it? Please give me some suggestions to solve this problem.

    Hello,
    before we go any further into your problem, here is an important thing to know:
    The method DISPATCH_INPUT is not to be overwritten - it's purpose is to just get called within DO_REQUEST of your main controller, such as to have all input values passed on to the subcontrollers.
    It also says so in the method implementation of DISPATCH_INPUT in CL_BSP_CONTROLLER2:
    <b>* ...
    This method should normally not be overwritten, besides the handling must be changed
    ...</b>
    Also, as I saw you posting somewhere else that you are another user/person - please do not use multiple accounts. You can always ask the SDN staff to solve problems with your accounts (if you can't use your first anymore), but creating a new one is not the way it should be.

  • I continuously have a problem making calls where I have to activate then cancel the speaker phone button.  Normally happens when calling landline phones but sometimes mobile.  Any fixes?

    I continuously have problems making calls from my iphone 4S.  When I place a call and press send, you hear nothing until I turn on and off the speaker button and then you hear the ring tone or the person answering.  This happens normally on land line calls but does occur when calling mobile phones somethimes.  Is this a common problem or is there a fix for it?  Thanks

    I am having the same problem. Usually happens after I make consecutive phone calls.

  • New 4s connects with bluetooth in my Lexus, but I have intermittent problems with calls.  I can hear them, but they can't hear me.  Never did this with 3gs.  Anyone else have this problem?

    New 4s connected to my Lexus bluetooth.  Having intermittent problem with calls.  I can hear them, but they can't hear me.  Never a problem with 3gs phone.  Anyone else having this problem? 

    I ended up getting a new phone, straight through Apple.  I called their technical support and went through all he basics again and they decided to replace it.  Was a pretty quick process - after defaulting and resetting the whole phone (about 2 hours),  I called them back to inform that there was no change, so they set up the order.
    I had to give my CC# so they could hold a charge on it (in case I didn't send my old phone bach, which they sent me a pre-posted package to send it in anyway).  Had a brand new iPhone 4S in my hands in 4 days, which was pretty decent.  I had uploaded everything previously to iCloud, so setting up the new phone was a snap.
    Only thing I really didn't like was they charged me almost 30 bucks for shipping or processing, or something.  Not so sure that should have been my responsibility after spending so much on a brand new product, only to have to have it warrantied after, like, a month.

  • Hi guys, I have a problem with calling my java service

    i am calling java methods for data. we are using lcds for calling java from flex. I have been successfully called couple of java methods but when i try to call one particular service i am getting below error.
    faultCode = “Server.Processing”
    faultDetail = (null)
    faultString = “java.lang.NullPointerException : null”
    i have set up destination properly and i can see in network monitor. i am actually sending the required object with proper values.
    could any body help me out?
    thanks a lot guys.

    If you are in the UK:
    Please upgrade your plan to Web n Walk plus. One of our users on T-Mobile UK had this to report back to us:
    T-Mobile UK are in fact port blocking to ensure fair usage on their base Web and Walk Plan. I have upgraded to Web and Walk Plus and as a result the port blocks are lifted and I get a higher data allowance!
    We were also recently contacted by T-Mobile UK, who stated the following:
    Any smart phone (iphone, android etc) that is bought directly from T-Mobile should be automatically provisioned with Web n Walk plus, if customers have bought a handset sim free then they will need to call customer services and get this added. It is free of charge for most price plans (including new plans) but some older plans will generate a charge of £5pm for this.

  • Hi, i have a problem receiving calls on my 6 plus ios 8.1.2

    when i receive an incoming call the phone rings only once and disconnects the call automatically, can someone please help me fix this issue?
    I tried removing the sim and replacing
    checked  "DO NOT DISTURB" settings
    reset the network settings
    reset the phone
    but i couldn't figure the problem,
    thank you,

    when i receive an incoming call the phone rings only once and disconnects the call automatically, can someone please help me fix this issue?
    I tried removing the sim and replacing
    checked  "DO NOT DISTURB" settings
    reset the network settings
    reset the phone
    but i couldn't figure the problem,
    thank you,

  • Calling a subcontroller

    hi all,
    i have a problem regarding calling a subcontroller on pushbutton event. Actually i want to display a tableview in tray through this subcontroller.
    The content of tableview is coming according to my queries but the tray is not displaying.
    In runtime error i find that error is <htmlb:tray> Class <htmlb:event>(cl_htmlb_content) was not found as BSP parent elemnt.
    I am not able to figure out it completely as my scenario is very much similar to what has been given in ITMVC2 application.And there is not much
    difference in key things.
    Followings are code of view table.htm of my subcontroller table.do where i think problem lies.
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
       <htmlb:tray id="detail" title="Employee details" design="form" width="100%" isCollapsed="false">
            <htmlb:tableView id="tvX" width="100%" visibleRowCount="5" table="<%=model->emplist%>">
            </htmlb:tableView>
    </htmlb:tray>
    Thanks for any suggestion and help.
    Amit Kumar

    Hi Max,
    Below i am giving my codes.
    MAIN CONTROLLER
    DO_INIT
    method DO_INIT.
    data: model type ref to za_model_first.
    data: empdetails type ref to cl_bsp_controller2.
    create and register model object
    model ?= create_model( class_name = 'za_model_first'
                           model_id = 'mf' ).
    create subcontroller, but initially inactive
    empdetails ?= create_controller( controller_name = 'table.do'
                                        controller_id = 'fld' ).
    controller_set_active( controller_id = 'fld'
                           active = 0 ).
    empdetails->set_model( model_id = 'mf'
                              model_instance = model ).
    endmethod.
    DO_REQUEST
    method DO_REQUEST.
    data: page type ref to if_bsp_page.
    data: model type ref to za_model_first.
    data: subcontroller type ref to cl_bsp_controller2.
    dispatch_input( ).
    page = create_view( view_name = 'first.htm' ).
    model ?= get_model( 'mf' ).
    page->set_attribute( name = 'manager' value = model->manager ).
    page->set_attribute( name = 'show_tray' value = show_tray ).
    call method runtime->server->request->get_cookie
    exporting name = 'logname'
    importing value = logname.
    CALL METHOD page->SET_ATTRIBUTE
                EXPORTING
                       NAME = 'logname'
                       VALUE = logname.
    call method runtime->server->request->get_cookie
    exporting name = 'post'
    importing value = post.
    CALL METHOD page->SET_ATTRIBUTE
                EXPORTING
                       NAME = 'post'
                       VALUE = post.
    call_view( page ).
    if model->manager is not initial.
      subcontroller ?= get_controller( controller_id = 'fld' ).
      controller_set_active( controller_id = 'fld'
                             active = 1 ).
      call_controller( subcontroller ).
    else.
      controller_set_active( controller_id = 'fld'
                             active = 1 ).
    endif.
    DO_HANDLE_EVENT
    method DO_HANDLE_EVENT .
    DATA: table_event type ref to CL_HTMLB_EVENT,
      DATA: model type ref to za_model_first.
      DATA: event_id type string.
      data page type ref to if_bsp_page.
    event_id = event.
    if htmlb_event is not initial.
      event_id = htmlb_event->id.
    endif.
    data:fields type TIHTTPNVP,
      wa_fields like line of fields.
      CALL METHOD request->if_http_entity~get_form_fields
        CHANGING
          fields = fields.
      loop at fields into wa_fields where name = 'manager'.
        manager = wa_fields-value.
      endloop.
    case event_id.
    when 'go'.
                   model ?= get_model( 'mf' ).
                   if model is not initial.
                      show_tray = 'X'.
                      model->manager = manager.
                   endif.
    when 'cpwd'.
             navigation->goto_page( 'cpwd.do' ).
    endcase.
    sub controller:
    Only DO_REQUEST
    method DO_REQUEST.
    data: model type ref to za_model_first.
    data: view type ref to if_bsp_page.
    model ?= get_model( 'mf' ).
    if model is not initial.
    model->init( ).
      view = create_view( view_name = 'table.htm' ).
      view->set_attribute( name = 'model' value = model ).
      call_view( view ).
    endif.
    endmethod.

  • Problem with call forwarding. Calls can not be forwarded for incoming external calls

    Hi Everybody, how are you?
    I have a problem with call forwarding. Everything was fine but now is not working.
    In the reception of an office, the receptionist activate the call forward option to an internal extension. If somebody, internal in the office, call to the reception, the call is forwarding to the extension configured. But if I call from the outside (in example, from my cellphone) the call is not forwarded to the extension configured and continue ringing in the reception phone. Why this behavior? Any idea?
    If you know something please tell me.
    Thanks. Best regards.
    Andres Collazos.

    I encounter a similar problem with 9.1.1.
    My problem is link to this bug ID : CSCtq10477.
    Mathieu

  • Problem with call of function F4UT_RESULTS_MAP in search help exit

    Hi everybody,
    i have a problem concerning call of function F4UT_RESULTS_MAP.
    I call this function in this way:
    CALL FUNCTION 'F4UT_RESULTS_MAP'
           TABLES
                shlp_tab          = p_shlp_tab
                record_tab        = p_record_tab
                source_tab        = lt_zv055[]
           CHANGING
                shlp              = p_shlp
                callcontrol       = p_callcontrol
           EXCEPTIONS
                illegal_structure = 1
                OTHERS            = 2.
    in lt_zv055[] there are results from previous select, but i want to select only values,
    that match select options that are specified in p_shlp.
    But it always shows all the values that are in lt_zv055.
    What am i doing wrong?
    Thanks in advance.

    Read the "Notes" part in FM documentation and you will find the reason .

  • Problem with calling onApplicationStart() method

    Hi all,
         I have a problem with calling application.cfc's methods from coldfusion template. The problem is like when i am calling "onapplicationstart" method inside a cfml template i getting the error shown below
    The onApplicationStart method was not found.
    Either there are no methods with the specified method name and argument types or the onApplicationStart method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity.
    My code is like below.
    Application.cfc
    <cfcomponent hint="control application" output="false">
    <cfscript>
    this.name="startest";
    this.applicationtimeout = createtimespan(0,2,0,0);
    this.sessionmanagement = True;
    this.sessionTimeout = createtimespan(0,0,5,0);
    </cfscript>
    <cffunction name="onApplicationStart" returnType="boolean">
        <cfset application.myvar = "saurav">
    <cfset application.newvar ="saurav2">
        <cfreturn true>
    </cffunction>
    </cfcomponent>
    testpage.cfm
    <cfset variables.onApplicationStart()>
    I have tried to call the above method in different way also like
    1--- <cfset onApplicationStart()>
    i got error like this
    Variable ONAPPLICATIONSTART is undefined.
    2---<cfset Application.onApplicationStart()>
    The onApplicationStart method was not found.
    Either there are no methods with the specified method name and argument types or the onApplicationStart method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity
    Please help me out.
    Thanks
    Saurav

    You can't just call methods in a CFC without a reference to that CFC. This includes methods in Application.cfc.
    What are you trying to do, exactly, anyway? You'd probably be better served by placing a call to onApplicationStart within onRequestStart in Application.cfc, if your goal is to refresh the application based on some condition:
    <cffunction name="onRequestStart">
         <cfif someCondition>
              <cfset onApplicationStart()>
         </cfif>
    </cffunction>
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/

Maybe you are looking for