cancel
Showing results for 
Search instead for 
Did you mean: 

View Group Context

former_member202598
Participant
0 Kudos

Hi

Why do we need to Instantiate the View group context by redefining the 'SET_VIEW_GROUP_CONTEXT' in the IMPL class of the Mainwindow of the Embedding Component?

Regards

Sanguine

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Because to do View in Display/Editable mode.

You can see the .HTM page code like :

<chtmlb:config mode = "RUNTIME"

displayMode = "<%= controller->view_group_context->is_view_in_display_mode( controller ) %>"

                xml  = "<%= controller->configuration_descr->get_config_data( ) %>" />

Here the tag displayMode is set to True/False, because of SET_VIEW_GROUP_CONTEXT method only.

Hope this will help you.

Regards,

Vishal.

former_member202598
Participant
0 Kudos

Hi Vishal, Thanks for your reply

Would you please elaborate how the displaymode tag is set to true/false because of SET_VIEW_GROUP_CONTEXT Method? I've just check the Method where an Instance of ME->View_group_context ( ) is fetched I just dint understand how this method sets the above mentioned tag  to true/false

Regards

Sanguine.

Former Member
0 Kudos

Hi Sanguine007 crm,

refer this code , written in the main window " SET_VIEW_GROUP_CONTEXT " method

method SET_VIEW_GROUP_CONTEXT.

*CALL METHOD SUPER->SET_VIEW_GROUP_CONTEXT

*  EXPORTING

*    IV_PARENT_CONTEXT =

**    iv_first_time     = ABAP_FALSE

*    .

    IF iv_first_time EQ abap_true AND

        me->view_group_context IS NOT BOUND.

     IF iv_parent_context IS INITIAL.

       CREATE OBJECT me->view_group_context

         TYPE cl_bsp_wd_view_group_context.

     ELSE.

       me->view_group_context = iv_parent_context.

     ENDIF.

   ENDIF.

endmethod.

reward if helpful, thank you

Former Member
0 Kudos

Hi Sang,

Actually in SET_VIEW_GROUP_CONTEXT Method we have a importing parameter iv_parent_context, which we are assigning to view_group_context ( Inherited attribute ), And view_group_context is type of IF_BSP_WD_VIEW_GROUP_CONTEXT , and this interface contains methods that return TRUE if view is in Display mode and FALSE if view is in Editable mode.

And the tag displaymode is set to TRUE/FALSE , After determining that the view is in Display/Editable mode.

Hope this little bit might clear your doubt.

Check it out practically you will get the difference.

Regards,

Vishal.


former_member202598
Participant
0 Kudos

Thank you Vishal

Regards

Sanguine

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I am facing the a somewhat similar issue.

I am trying to use a view of BP_DATA ( marketing attribute and number list ) in another component .

I have created component usage and have done all the required thing. But its getting failed in

SET_VIEW_GROUP_CONTEXT method of IMPL class.
Can you please suggest.
Thank you.
Regards,
Vishal

Former Member
0 Kudos

Hi Jauhari,

Could you please provide the error message? Or please attach the screen shot of the error page.

Regrads,

Vishal