cancel
Showing results for 
Search instead for 
Did you mean: 

Add a window to a viewset

Former Member
0 Kudos

Hello.

I've enhanced the CRM_ICM_CMG component, and tried to create a viewset in it, that contains 2 views.

The CaseOverviewPage overview page displays the ICM_STAFF/MainWindow window.

In my viewset, I want to display this window (ICM_STAFF/MainWindow) and another view from the CRM_ICM_CMG component. In the Repository, I've deleted the views from the CaseOverviewPage, and created 2 view areas in the viewset, with one view in each of them, and in debug mode I can see that the bsp:call tags work as they should and return the views. But I get a dump from the ICM_STAFF/MainWindow view.

What can be the reason that it works from the Overview page, but it doesn't work from the viewset?

Have I missed anything in the process? Do I need to do anything else in the repository? Is there any problem with assigning a window to a view set? I've also tried to assign the actual view that's in ICM_STAFF/MainWindow, but got a dump as well.

So how can I make it work?

Best regards,

Udi.

Accepted Solutions (0)

Answers (1)

Answers (1)

arunprakash_karuppanan
Active Contributor
0 Kudos

Hi,

What dump are you getting?

Regards,

Arun Prakash

Former Member
0 Kudos

Thank you for the quick response.

There's a dump from the view's DO_PREPARE_OUTPUT method, about a method call from a NULL reference.

When the view is loaded from the Overview page, it works fine. But from the viewset it is NULL for some reason.

I guess it's somthing with component usage, or somthing else with the repository.

What do you think?

Best regards, Udi.

arunprakash_karuppanan
Active Contributor
0 Kudos

Hi,

This is a possibility. I'm not sure myself. When a component is added as an assignment block, some context node bindings usually take place. This can be found in the method 'WD_USAGE_INITIALIZE' of the component controller class. I suspect that this binding does not happen when you use the component usage in a viewset. This means that the expected initial data is not available and leads to error. If this is the case, what you can manually do the binding in the create_* methods of the context class in the used view. But, since you're dealing with standard components, you might have to enhance them.


method CREATE_MY_NODE.

    DATA:
      model        TYPE REF TO if_bsp_model,
      coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
      entity       TYPE REF TO cl_crm_bol_entity,           "#EC *
      entity_col   TYPE REF TO if_bol_entity_col.           "#EC *

    model = owner->create_model(

        class_name     = 'ZL_MY_CONTEXT_CN00'

        model_id       = 'mynode ).                       "#EC NOTEXT
    catalog ?= model.
    CLEAR model.
* Bind to Component Controller
    owner->do_context_node_binding( iv_controller_type = cl_bsp_wd_controller=>co_type_component
                                               iv_name = 'MY_COMPONENT_CONTROLLER_NAME'
                                   iv_target_node_name = 'mynode'
                                        iv_node_2_bind = mynode ).

endmethod.

Regards,

Arun Prakash