Skip to Content
author's profile photo Former Member
Former Member

RE: help regardng the popups

Hi experts ,

i am new to webdynpro and got the task to do such tht when we click on some button it should give me the popup window and again a popup should be displayed so plz tell me the procedure for creating the popup screen in webdynpro for abap....

Plz help it is urgent!

Thanks and regards.

Sana.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2008 at 06:08 AM

    Hi Sana,

    See this

    You can use this code at your button event

    l_cmp_api = wd_comp_controller->wd_get_api( ).

    l_window_manager = l_cmp_api->get_window_manager( ).

    INSERT `text1' INTO TABLE l_text. "#EC *

    INSERT `text 2' INTO TABLE l_text."#EC *

    l_popup = l_window_manager->create_popup_to_confirm(

    text = l_text

    button_kind = if_wd_window=>co_buttons_yesnocancel

    message_type = if_wd_window=>co_msg_type_question

    window_title = 'Confirmation'

    window_position = if_wd_window=>co_center )."#EC *

    l_api = wd_this->wd_get_api( ).

    *

    l_popup->subscribe_to_button_event(

    button = if_wd_window=>co_button_yes

    action_name = 'YES'

    action_view = l_api

    is_default_button = abap_true ).

    *

    l_popup->subscribe_to_button_event(

    *

    l_popup->open( ).

    Regards

    Sarath

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2008 at 06:11 AM

    hi misbah......

    you just click code wizard and use the method generate popup... it creates a popup for you. in case if you need a popup of your design....

    just create an extra window with a view and follow the same procedure. for further options use of the interface if_wd_window_manager.

    ---regards,

    alex b justin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2008 at 06:15 AM

    Hi Sana,

    For Details.. Check this thread

    https://forums.sdn.sap.com/click.jspa?searchID=8059747&messageID=4301805

    Regards

    Sarath

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2008 at 08:08 AM

    Hi Misbah,

    If u want to show your view as a popup than create a view ( ex. v_popup) and one window for that view ( ex. w_popup)

    Than ONactionButton DO THIS

    DATA lo_action_view TYPE REF TO if_wd_view_controller.

    DATA lo_popup TYPE REF TO if_wd_window.

    DATA lo_api_controller TYPE REF TO if_wd_component.

    DATA l_window_manager

    TYPE REF TO if_wd_window_manager.

    lo_action_view = wd_this->wd_get_api( ).

    lo_api_controller = wd_comp_controller->wd_get_api( ).

    l_window_manager = lo_api_controller->get_window_manager( ).

    lo_popup = l_window_manager->create_window(

    window_name = 'W_POPUP'

    title = 'Display'

    button_kind = if_wd_window=>co_buttons_okcancel ).

    • add here Commented part for detail see below last

    lo_popup->open( ).

    (_note_ for create window

    <Name of the window > is the name of the WD window which shall be displayed.

    <Button kind> this parameter defines which buttons will be displayed in

    lower right corner of the popup window; Please use the

    constants from interface IF_WD_WINDOW. Sample :

    IF_WD_WINDOW=>CO_BUTTONS_OK. )

    IF you want to perform some action on clicking on ok and cancel write this code where (* add here Commented part for detail see below last) this text is written

    lo_popup->subscribe_to_button_event(

    button = if_wd_window=>co_button_ok

    action_name = 'DIS'

    action_view = lo_action_view

    is_default_button = abap_true ).

    lo_popup->subscribe_to_button_event(

    button = if_wd_window=>co_button_cancel

    action_name = 'CANCEL'

    action_view = lo_action_view

    is_default_button = abap_false ).

    I hope it will work

    Regards,

    Varun

    Edited by: Varun Kumar Jain on Jan 17, 2008 10:47 AM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.