cancel
Showing results for 
Search instead for 
Did you mean: 

Navigating into "Z" component

Former Member
0 Kudos

Hello All,

I need to navigate into my "Z" component, the problem is that the view with the "Navigate" Button is hosted inside other view.

The view with the button is ICCMP_EMP_DETL/BuPaEmpDetail

that hosted in ICCMP_EMP_DETL/DetailW

that hosted in CRMCMP_EMP/BuPaEmpMainVS

that hosted in CRMCMP_EMP/MainWindow

So how can I do it ? Any suggestions ?

Thanks in Advanced

Eli

Accepted Solutions (1)

Accepted Solutions (1)

juergenbaur
Active Participant
0 Kudos

Hi,

You have to build a event when the button is pressed.

And you have to delegate the outbound plug to the window to get outside the source component.

   method eh_ontooverview.

  if lr_collection is bound and lr_collection->size( ) > 0.
    call method me->op_to_your_comp( iv_data_collection = lr_collection ).
  endif.

endmethod.

   method op_to_your_comp.
  data: lr_window     type ref to cl_bsp_wd_window,
        lr_descriptor type ref to if_bol_bo_property_access,
        lr_nav_srv    type ref to if_crm_ui_navigation_service.

*Create descriptor
  call method cl_crm_ui_descriptor_obj_srv=>create_ui_object_based
    exporting
      iv_ui_object_type   = 'ZXXXXXX'
      iv_ui_object_action = 'B'
      iv_component        = 'ZCOMPINENT'
    receiving
      rr_result           = lr_descriptor.

*if navigation is supported add descriptor object to the collection
  lr_nav_srv = cl_crm_ui_navigation_service=>get_instance( me ).
  if lr_nav_srv->is_dynamic_nav_supported( ir_descriptor_object = lr_descriptor ) eq abap_true.
    iv_data_collection->insert( iv_bo = lr_descriptor iv_index = 1 ).
  else.
    return.
  endif.

  lr_nav_srv->navigate_dynamically( iv_data_collection ).
  lr_window = me->view_manager->get_window_controller( ).
  lr_window->call_outbound_plug( iv_outbound_plug = 'TO_YOUR_COMP' iv_data_collection = iv_data_collection ).

endmethod.

Former Member
0 Kudos

Hello Juergen,

Thanks for your answer but unfortunately I think that I done something wrong 😞

cause I get an Error . can you please describe how to insert an entry to the SPRO and where exactly insert those methods.

My component Name is ZCOMP1

button event is in view ICCMP_EMP_DETL/BuPaEmpDetail

component outbound plug TOEMPHIST  in view   ICCMP_EMP_DETL/DetailW

Thanks in Advance

Eli

juergenbaur
Active Participant
0 Kudos

Hi Eli,

In SPRO go to:

Customer Relationship Management->UI Framework->Technical Role Definition->Define Work Area Component Repository.

Make a new entry:

Component Name: ZCOMP1

Window Name: ZCOMP1/MainWindow

Define Inbound-Plug:

Target ID       ZCOMP1

Inbound Plug    DEFAULT

Object Type     ZCOMP1 (optional)

Object Action: Edit (for example)

Description:     this is the way to heaven

After that go to your called outbound plug (called by the action):

    data: lr_window     type ref to cl_bsp_wd_window,
        lr_descriptor type ref to if_bol_bo_property_access,
        lr_nav_srv    type ref to if_crm_ui_navigation_service.

*Create descriptor
  call method cl_crm_ui_descriptor_obj_srv=>create_ui_object_based
    exporting
      iv_ui_object_type   = 'ZCOMP1'
      iv_ui_object_action = 'B'
      iv_component        = 'ZCOMP1'
    receiving
      rr_result           = lr_descriptor.

*if navigation is supported add descriptor object to the collection
  lr_nav_srv = cl_crm_ui_navigation_service=>get_instance( me ).
  if lr_nav_srv->is_dynamic_nav_supported( ir_descriptor_object = lr_descriptor ) eq abap_true.
    iv_data_collection->insert( iv_bo = lr_descriptor iv_index = 1 ).
  else.
    return.
  endif.

  lr_nav_srv->navigate_dynamically( iv_data_collection ).
  lr_window = me->view_manager->get_window_controller( ).
  lr_window->call_outbound_plug( iv_outbound_plug = 'DEFAULT' iv_data_collection = iv_data_collection ).

Hope this helps!

br

Jürgen

Former Member
0 Kudos

Hello Juergen,

Thanks for your reply, it was very helpfull not very accurate but it help me to solve this issue.

I'm attaching the combined solution that close this issue my additions in BOLD:

In SPRO go to:

Customer Relationship Management->UI Framework->UI Framework Definition->Define UI Object Types

Object type - ZOBJ_COMP1

Description - UI Object Of the Way to Heaven

Customer Relationship Management->UI Framework->Technical Role Definition->Define Work Area Component Repository.

Make a new entry:

Component Name: ZCOMP1

Window Name: ZCOMP1/MainWindow

Define Inbound-Plug:

Target ID       TARGET_ZCOMP

Inbound Plug    DEFAULT

Object Type     ZOBJ_COMP1

Object Action: Edit (for example)

Description:     this is the way to heaven

Customer Relationship Management->UI Framework->Technical Role Definition->Define Navigation Bar Profile

find your Navigation Profile in "Define Navigation Bar Profiles"

goto "Override Generic OP Mappings Per Component" and insert:

Component Name - ZCOMP1

Object Type - ZOBJ_COMP1

Target ID - TARGET_ZCOMP

After that go to your called outbound plug (called by the action):

    data: lr_window     type ref to cl_bsp_wd_window,
        lr_descriptor type ref to if_bol_bo_property_access,
        lr_nav_srv    type ref to if_crm_ui_navigation_service,

       lr_data_collection TYPE REF TO if_bol_bo_col

*Create descriptor
  call method cl_crm_ui_descriptor_obj_srv=>create_ui_object_based
    exporting
      iv_ui_object_type   = 'ZOBJ_COMP1'
      iv_ui_object_action = 'B'
      iv_component        = 'ZCOMP1'
    receiving
      rr_result           = lr_descriptor.

*if navigation is supported add descriptor object to the collection
  lr_nav_srv = cl_crm_ui_navigation_service=>get_instance( me ).
  if lr_nav_srv->is_dynamic_nav_supported( ir_descriptor_object = lr_descriptor ) eq abap_true.
    CREATE OBJECT lr_data_collection TYPE cl_crm_bol_bo_col.

    lr_data_collection->insert( iv_bo = lr_descriptor iv_index = 1 ).
  else.
    return.
  endif.

  lr_nav_srv->navigate_dynamically( lr_data_collection ).
  lr_window = me->view_manager->get_window_controller( ).
  lr_window->call_outbound_plug( iv_outbound_plug = 'PLUG_TO_WINDOW_COMPONENT' iv_data_collection = iv_data_collection ).

And now it should work (Hopfully )

Enjoy All

juergenbaur
Active Participant
0 Kudos

Hi Eli,

I was in a hurry so sorry for the missing infos.

But by the way. the lr_data_collection is not needed.

Instead you should work with iv_data_collection. This input variable already has the right entity inside. Just the navigation descriptor is still missing.

br

Jürgen

Answers (0)