If_wd_window_manager

I want to create a popup window with three
buttons -- Replace Revise and Cancel.
Is it possible to use an instance of the if_wd_window_manager
to do this, or can I only display buttons like Yes No Cancel?

Hi,
In Pop Up windows I guess it is not possible to change the button text from the standard set of button combinations available.
But what you can do is create another view in the component same as your popup and ur required buttons.
Then you can call this view by using method create_window of if_wd_window_manager and in that method dont define any buttons.
Only one things will change, in pop up you have to subscribe to button events in the calling view , but by this way your button actions will be handled in the view containing the buttons.
Check the component WDT_DIALOGBOXES, method ONACTIONSHOW_DIALOGBOX in view MAINVIEW.
Regards
Manas Dua

Similar Messages

  • About the popup window created by if_wd_window_manager- create_window

    hi,experts
    i want to put out a pdf file in popup window.and use method create_windos of if_wd_window_manager to get it.then i find a question: i at least click twice to close the window....why? what modification i need to implement that  the window close as soon as i click the "CLOSE" button once. i guess that is normal.
    the original codes is as follows:
      data: lr_view               type ref to if_wd_view_controller,
            lr_api_main           type ref to if_wd_component,
            lr_window_man         type ref to if_wd_window_manager,
            comp_usage            type ref to if_wd_component_usage,
            l_title                   type string value 'print the contract'.
            lr_window              type ref to if_wd_window.
      lr_view = wd_this->wd_get_api( ).
      lr_api_main = wd_comp_controller->wd_get_api( ).
      lr_window_man = lr_api_main->get_window_manager( ).
    l_title = wd_comp_controller->model->get_text( '006' ).
      call method lr_window_man->create_window
        exporting
          modal        = abap_true
          window_name  = 'POPUP'
          title        = l_title
          close_button = abap_on
         BUTTON_KIND  = '1'
         default_button = '5'
        receiving
          window       = lr_window.
      lr_window->open( ).
    thanks..looking forwards to your help!

    hi ,Sajid
    1.
    data l_api_v_new_assignment type ref to if_wd_view_controller.
      l_api_v_new_assignment = wd_this->wd_get_api( ).
      data window_controller type ref to if_wd_window_controller.
      window_controller = l_api_v_new_assignment->get_embedding_window_ctlr( ).
      data window type ref to if_wd_window.
      window = window_controller->get_window( ).
      window->close( ).
    to your first option.   my codes are written  in a view of the main windows and the popup window is another, so can't get the exact window.. so there is a dump error after i test this one.
    iF MO_POPUP TYPE REF TO IF_WD_WINDOW, IS AN ATRIBUTE DEFINED IN COMPONENT CONTROLLER
    and in popup_method this is the coding related for opening popup .
    DATA:lo_api TYPE REF TO if_wd_component,
    lo_win_manager TYPE REF TO if_wd_window_manager,
    lo_api = wd_this->wd_get_api( ).
    lo_win_manager = lo_api->get_window_manager( )
    wd_this->mo_popup = lo_win_manager->create_window(
    title = 'xyz'
    window_name = 'WINDOW NAME'
    button_kind = if_wd_window=>co_buttons_okcancel
    message_type = if_wd_window=>co_msg_type_warning ).
    wd_comp_controller->mo_popup->open( ).
    Then for closing pop up on event handler method of no write the following coding
    wd_comp_controller->mo_popup->close( ).
    to second one...  i think  this part of codes are the same as mine except the last sectence...... and i add the last sentence in my coding but nothing sepecial happend...
    looking forward for more helps...thanks a lot

  • Read action from a different view in the same window

    Hi all,
    I have a view which contains a ViewContainerUIElement and a ButtonRow. A second view with form fields is embedded in the container of the first view. Validation of the form fields in the second view depends on the button pressed in the first view. How can I determine in the second view, the name of the action that is executed in the initial view?
    Thanks and regards,
    Patrick

    Patrick - I answer this question in a previous forum [Close a popup of another view being on the Main View;
    If you used the wizard in order to create the popup the wizard create a button "OK" that I'm guessing you change to "SAVE", you will need to create an EVENT HANDLER under your method list tab in my example my EVENT HANDLER is "SEARCH_RESULT" once the user click the "OK" button it will call SEARH_RESULT event and it will do your code inside the event.
      DATA LO_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.
      DATA LO_API_COMPONENT  TYPE REF TO IF_WD_COMPONENT.
      DATA LO_WINDOW         TYPE REF TO IF_WD_WINDOW.
      data LO_VIEW_C         type REF TO if_wd_view_controller.
      lo_view_c = WD_this->wd_get_api( ).
      LO_API_COMPONENT  = WD_COMP_CONTROLLER->WD_GET_API( ).
      LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).
      LO_WINDOW         = LO_WINDOW_MANAGER->CREATE_WINDOW(
                         WINDOW_NAME            = 'SEARCH_POPUP_WIN'
      *                  title                  =
      *                  close_in_any_case      = abap_true
                         MESSAGE_DISPLAY_MODE   = IF_WD_WINDOW=>CO_MSG_DISPLAY_MODE_SELECTED
      *                  close_button           = abap_true
                         BUTTON_KIND            = IF_WD_WINDOW=>CO_BUTTONS_OK
                         MESSAGE_TYPE           = IF_WD_WINDOW=>CO_MSG_TYPE_NONE
                         DEFAULT_BUTTON         = IF_WD_WINDOW=>CO_BUTTON_OK
    lo_window->subscribe_to_button_event( button = IF_WD_WINDOW=>CO_BUTTON_OK
      action_name = 'SEARCH_RESULT'
      action_view = lo_view_c
      is_default_button = ABAP_true ).
    *  lr_popup->open( ).
      LO_WINDOW->OPEN( ).
    the subscribe_to_button_event will call the event handler and it will trigger your code inside the event.
    Thanks
    Jason P-V

  • Need to stop creation of second popup until first popup is completed

    Hi All,
    I have a popup window in a WD component that display a PDF report. It works perfectly. However, I just received a new requirement to create another popup window immediately prior to the PDF report popup window which will allow the users to answer a Yes/No question which will change the content of the PDF. I thought that this would be a simple request and created another window for this new popup and preceded the call to create the PDF popup window with a call to create and open the new popup window. The problem now is that when I run the WD Application, both popups are created and opened at the same time with the first popup behind the second popup.  I do not want the second popup to be created and opened until the user selects Yes/No on the first popup window.
    Does anyone have an idea how to accomplish this?
    Thanks,
    Gregg

    Following is the code that I am currently using that is causing the issue:
    *-- Data definition
      DATA: lv_title           TYPE string.
    *-- Window Definition
      DATA:
            lr_window_manager TYPE REF TO if_wd_window_manager,
            lr_api_component  TYPE REF TO if_wd_component,
            lr_popup_window   TYPE REF TO if_wd_window,
            lr_pdf_window     TYPE REF TO if_wd_window.
    *--  Update the context before any action processing
      wd_this->update_context(  ).
      lv_title = wd_assist->if_wd_component_assistance~get_text( 'TPP' ).
      lr_api_component  = wd_this->wd_get_api( ).
      lr_window_manager = lr_api_component->get_window_manager( ).
      lr_popup_window  = lr_window_manager->create_window(
                         window_name            = 'ZZ_W_POPUP'
                         title                  = lv_title
                         message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                         button_kind            = if_wd_window=>co_buttons_yesno
                         message_type           = if_wd_window=>co_msg_type_question
                         default_button         = if_wd_window=>co_button_yes ).
      lr_popup_window->open( ).
      lv_title = wd_assist->if_wd_component_assistance~get_text( 'TPP' ).
      lr_pdf_window    = lr_window_manager->create_window(
                         window_name            = 'ZZ_W_PRINT_PDF'
                         title                  = lv_title
                         message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                         button_kind            = if_wd_window=>co_buttons_ok
                         message_type           = if_wd_window=>co_msg_type_none
                         default_button         = if_wd_window=>co_button_ok ).
      lr_pdf_window->set_window_size( width  = '98%'
                                      height = '100%' ).
      lr_pdf_window->open( ).

  • How can I rename buttons in dialog popup ?

    Hello.
    I want rename buttons "OK", "Cancel" with my names in popups.
    I create new values in domen WDR_POPUP_BUTTON_KIND
    Next enhance interface IF_WD_WINDOW with new attributes:
    CO_BUTTON_CP type WDR_POPUP_BUTTON_KIND
    But i have problem in CL_WDR_INTERNAL_WINDOW->IF_WD_WINDOW~SET_BUTTON_KIND:
      case me->buttons-button_kind.
        when co_buttons_abortretryignore.
          wa_button-button      = co_button_abort.
          wa_button-button_text = cl_wdr_texts=>get_text( '201' ).
          wa_button-tooltip     = cl_wdr_texts=>get_text( '201' ).
          wa_button-is_enabled  = abap_true.
    This code show only predefined type of buttons can use. 
    How can I rename buttons in dialog popup ?

    When you subscribe to button event  you can rename the button
    * Popup
      DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component  TYPE REF TO if_wd_component.
      DATA lo_window         TYPE REF TO if_wd_window.
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      lo_window         = lo_window_manager->create_window(
        window_name          = 'W_POPUP'
        message_display_mode = if_wd_window=>co_msg_display_mode_selected
        button_kind          = if_wd_window=>co_buttons_ok
        message_type         = if_wd_window=>co_msg_type_none
        default_button       = if_wd_window=>co_button_ok
      DATA:  l_api TYPE REF TO if_wd_view_controller.
      l_api = wd_this->wd_get_api( ).
    " subscribe to button event
      lo_window->subscribe_to_button_event(
                   button            = if_wd_window=>co_button_ok
                   BUTTON_TEXT       = u2018Approveu2019 " renaming the button text
                   action_name       = 'ON_OK_POPUP'
                   action_view       = l_api
                   is_default_button = abap_true ).
      lo_window->open( ).
    Radhika

  • Problem with POPUP and exit plug

    Hi together,
    in my case under certain conditions i create a popup window from a view with the method "if_wd_window_manager->create_popup_to_confirm( )"
    The popup displays an error or success message to the user and a "OK" button is available. I stored the popup window in the attributes of the underlying view. So an action "OK_BUTTON_PRESSED" of the view is assigned to the OK-button of the popup using method "if_wd_window->subscribe_to_button_event( )".
    In the action handler two commands are executed:
    1) closing the popup with "if_wd_window->close( ) method of the popup reference stored in the view attributes".
    and
    2) firing a navigation plug from the view to the underlying window which calls its own window exit-plug.
    Now my problem is that the popup window does not close when i leave the view with the navigation plugs. Without the plugs everything is working fine. It seems that the underlying view/window must still be available to close the popup.
    In my case the exit plug is called. I can see it because a new URL is called and i can see the new page but the modal popup is still there and not closed.
    Has anyone an idea how to solve that problem?
    Edited by: Dirk Jäckel on May 23, 2008 3:34 PM

    hi dirk......
             what you can do is first execute the close method and set an attribute to 'X' once this close is over. then in your wddomodify method of the view check for that attribute and fire that plug. so the firing should take place in the modify view method.
    ---regards,
       alex b justin

  • What is the preferred way to open a new url in a new window/popup?

    Hi Guys,
    I have an application that requires me to show another URL (Fedex tracking number) once a button is clicked.
    what is the preferred way to do it?
    Should I open a new browser or a popup?
    I would appreciate if you have a code example I can use.
    Thanks,
    Itay

    hi,
    For opening a URL , you could also close previous window and open a new browser.
    Follow the steps :
    -> make an outbound plug in your window.
    -> Add URL of type string as a parameter for your outbound plug.
    ->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of win from view wont b psbl).
    Write the below mentioned code to call a URL  in the OnAction of button :
    DATA lo_zexit TYPE REF TO ig_zexit .
    lo_zexit =   wd_this->get_zexit_ctr( ).
      lo_zexit->fire_out_window_plg(
        url =   'http://www.google.com'                            " string
    here replace ig_zexit with your  ig<applicatin name>.
    Other way around is using Code Wizard ( control _ F7).
    Write the below code in the onaction of button :
    data lo_window_manager type ref to if_wd_window_manager.
    data lo_api_component  type ref to if_wd_component.
    data lo_window         type ref to if_wd_window.lo_api_component  = wd_comp_controller->wd_get_api( ).
    lo_window_manager = lo_api_component->get_window_manager( ).CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
      EXPORTING
        URL            = 'http://www.google.co.in/'
        MODAL          = ABAP_FALSE
        HAS_MENUBAR    = ABAP_TRUE
        IS_RESIZABLE   = ABAP_TRUE
        HAS_SCROLLBARS = ABAP_TRUE
        HAS_STATUSBAR  = ABAP_TRUE
        HAS_TOOLBAR    = ABAP_TRUE
        HAS_LOCATION   = ABAP_TRUE
      RECEIVING
        WINDOW         = lo_window.lo_window->open( ).
    You can choose any way whichever suits your requirements.
    I hope it helps.
    Thanx.

  • Closing pop-up box error

    Hello,
    Im getting  a frustrating problem'  Access via 'NULL' object reference not possible ' when I try to close the popup box , I am assuming its something to do with either setting up my nodes or attributes, unfortunately i tried everything I could but nothing worked.
    this is the part of the code action to generate a popup box, subscribe and assign the OK button an action
    method ONACTIONADD_NAME .
      Data: context_node         type ref to if_wd_context_node.
      data lv_action_view          TYPE REF TO if_wd_view_controller.
      DATA lv_title                    TYPE string.
      DATA lo_nd_add_name    TYPE REF TO if_wd_context_node.
      DATA lo_el_add_name     TYPE REF TO if_wd_context_element.
      DATA ls_add_name         TYPE wd_this->element_add_name.
      data lo_window_manager  type ref to if_wd_window_manager.
      data lo_api_component    type ref to if_wd_component.
      data lo_window                type ref to if_wd_window.
    generate a popup box
       lo_api_component  = wd_comp_controller->wd_get_api( ).
       lo_window_manager = lo_api_component->get_window_manager( ).
       lo_window         = lo_window_manager->create_window(
                       window_name            = 'W_ADD_NAME'
                       title                  = 'Add a Tester'
                       close_in_any_case      = abap_false
                       message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                       close_button           = abap_true
                       button_kind            = if_wd_window=>co_buttons_okcancel
                       message_type           = if_wd_window=>co_msg_type_none
                       default_button         = if_wd_window=>co_button_ok
    Subscribe the action handler methods to the popup ok and cancel buttons
      lv_action_view = wd_this->wd_get_api( ).
          lo_window->subscribe_to_button_event(
                 button            = if_wd_window=>co_button_ok
                 action_name       = 'ON_OK_ADD_NAME'
                 action_view       = lv_action_view
    lo_window->open( ).
    endmethod.
    and this is the action where I have the issue of closing the popup box
    DATA lo_nd_ui_manipulation TYPE REF TO if_wd_context_node.
      DATA lo_nd_add_name        TYPE REF TO if_wd_context_node.
      DATA lo_el_add_name        TYPE REF TO if_wd_context_element.
      DATA lo_nd_sname           TYPE REF TO if_wd_context_node.
      DATA ls_add_name           TYPE wd_this->element_add_name.
      DATA lo_nd_sname_copy      TYPE REF TO if_wd_context_node.
      DATA lt_sname_copy         TYPE wd_this->elements_sname_copy.
      DATA lv_msg_text           TYPE string.
      DATA lv_param1             TYPE symsgv.
      DATA lv_param2             TYPE symsgv.
      DATA lv_param3             TYPE symsgv.
      DATA lv_elements_count     TYPE i.
      data lo_window             type ref to if_wd_window.
    get message manager
      data lo_api_controller     type ref to if_wd_controller.
      data lo_message_manager    type ref to if_wd_message_manager.
    Read the values user entered in add name popup
      lo_nd_add_name = wd_context->get_child_node( name = wd_this->wdctx_add_name ).
      lo_el_add_name = lo_nd_add_name->get_element(  ).
      lo_el_add_name->get_static_attributes(
        IMPORTING
          static_attributes = ls_add_name ).
      IF ls_add_name IS INITIAL OR ls_add_name-first_name IS INITIAL.
    display messages fill in the required field in the pop-up windows
       lo_api_controller ?= wd_This->Wd_Get_Api( ).
       CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
         RECEIVING
        MESSAGE_MANAGER = lo_message_manager.
       CALL METHOD lo_message_manager->REPORT_T100_MESSAGE
         EXPORTING
         MSGID         = '00'
         MSGNO         = 055
         MSGTY         = 'E' .
      ELSE.
      Check if the name  is already present
        lo_nd_sname_copy = wd_context->get_child_node( name = wd_this->wdctx_sname_copy ).
        CHECK NOT lo_nd_sname_copy IS INITIAL.
        CALL METHOD lo_nd_sname_copy->get_static_attributes_table
          IMPORTING
            table = lt_sname_copy.
        READ TABLE lt_sname_copy WITH KEY first_name = ls_add_name-first_name TRANSPORTING NO FIELDS.
        IF sy-subrc EQ 0.
        If a same name  exist, raise error message
          lv_msg_text = 'name exist, please enter a different name'.
          lo_api_controller ?= wd_This->Wd_Get_Api( ).
          CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
           RECEIVING
             MESSAGE_MANAGER = lo_message_manager.
         CALL METHOD lo_message_manager->REPORT_ERROR_MESSAGE
           EXPORTING
             MESSAGE_TEXT             = lv_msg_text.
        ELSE.
    if the name doesnt exist
       lo_nd_sname_copy = wd_context->get_child_node( name = wd_this->wdctx_sname_copy ).
        CHECK NOT lo_nd_sname_copy IS INITIAL.
        CALL METHOD lo_nd_sname_copy->get_static_attributes_table
          IMPORTING
            table = lt_sname_copy.
        READ TABLE lt_sname_copy WITH KEY first_name = ls_add_name-first_name TRANSPORTING NO FIELDS.
      IF the name doesnt exist , add name
        lo_nd_sname = wd_context->get_child_node( name = wd_this->wdctx_sname ).
          CHECK NOT lo_nd_sname IS INITIAL.
          lo_nd_sname->bind_structure( new_item = ls_add_name set_initial_elements = abap_false ).
          CLEAR lt_sname_copy.
          CALL METHOD lo_nd_sname->get_static_attributes_table
            IMPORTING
              table = lt_sname_copy.
    add the name to the local context
          lo_nd_sname_copy->bind_table( lt_sname_copy ).
    add the name to the shared data name context
          lo_nd_sname->bind_table( lt_sname_copy ).
    set the table's visible row property in order to show the added record
          lv_elements_count = lo_nd_sname_copy->get_element_count( ).
          lo_nd_ui_manipulation = wd_context->get_child_node( name = wd_this->wdctx_ui_manipulation ).
          lo_nd_ui_manipulation->set_attribute( name =  `VISIBLEROW` value = lv_elements_count ).
          lv_param1 = ls_add_name-first_name.
          lv_param2 = ls_add_name-last_name.
          lv_param3 = ls_add_name-c_num.
    display a successfull message
    lo_api_controller ?= wd_This->Wd_Get_Api( ).
    CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
      RECEIVING
        MESSAGE_MANAGER = lo_message_manager
    report message
    CALL METHOD lo_message_manager->REPORT_SUCCESS
      EXPORTING
        MESSAGE_TEXT             = 'succesfully added'.
    Enable/disable delete button based on lead selection
          CALL METHOD wd_comp_controller->manage_delete_button .
    Save the last action in the context, this data will be shown in the idr
          CLEAR lv_msg_text.
          lv_msg_text = wd_assist->if_wd_component_assistance~get_text( key = '014' ).
          CONCATENATE lv_msg_text ls_add_name-first_name INTO lv_msg_text SEPARATED BY space.
          lo_nd_ui_manipulation = wd_context->get_child_node( name = wd_this->wdctx_ui_manipulation ).
          lo_nd_ui_manipulation->set_attribute( name =  `IDR_LAST_ACTION` value = lv_msg_text ).
    lo_window->close( ).
    every time I add the lo_window->close( ). I get the Null error.
    Thanks in advance

    Hi Abdul,
    I guess that you want the user to be able to modify the data in the table & then have the changes made saved to database. Right? SAP recommends using a BAPI for doing the same. (Using a [Service Call|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9cb5d345-0801-0010-6a8e-fc57c23fd600] you can call a BAPI from within your component & get the desired functionality.) If you however intend to just try out a sample example in your IDES then you can directly try using the normal ABAP MODIFY statement on the database table. Try check the sample code snippet below.
    Regards,
    Uday
    data:
          node_sflight           type ref to if_wd_context_node,
          elem_sflight           type ref to if_wd_context_element,
          lt_elements            type WDR_CONTEXT_ELEMENT_SET,
          stru_sflight           type if_main=>element_sflight_node,
          it_flights             type if_main=>elements_sflight_node.
    "   navigate from <CONTEXT> to <SFLIGHT_NODE> via lead selection
        node_sflight_node = wd_context->get_child_node( name = if_main=>wdctx_sflight_node ).
    "   get element via lead selection
    "    elem_sflight_node = node_sflight_node->get_element(  ).
         lt_elements = node_sflight->get_elements( ).
    "   get all declared attributes
        loop at lt_elements into elem_sflight.
        elem_sflight->get_static_attributes(
          importing
            static_attributes = stru_sflight ).
        append stru_sflight to it_flights.
        endloop.
        modify ZSFLIGHT99 from table it_flights.
        if sy-subrc eq 0.
        endif.

  • How to call a window dynamically from a view

    Dear forum experts,
    I am developing an application where i have  4 view controllers and 2 window controllers under one component.Some times on click of a button i have to give a provision to switch to another view from one view, which i did by firing the plug to the corresponding view..
    Now i have a requirement where, on click of a button i have to navigate to the window dynamically which would contain some static views,
    Can some one please suggest me how to go about it.
    Thanks.

    Hi,
      You can raise the window as a pop-up.
    Example.
      DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component  TYPE REF TO if_wd_component.
      DATA lo_window         TYPE REF TO if_wd_window.
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      lo_window         = lo_window_manager->create_window(
                         window_name            = 'ZWIN2'
                       title                  =
                       close_in_any_case      = abap_true
                         message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                       close_button           = abap_true
                         button_kind            = if_wd_window=>co_buttons_ok
                         message_type           = if_wd_window=>co_msg_type_none
                         default_button         = if_wd_window=>co_button_ok
      lo_window->open( ).
    I am not sure how to navigate to a view in a different window using plugs.
    I raised the view as a pop up in my requirement.
    Cheers,
    Aditya.

  • Open link in the same Window

    Hello,
    i want to open a link from a WDA Action Method, in order to open a bsp applikation. The new page should appear in the same window (no popup, no new window). Here the code which i have at the moment, but the BSP Applikation starts always in a new window. What can i do ?
    data:
    lt_parameters TYPE TIHTTPNVP,
    ls_url               type string,
    lo_window_manager type ref to if_wd_window_manager,
    lo_api_component      type ref to if_wd_component,
    lo_window                type ref to if_wd_window.
    CALL METHOD cl_http_ext_webapp=>create_url_for_bsp_application
          EXPORTING
            bsp_application       = 'ZHRMPBA004'
            bsp_start_page       = 'ZHRMPBPTI006.htm'
            bsp_start_parameters = lt_parameters
          IMPORTING
            abs_url              = ls_url.
    lo_api_component  = wd_comp_controller->wd_get_api( ).
    lo_window_manager = lo_api_component->get_window_manager( ).
    CALL METHOD lo_window_manager->CREATE_external_WINDOW
              EXPORTING     URL            = ls_url
             RECEIVING     WINDOW         = lo_window.
    lo_window->open( ).
    thanks for replays

    You are calling CREATE_external_WINDOW. That API is designed to open the application in a new window.  So that isn't appropriate for what you want.  If you want to navigate in place then you should use an Exit Navigation Plug.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/frameset.htm

  • Webdynpro pop up text change

    Hi All,
    I have created a pop up window by using method create_popup_to_confirm of if_wd_window_manager . I have created the OK button by using if_wd_window=>co_button_ok of if_wd_window .
    I need to change the default button text " OK  " to " EDIT ". I am following the below approach .
            view_controller = wd_this->wd_get_api( ).
            lo_window->subscribe_to_button_event(
            button = if_wd_window=>co_button_ok
            button_text = 'EDIT'
            action_name = 'MSG'
            action_view = view_controller ).
    Note : Action " MSG "  is a dummy action which I have created just to change the default button text .
    This works if the control is in the same view where pop up is called . If we have to go back to other webdynpro component/ view then , after clicking on EDIT button in pop up , it gives the dump with the error " Controller for View, Window, Interface, and Configuration Cannot Be Created " .
    Please let me know if there is any other way to change the default text in the pop up screen or any other solution . I am ok to use any other method which creates pop up window and default text should be modified .
    Thanks,
    Kiran.

    Hi Kiran,
    If its that important for you to change the button label, I would suggest creating a new view and calling it as a popup.
    Please follow below steps to do so:
    1) Create a new view with your respective design having message and EDIT button.
    2) Create a new window say Popup_Window
    3) Add the new view to this window and add below code
    4)Create a
    Data: context_node type ref to if_wd_context_node.
      data: lr_popup type ref to if_wd_window,
            lr_view_controller type ref to if_wd_view_controller.
      data: lr_api_comp_controller type ref to if_wd_component,
            lr_window_manager type ref to if_wd_window_manager.
      lr_api_comp_controller = wd_comp_controller->wd_get_api( ).
      lr_window_manager = lr_api_comp_controller->get_window_manager( ).
      lr_popup = lr_window_manager->create_window(
      MODAL               = ABAP_TRUE
      window_name         = 'POPUP_WINDOW'  "Name of the window created in step 2
      TITLE               = Confirmation Message"
      CLOSE_BUTTON        = ABAP_TRUE
      BUTTON_KIND         = if_wd_window=>CO_BUTTONS_OKCANCEL
    MESSAGE_TYPE        = if_wd_window=>co_msg_type_error
      CLOSE_IN_ANY_CASE   = ABAP_TRUE
    *MESSAGE_DISPLAY_MODE = MESSAGE_DISPLAY_MODE
    Adds an action to the popup screen buttons
    lr_view_controller = wd_this->wd_get_api( ).
    lr_popup->subscribe_to_button_event(
    button = if_wd_window=>co_button_ok
    button_text = 'EDIT'
    action_name = 'EDIT'
    action_view = lr_view_controller ).
      lr_popup->open( ).
    I hope it helps.
    Please revert back in case of issues.
    Regards,
    Sumit

  • ACTIONS ON ALV REPORT FOR CHECKBOX?

    hi All,
    i have to display ALVreport with one of the columns has checkbox.whenever user presses any checkbox,in repected row values have to be validated and updated in DataBase.
    My First Doubt is,How can i get the column of checkBoxes in ALV Report.?
    2.How can i add action for that checkBox?
    Regards,
    Ravi.

    Hi Ravi,
    Your requirement can be achieved by creating a custom function in your ALV.
    We create a button in the ALV toolbar with text 'Confirm'. When user clicks on this, a popup screen is called for confirmation. Based on the input we set the flag.
    To accomplish this, When defining the configuration model of the ALV, do the following
    Assume that we get the model of the ALV into lo_list
    lo_list = lo_ref_interfacecontroller->get_model( ).
    DATA:
    * Generate an object for self defined functions
        lo_self_functions          TYPE REF TO if_salv_wd_function_settings,
    * Generate an object for button 'Confirm'
        lo_button_conf          TYPE REF TO cl_salv_wd_fe_button,
    * Set Self-defined functions
    * 'Confirm' Button
      lo_self_functions ?= lo_list.
      lo_self_function = lo_self_functions->create_function( 'CONFIRM' ).
      CREATE OBJECT lo_button_conf.
      CLEAR l_text.
      l_text = 'Confirm'
      lo_button_sel_all->set_text( l_text ).
      lo_button_sel_all->set_image_source( '< Any icon name >' ).
      lo_button_sel_all->set_image_first( 'X' ).
      lo_self_function->set_editor( lo_button_conf ).
    In the methods tab, Create a event handler for ON_FUNCTION event of the ALV.
    ONFUNTION     Event Handler     ON_FUNCTION     ON_FUNCTION     INTERFACECONTROLLER     alv_name
    In the ONFUNCTION method, Do the following.
      DATA:
        l_window                  TYPE REF TO if_wd_window,
        l_componentcontroller_api TYPE REF TO if_wd_component,
        l_window_manager          TYPE REF TO if_wd_window_manager,
        l_api                     TYPE REF TO if_wd_view_controller,
        lt_text                   TYPE string_table,
        l_text_line               TYPE string.
    * Based on the function selected, set the selection
      CASE  r_param->id.
        WHEN 'CONFIRM'.
    * Call the confirmation for popup
      l_api = wd_this->wd_get_api( ).
      l_componentcontroller_api = wd_comp_controller->wd_get_api( ).
      l_window_manager = l_componentcontroller_api->get_window_manager( ).
      CALL METHOD l_window_manager->create_popup_to_confirm
        EXPORTING
          text            = lt_text
          button_kind     = if_wd_window=>co_buttons_yesno
          message_type    = if_wd_window=>co_msg_type_question
          window_position = if_wd_window=>co_center
        RECEIVING
          result          = l_window.
      CALL METHOD l_window->subscribe_to_button_event
        EXPORTING
          button            = if_wd_window=>co_button_yes
          action_name       = 'YES'
          action_view       = l_api
          is_default_button = abap_false.
      CALL METHOD l_window->subscribe_to_button_event
         EXPORTING
           button            = if_wd_window=>co_button_no
           action_name       = 'NO'
           action_view       = l_api
           is_default_button = abap_false.
      l_window->open( ).
      ENDCASE.
    Create 2 actions with names YES and NO ( As mentioned in the subscription.
    In these actions, bases on the inputs, set the flag to a context attribute and update the same in the table you wanted.
    Hope this is what you want.
    Regards,
    Sravan Varagani.

  • Not able to display the desired view if button is pressed in POPup window

    Hi Experts,
    I have developed a web dynpro application.In this i have created a pop up window which consists of three buttons YES , NO and CANCEL.
    I have developed three event handlers in the view VIEW_POPUP which is acting as view of the pop_up window.  When i click on any of these buttons no event handler is getting triggered.
    Please give your suggestion as where the problem is.

    Hi Ravi,
    I think u created a  view and embedded it in another window and calling that window.,
    If u want to display a popup window with action buttons., jus use create_popup_to_confirm() method.
    refer this code,.
    * Data declarations for Pop up window
      data: lt_text type string_table,
            lo_window_manager type ref to if_wd_window_manager,
            lo_api_component type ref to if_wd_component,
            lo_window type ref to if_wd_window,       
            l_api type ref to if_wd_view_controller.
       msgtext = 'Do u want to continue. ?'
        append msgtext to lt_text.
          clear: tmp_from , tmp_to .
          l_api = wd_this->wd_get_api( ).
          lo_api_component = wd_comp_controller->wd_get_api( ) .
          lo_window_manager  = lo_api_component->get_window_manager( ).
          lo_window1 =
          lo_window_manager->create_popup_to_confirm(
                 text = lt_text
                 button_kind = if_wd_window=>co_buttons_okcancel
                 message_type = if_wd_window=>co_msg_type_information   " this is info msg u can give error message here
                 close_button = 'X'
                 window_title = 'Confirmation message box'
    *       lo_window->subscribe_to_button_event
          lo_window1->subscribe_to_button_event(
            button = if_wd_window=>co_button_ok
            action_name = 'SUBMIT_REQUEST'                     " Submitting Request. " u have to create SUBMIT_REQUEST Action
            button_text = 'Yes'                                             " And Place the code in that action which u want to execute when yes
            action_view = l_api
            is_default_button = abap_false
    *       lo_window->subscribe_to_button_event
          lo_window1->subscribe_to_button_event(
            button = if_wd_window=>co_button_cancel
            action_name = 'CANCEL_REQUEST'                     " Calling Action On clicking NO. "u have to create CANCEL_REQUEST
            button_text = 'NO'                                              "Action
            action_view = l_api
            is_default_button = abap_true
          lo_window1->open( ).
    reply if u need some more clarifications.,
    Thanks & Regards
    Kiran

  • Display Archived Document in Abap Webdynpro without opening new window.

    I would like to create a wd4a application that receives the parameters of Archive ID and Doc ID and displays the archived document.  The document is stored as a pdf on SAP's content server.  Currently the webdynpro will open a separte blank Window.  I have not defined any view elements to the embedded view because I do know which view element I should to display the archived documente.  I have a url to the document and it will get displayed by creating an new window by executing  the code below to launch the file in a separate window.   The Adobe Viewer creates a new window to view the document.  Does  anyone know what view Uielement I should use to view the document in the main window and main view?
    Thank you
    Tom
    data ld_url type dms_url.
    data ls_message type bapiret2.
      call function 'SCMS_AO_URL_READ'
        exporting
          MANDT               = SY-MANDT
          arc_id              = id_archive_id
          doc_id              = id_arc_doc_id
          COMP_ID             =
          DOCUMENT_TYPE       = ' '
          PDF_MODE            = 'A'
          HTTP_URL_ONLY       = ' '
          DP_URL_ONLY         = ' '
           loc_info            = 'F'
          LIFETIME            = 'T'
          NO_CACHE            = ' '
       importing
         url                 = ld_url
       exceptions
           error               = 1
           others              = 2
    assert sy-subrc = 0.
    added by YINS Mar.05 2007
      if sy-subrc <> 0.
        ls_message-type = 'E'.
        ls_message-id = sy-msgid.
        ls_message-number = sy-msgno.
        ls_message-message_v1 = sy-msgv1.
        ls_message-message_v2 = sy-msgv2.
        ls_message-message_v3 = sy-msgv3.
        ls_message-message_v4 = sy-msgv4.
        append ls_message to wd_this->mt_messages.
       wd_this->flush_messages( ).
        return.
      endif.
      data:
        lr_api_comp_controller  type ref to if_wd_component,
        lr_window_manager       type ref to if_wd_window_manager,
        lr_window               type ref to if_wd_window,
        ld_url_str              type string.
      lr_api_comp_controller = wd_this->wd_get_api( ).
      lr_window_manager = lr_api_comp_controller->get_window_manager( ).
      ld_url_str = ld_url.
      lr_window = lr_window_manager->create_external_window(
          url   = ld_url_str
      lr_window->open( ).

    I found a solution after much troubleshooting including uninstalling/reinstalling Office 2010 which didn't solve the issue. 
    Here it is:
    When Outlook or some other Office program is minimized in the taskbar and won't open, right click the taskbar to bring up task manager. 
    Right click the program in the task manager list that is giving trouble and click Maximize.  You should now see a full screen.
    This worked for me and solved the "open and stays minimized" delima.  Hope this helps you too.  Cheers :)
    Thanks a bunch this saved me a potential headache!

  • How to get the reference of the View controller in from Custome controller

    Hi friends,
    From one of the Custome controllers in my Component,I am raising a popup based on conditions.
    I want to subscribe to popup buttons.
    Following is the code that I have written.
    IF LT_RECEIPTS_T[] IS not INITIAL.
        data lo_window_manager type ref to if_wd_window_manager.
        data lo_api_component  type ref to if_wd_component.
        data lo_window         type ref to if_wd_window.
    *BREAK-POINT.
        lo_api_component  = wd_comp_controller->wd_get_api( ).
        lo_window_manager = lo_api_component->get_window_manager( ).
        lo_window         = lo_window_manager->create_window(
                           window_name            = 'W_PERSONALCARDPOPUP'
                           message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                           button_kind            = if_wd_window=>co_buttons_okcancel
                           message_type           = if_wd_window=>co_msg_type_none ).
        lo_window->open( ).
        DATA: view_controller TYPE REF TO if_wd_view_controller.
        view_controller = wd_this->wd_get_api( ).
        CALL METHOD lo_window->subscribe_to_button_event
          EXPORTING
            button      = if_wd_window=>co_button_ok
            action_name = 'OK'
            action_view = view_controller.
    as I am In Custome controller,wd_get_api is returing of type if_wd_controller,but the subscribe_to_button_event
    requires action_view of data type if_wd_view_controller.
    but,my problem is that I can keep the view only Custome controller.
    when I pass the 'VIEW_CONTROLLER' variable to method subscribe_to_button_event,I am getting the error  as type missmatch.
    Please suggest how I can rectify this error.
    Regards,
    Xavier.P

    Hi Xavier,
    You try this
    1. Define an attribute in your custom controller to hold your popup window reference for e.g lr_popup of type if_wd_window
    2. Store the popup window reference in lr_popup when calling your popup
    lo_api_component = wd_comp_controller->wd_get_api( ).
              lo_window_manager = lo_api_component->get_window_manager( ).
              wd_this->lr_popup = lo_window_manager->create_window(
                              window_name = 'W_PERSONALCARDPOPUP'
                              message_display_mode = if_wd_window=>co_msg_display_mode_selected
                              button_kind = if_wd_window=>co_buttons_okcancel
                              message_type = if_wd_window=>co_msg_type_none ).
             wd_this->lr_popup->open( ).
    3. Define the custom controller usage in the properties of your popup view
    4. In WDDOINIT of your popup view write the following
    DATA lr_custom_controller TYPE REF TO ig_<Custom Controller>.
            lr_custom_controller = wd_this->get_<Custom Controller>_ctr( );
            lr_custom_controller->lr_popup->subscribe_to_button_event(
         button = if_wd_window=>co_button_ok
         action_name = 'OK'
         action_view = wd_this->wd_get_api( ) ).
    5. Define the event handler for OK in your popup view
    Best Regards,
    Loveline

Maybe you are looking for

  • Documents opened in Acrobat XI are hard to read

    I apologize for this post being in the wrong forum.  Unfortunately, Adobe did not see fit to create a forum for the most basic problems. Here is the problem:  Whenever I open a PDF with text in it, it is virtually unreadable to my eyes.  The pixelati

  • Business scenario..for ISU and integration with R/3 modules..

    Scenario:  1.     Client is providing Utility services to the customer and also to its own employees. The service is also consumed by the employees who are treated as contract partners in ISU. The constraint is that the utility bill has to be deducte

  • APEX Forum Sticky

    After starting to update the OTN forum FAQ, I decided that I would try to get the APEX 'Welcome to the forum' sticky amended to include links to docs, and maybe some amended ettiquette guidlelines etc. To this end I contacted Sharon Kennedy at Oracle

  • IWeb 08 blog posting issue using Cyberduck

    Tried to upload a blog page to my website and get the words "blog summary widget" where the content should be. I see it's been noted as a problem in other MAC communities but I haven't yet read a satisfactory resolution.

  • Is it possible to download and install CS4 if I have a serial number?

    Is it possible to download and install CS4 if I have a serial number? I have just bought a IMac which doesn't come with a disc drive and I need to use my Photoshop asap but only have the software on disc. Can I download an older version of PS from th