cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a Custom View as Pop Up

Former Member
0 Kudos

Hello Guys,

I have added a button UPLOAD in an assignment block and created an event handler method for EH_ONUPLOAD

for navigating to a Custom view as a pop up on click of this button .

Code for adding button:

ls_button-on_click = 'upload'. "EH_ONIMPORT_FROM_FILE
  ls_button-text     = l_import.
  ls_button-enabled  = l_enabled.
  APPEND ls_button TO gt_button.

Code under event Handler method :

gr_file_popup = comp_controller->window_manager->create_popup(
    iv_interface_view_name = 'BP_EMPL/ZNUPLOAD'
    iv_usage_name = 'ZCuFileUpload'
    iv_title = l_title ).

I have also created a Custom Window for holding this custom view and made this window as Interface view.I have defined

component usage using this interface view.

Now ,my navigation on click of UPLOAD button to the custom view does not works.

Please suggest.

Regards

Najam

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks

former_member191572
Contributor
0 Kudos

Hi,

Pls paste your full code, i ll check and confirm u.

Former Member
0 Kudos
gr_file_popup = comp_controller->window_manager->create_popup(
    iv_interface_view_name = 'BP_EMPL/ZNUPLOAD'
    iv_usage_name = 'ZCuFileUpload'
    iv_title = l_title ).


  gr_file_popup->set_on_close_event( iv_view = me iv_event_name = 'upload' ).
  gr_file_popup->open( ).
ajaya_kumar
Active Participant
0 Kudos

Hi,

I think you need to give z BSP application name as you have created a z view.

iv_interface_view_name = 'ZBP_EMPL/ZNUPLOAD'.

please check what is Z BSP application name for BP_EMPL.

Regards

Ajay

Former Member
0 Kudos

Changed it..now am getting this error:

Cannot display view Root.htm of UI Component CRM_UI_FRAME
An exception has occurred
Exception Class	CX_BSP_WD_INCORRECT_IMPLEMENT - Window 'ZBP_EMPL/ZNUPLOAD' is not defined in the component 'BP_EMPL'
Method:	CL_BSP_WD_COMPONENT_USAGE=>GET_INTERFACE_VIEW_CONTR
Source Text Row:	28

Former Member
0 Kudos

Expose the Mainwindow of your custom component in the run time repository.

In the ComponentInterface add your main window.

Then go to the component where you are calling this popup.

add this component as a component usage. In the component controller of the standard component redefine the method wd_usage_initialize and bind the nodes.

Regards

Sohit

former_member189678
Active Contributor
0 Kudos
IF gr_file_popup is bound.

 gr_file_popup->open( ).

ENDIF.

check this code.

Rg,

Harshit

Former Member
0 Kudos

Added the code ..no change.Yet to trigger the custom view.

former_member191572
Contributor
0 Kudos

Hi,

After your piece of code u need to call the respective event. As mentioned below.

  • Triggere the same event when pop-up is closed

gr_conf_popup->set_on_close_event( iv_view = me iv_event_name = ' ok ' ).

gr_conf_popup->open( ).

Regards,

Gobi

Former Member
0 Kudos

Hi,

i guess your gr_file_popup is bound in debugging, right?

I missed:

gr_file_popup->open( ).

In your coding.

Kind regards

Manfred