7 Replies Latest reply: May 30, 2014 12:01 PM by Vishal Dubey RSS

View Group Context

sanguine007 crm
Currently Being Moderated

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

  • Re: View Group Context
    Vishal Dubey
    Currently Being Moderated

    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.

    • Re: View Group Context
      sanguine007 crm
      Currently Being Moderated

      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.

      • Re: View Group Context
        Rohan Poovaiah
        Currently Being Moderated

        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

      • Re: View Group Context
        Vishal Dubey
        Currently Being Moderated

        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.

         

         


  • Re: View Group Context
    Vishal Jauhari
    Currently Being Moderated

    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