cancel
Showing results for 
Search instead for 
Did you mean: 

Pop-up window in Web UI

Former Member
0 Kudos

Hi All,

I want to develop a Pop-up in crm web ui.how a pop-up can be developed in web ui.and i want show simple hello word in popup.can any one help me?

Thanks in Advance

Vishwas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

There are many methods to do this.It depends on the way and the action required to launch the pop up and the info to be shown in the pop up.There are many standard methods to create a pop up in this interface IF_BSP_WD_WINDOW_MANAGER.

A sample snippet...to show a decision pop up.

CALL METHOD comp_controller->window_manager->create_popup_2_confirm

EXPORTING

iv_title = lv_title

iv_text = lv_text

iv_btncombination = if_bsp_wd_window_manager=>co_btncomb_okcancel

RECEIVING

rv_result = confirm_popup.

confirm_popup->set_on_close_event( iv_event_name = 'POPUP_CLOSED' iv_view = me ). ENDIF.

confirm_popup->open( ).

Regards,

Masood Imrani S.

Former Member
0 Kudos

Hi Masood Imrani ,

Thanks for ur quick reply. Can you tell me one thing also where should i write this code . and how to handle this popup .want to create any custom component for that or simply write in standard component.I want handle this popup by action

Thanks in advance.

Vishwas

Former Member
0 Kudos

Vishwas,

This code is used to open a pop up on a button click.No need to create a custom component again.

Add a button on whichever standard component you want to display this pop up.

The buttons will be available in either DO_PREPARE_OUTPUT or IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS depending on the type of view.In the event handler for the button,write this code. All the coding is using TCODE BSP_WD_CMPWB.

Now, in the code I earlier mentioned if you pass

iv_btncombination = 0 and

lv_text = 'Hello', you will get the required thing.

It is good if you debug any standard components and find out what is happening.

This way you will get lot of info.

Regards,

Masood Imrani S.

Former Member
0 Kudos

The standard component and the view where the button is required need to be enhanced and then the on click action event handler can be created there and the code can be implemented.

In the IMPL class the confirm_popup attribute needs to be declared of type IF_BSP_WD_POPUP.

Former Member
0 Kudos

Hi Masood,

can you tell me plz how to enhance any component.

thanks

Vishwas

Former Member
0 Kudos

First you need to identify the component and the view to be enhanced by doing an F2 on the UI.

Then you need the enhance the component.

Before doing that an enhancement set needs to be in place. To do that ...

1. Use TCODE SM34 and give view cluster-BSPWDVC_CMP_EXT and create an EHSET.

2. Assign a Client in TCODE SM30 using view - BSPWDV_EHSET_ASG.

Once you do this, use TCODE BSP_WD_CMPWB, open the component you want to enhance and click display by keying in the EHSET. Now, on the top right corner click the ENHANCE COMPONENT button,

specify a BSP application and enhance(say yes when it asks to create the BSP application).

Now come out of the Transaction and open it again. Now you cannot see the ENHANCE COMPONENT button anymore. Right click on the view where the button needs to be added and enhance it.The view text(name) will be in grey colour earlier, once enhanced they will become black and the Z IMPL and CTXT classes get created.

There are mant threads in this forum on similar topics like adding new fields etc.,the initial steps to enhance the component and view are same.

Former Member
0 Kudos

Hi Mahssod,

finelly i wantto ask one more thing we can create a method "eh_ on_click" in the implemenation class, right ? for instance if i want to create a pop up in the Ibase , i will create a button , when the user press the button the method will be called .this is right.

thanks

vishwas

Former Member
0 Kudos

The button gets created if you write this code on the method I mentioned earlier.(DO_PREPARE_OUTPUT or TOOLBAR Get Buttons).

ls_button-page_id = me->component_id.

ls_button-id = 'NEW'.

ls_button-text = 'NEW'.

ls_button-tooltip = 'NEW'.

ls_button-on_click = 'PUSHNEW'.

ls_button-type = cl_thtmlb_util=>gc_icon_new.

ls_button-enabled = abap_true.

APPEND ls_button TO rt_buttons.

Whatever value you pass in ls_button-on_click, you need to create an event handler with this name

like EH_ONPUSHNEW and write code there. This gets called when the button is clicked.

Actually this event handler is called from method DO_HANDLE_EVENT in IMPL class which is like PAI in dialog programs.

Former Member
0 Kudos

Hi Massod,

I have created one implemetatiob for one Z component , now this compnent is a drop down box , Can you please tell me which event should i reaise\triggrred if a user slects an entry from the drop down box so that GET/SET gets triggered.

Presently when i hit entere by keeping a cursor on any field the GET SET methods are getting called otherwise not.

Thanks in advance,

Mayank Choudhary

Former Member
0 Kudos

Hi Experts,

Can any one tell me how to identify the confimation. I could not find any kind of data to identify the option selected by user (Ok/Cancel) in the close event embedded object when i placed the debug point in DO_HANDLE_EVENT for pop-up close event.

Thanks,

Karthik

Edited by: Karthik Vishwamurthy on Jan 11, 2010 10:57 AM

Former Member
0 Kudos

I got the answer while debugging the pop-up object. By calling the get_fired_outbound_plug method from the created pop-up object in do-handle event. We can identify the user choice.

Answers (0)