Quantcast
Channel: SCN : Discussion List - Customer Relationship Management (SAP CRM)
Viewing all articles
Browse latest Browse all 4296

Calling Outbound plug without an event

$
0
0

Hi,

 

I need to call a custom view (ZBP_HEAD/ZCustomView) instead of the normal BP_HEAD/BPHeadOverview in certain conditions. I created the navigation link and the outbound plug. For testing I created a custom button and when it is triggered, the target view does get called.

 

So I know that I have all the pieces connected. However,  I need to call this view without a button, so I tried calling the outbound plug method directly in do_prepare_output (based on my condition). However that didn't any affect.

 

Does anyone know if it is possible to trigger navigation from do_prepare_output? Or do I have to generate an event? I tried creating the event internally, again in do_prepare_output. However don't know if I the internal creation of the event is the right or the required thing to do.

 

Any help is greatly appreciated, since I am stuck.

 

 

   DATA: lr_htmlb_event TYPE REF TO CL_HTMLB_EVENT.

 

   CREATE OBJECT lr_htmlb_event.

 

CALL METHOD LR_HTMLB_EVENT->IF_HTMLB_DATA~EVENT_INITIALIZE

   EXPORTING

     P_REQUEST               = runtime->server->request

     P_EVENT_CLASS           = 'CL_HTMLB_EVENT_BUTTON'

     P_EVENT_ID              = 'ZCUSTOMVIEW'

     P_EVENT_NAME            = 'button'

     P_EVENT_TYPE            = 'click'

     P_EVENT_SERVER_NAME     = 'ZCUSTOMVIEW'

     P_EVENT_DEFINED         = ''

     P_EVENT_INTERCEPT_DEPTH = 0

*    P_EVENT_ID_EXPECTED     =

   RECEIVING

     P_EVENT_IS_NOT_EVENT    = lv_is_event.

     .

 

    CALL METHOD IF_BSP_CONTROLLER~HANDLE_EVENT

     EXPORTING

       EVENT           = 'ZCUSTOMVIEW'

       HTMLB_EVENT     = lr_htmlb_event

       HTMLB_EVENT_EX  = lr_htmlb_event

       GLOBAL_MESSAGES = lr_global_messages

     RECEIVING

       GLOBAL_EVENT    = lr_global_event.

 

   RETURN.

 

 

Thanks

Rajesh


Viewing all articles
Browse latest Browse all 4296

Trending Articles