Skip to Content
avatar image
Former Member

how to display log off window

Hi

i am naveen plz help me with thie requirement

when user clicks on logoff button a window should appear that

are you sure u want to logoff? with yes and no options

how can we do this one

kindly help me

thanks and regards

naveen

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jul 27, 2010 at 06:23 AM

    Hello,

    Please see the code sample below

    DATA: L_CMP_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.

    L_CMP_API = WD_COMP_CONTROLLER->WD_GET_API( ).

    L_WINDOW_MANAGER = L_CMP_API->GET_WINDOW_MANAGER( ).

    IF WD_THIS->POPUP IS INITIAL.

    WD_THIS->POPUP = L_WINDOW_MANAGER->CREATE_WINDOW(

    WINDOW_NAME = 'POPUPWIN'

    BUTTON_KIND = IF_WD_WINDOW=>CO_BUTTONS_OKCANCEL

    MESSAGE_TYPE = IF_WD_WINDOW=>CO_MSG_TYPE_NONE ).

    ENDIF.

    L_API = WD_THIS->WD_GET_API( ).

    ==========

    and also created buttons for this popup window using :

    ====

    WD_THIS->POPUP->SUBSCRIBE_TO_BUTTON_EVENT(

    BUTTON = IF_WD_WINDOW=>CO_BUTTON_OK

    ACTION_NAME = 'POPUP_OK'

    ACTION_VIEW = L_API

    IS_DEFAULT_BUTTON = ABAP_TRUE ).

    WD_THIS->POPUP->SUBSCRIBE_TO_BUTTON_EVENT(

    BUTTON = IF_WD_WINDOW=>CO_BUTTON_CANCEL

    ACTION_NAME = 'POPUP_CANCEL'

    ACTION_VIEW = L_API

    IS_DEFAULT_BUTTON = ABAP_FALSE ).

    WD_THIS->POPUP->OPEN( ).

    For more details see the below thread.

    How to get value from popup window into parent(Main) window in web dynpro

    Thanks

    Pradeep

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 02, 2010 at 07:58 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 02, 2010 at 09:12 AM

    hi,

    check out this blog:

    /people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications

    it will help u.

    regards,

    Amit

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 02, 2010 at 11:11 AM

    Check the link below for creating the pop up with the Step by step procedure.

    [Step by Step procedure for creating pop up|http://wiki.sdn.sap.com/wiki/display/WDABAP/WebDynproapplicationtodisplayaPop-upwindowonthebrowser]

    Below is the sample code for creating 2 view one with the main page and the next one with the pop up values. On click of the button, call the other view as below.

    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 l_api             TYPE REF TO if_wd_view_controller.
    
      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            = 'Window Name'
                  title                  = 'Title of the Window'
                  message_display_mode   = if_wd_window=>co_msg_display_mode_none
                  message_type           = if_wd_window=>co_msg_type_none
                  default_button         = if_wd_window=>co_button_cancel
                   ).
    
      wd_comp_controller->go_window = lo_window.
    
      lo_window->open( ).

    Add comment
    10|10000 characters needed characters exceeded